LCOV - code coverage report
Current view: top level - home/czgdp18079/Quansight/scipy/build/scipy/interpolate/_interpnd.cpython-312-x86_64-linux-gnu.so.p - _interpnd.c (source / functions) Hit Total Coverage
Test: lcov.info Lines: 6721 15354 43.8 %
Date: 2024-11-20 10:49:04 Functions: 176 421 41.8 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* Generated by Cython 3.0.11 */
       2             : 
       3             : #ifndef PY_SSIZE_T_CLEAN
       4             : #define PY_SSIZE_T_CLEAN
       5             : #endif /* PY_SSIZE_T_CLEAN */
       6             : #if defined(CYTHON_LIMITED_API) && 0
       7             :   #ifndef Py_LIMITED_API
       8             :     #if CYTHON_LIMITED_API+0 > 0x03030000
       9             :       #define Py_LIMITED_API CYTHON_LIMITED_API
      10             :     #else
      11             :       #define Py_LIMITED_API 0x03030000
      12             :     #endif
      13             :   #endif
      14             : #endif
      15             : 
      16             : #include "Python.h"
      17             : #ifndef Py_PYTHON_H
      18             :     #error Python headers needed to compile C extensions, please install development version of Python.
      19             : #elif PY_VERSION_HEX < 0x02070000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
      20             :     #error Cython requires Python 2.7+ or Python 3.3+.
      21             : #else
      22             : #if defined(CYTHON_LIMITED_API) && CYTHON_LIMITED_API
      23             : #define __PYX_EXTRA_ABI_MODULE_NAME "limited"
      24             : #else
      25             : #define __PYX_EXTRA_ABI_MODULE_NAME ""
      26             : #endif
      27             : #define CYTHON_ABI "3_0_11" __PYX_EXTRA_ABI_MODULE_NAME
      28             : #define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI
      29             : #define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "."
      30             : #define CYTHON_HEX_VERSION 0x03000BF0
      31             : #define CYTHON_FUTURE_DIVISION 1
      32             : #include <stddef.h>
      33             : #ifndef offsetof
      34             :   #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
      35             : #endif
      36             : #if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS)
      37             :   #ifndef __stdcall
      38             :     #define __stdcall
      39             :   #endif
      40             :   #ifndef __cdecl
      41             :     #define __cdecl
      42             :   #endif
      43             :   #ifndef __fastcall
      44             :     #define __fastcall
      45             :   #endif
      46             : #endif
      47             : #ifndef DL_IMPORT
      48             :   #define DL_IMPORT(t) t
      49             : #endif
      50             : #ifndef DL_EXPORT
      51             :   #define DL_EXPORT(t) t
      52             : #endif
      53             : #define __PYX_COMMA ,
      54             : #ifndef HAVE_LONG_LONG
      55             :   #define HAVE_LONG_LONG
      56             : #endif
      57             : #ifndef PY_LONG_LONG
      58             :   #define PY_LONG_LONG LONG_LONG
      59             : #endif
      60             : #ifndef Py_HUGE_VAL
      61             :   #define Py_HUGE_VAL HUGE_VAL
      62             : #endif
      63             : #define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX
      64             : #if defined(GRAALVM_PYTHON)
      65             :   /* For very preliminary testing purposes. Most variables are set the same as PyPy.
      66             :      The existence of this section does not imply that anything works or is even tested */
      67             :   #define CYTHON_COMPILING_IN_PYPY 0
      68             :   #define CYTHON_COMPILING_IN_CPYTHON 0
      69             :   #define CYTHON_COMPILING_IN_LIMITED_API 0
      70             :   #define CYTHON_COMPILING_IN_GRAAL 1
      71             :   #define CYTHON_COMPILING_IN_NOGIL 0
      72             :   #undef CYTHON_USE_TYPE_SLOTS
      73             :   #define CYTHON_USE_TYPE_SLOTS 0
      74             :   #undef CYTHON_USE_TYPE_SPECS
      75             :   #define CYTHON_USE_TYPE_SPECS 0
      76             :   #undef CYTHON_USE_PYTYPE_LOOKUP
      77             :   #define CYTHON_USE_PYTYPE_LOOKUP 0
      78             :   #if PY_VERSION_HEX < 0x03050000
      79             :     #undef CYTHON_USE_ASYNC_SLOTS
      80             :     #define CYTHON_USE_ASYNC_SLOTS 0
      81             :   #elif !defined(CYTHON_USE_ASYNC_SLOTS)
      82             :     #define CYTHON_USE_ASYNC_SLOTS 1
      83             :   #endif
      84             :   #undef CYTHON_USE_PYLIST_INTERNALS
      85             :   #define CYTHON_USE_PYLIST_INTERNALS 0
      86             :   #undef CYTHON_USE_UNICODE_INTERNALS
      87             :   #define CYTHON_USE_UNICODE_INTERNALS 0
      88             :   #undef CYTHON_USE_UNICODE_WRITER
      89             :   #define CYTHON_USE_UNICODE_WRITER 0
      90             :   #undef CYTHON_USE_PYLONG_INTERNALS
      91             :   #define CYTHON_USE_PYLONG_INTERNALS 0
      92             :   #undef CYTHON_AVOID_BORROWED_REFS
      93             :   #define CYTHON_AVOID_BORROWED_REFS 1
      94             :   #undef CYTHON_ASSUME_SAFE_MACROS
      95             :   #define CYTHON_ASSUME_SAFE_MACROS 0
      96             :   #undef CYTHON_UNPACK_METHODS
      97             :   #define CYTHON_UNPACK_METHODS 0
      98             :   #undef CYTHON_FAST_THREAD_STATE
      99             :   #define CYTHON_FAST_THREAD_STATE 0
     100             :   #undef CYTHON_FAST_GIL
     101             :   #define CYTHON_FAST_GIL 0
     102             :   #undef CYTHON_METH_FASTCALL
     103             :   #define CYTHON_METH_FASTCALL 0
     104             :   #undef CYTHON_FAST_PYCALL
     105             :   #define CYTHON_FAST_PYCALL 0
     106             :   #ifndef CYTHON_PEP487_INIT_SUBCLASS
     107             :     #define CYTHON_PEP487_INIT_SUBCLASS (PY_MAJOR_VERSION >= 3)
     108             :   #endif
     109             :   #undef CYTHON_PEP489_MULTI_PHASE_INIT
     110             :   #define CYTHON_PEP489_MULTI_PHASE_INIT 1
     111             :   #undef CYTHON_USE_MODULE_STATE
     112             :   #define CYTHON_USE_MODULE_STATE 0
     113             :   #undef CYTHON_USE_TP_FINALIZE
     114             :   #define CYTHON_USE_TP_FINALIZE 0
     115             :   #undef CYTHON_USE_DICT_VERSIONS
     116             :   #define CYTHON_USE_DICT_VERSIONS 0
     117             :   #undef CYTHON_USE_EXC_INFO_STACK
     118             :   #define CYTHON_USE_EXC_INFO_STACK 0
     119             :   #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
     120             :     #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
     121             :   #endif
     122             :   #undef CYTHON_USE_FREELISTS
     123             :   #define CYTHON_USE_FREELISTS 0
     124             : #elif defined(PYPY_VERSION)
     125             :   #define CYTHON_COMPILING_IN_PYPY 1
     126             :   #define CYTHON_COMPILING_IN_CPYTHON 0
     127             :   #define CYTHON_COMPILING_IN_LIMITED_API 0
     128             :   #define CYTHON_COMPILING_IN_GRAAL 0
     129             :   #define CYTHON_COMPILING_IN_NOGIL 0
     130             :   #undef CYTHON_USE_TYPE_SLOTS
     131             :   #define CYTHON_USE_TYPE_SLOTS 0
     132             :   #ifndef CYTHON_USE_TYPE_SPECS
     133             :     #define CYTHON_USE_TYPE_SPECS 0
     134             :   #endif
     135             :   #undef CYTHON_USE_PYTYPE_LOOKUP
     136             :   #define CYTHON_USE_PYTYPE_LOOKUP 0
     137             :   #if PY_VERSION_HEX < 0x03050000
     138             :     #undef CYTHON_USE_ASYNC_SLOTS
     139             :     #define CYTHON_USE_ASYNC_SLOTS 0
     140             :   #elif !defined(CYTHON_USE_ASYNC_SLOTS)
     141             :     #define CYTHON_USE_ASYNC_SLOTS 1
     142             :   #endif
     143             :   #undef CYTHON_USE_PYLIST_INTERNALS
     144             :   #define CYTHON_USE_PYLIST_INTERNALS 0
     145             :   #undef CYTHON_USE_UNICODE_INTERNALS
     146             :   #define CYTHON_USE_UNICODE_INTERNALS 0
     147             :   #undef CYTHON_USE_UNICODE_WRITER
     148             :   #define CYTHON_USE_UNICODE_WRITER 0
     149             :   #undef CYTHON_USE_PYLONG_INTERNALS
     150             :   #define CYTHON_USE_PYLONG_INTERNALS 0
     151             :   #undef CYTHON_AVOID_BORROWED_REFS
     152             :   #define CYTHON_AVOID_BORROWED_REFS 1
     153             :   #undef CYTHON_ASSUME_SAFE_MACROS
     154             :   #define CYTHON_ASSUME_SAFE_MACROS 0
     155             :   #undef CYTHON_UNPACK_METHODS
     156             :   #define CYTHON_UNPACK_METHODS 0
     157             :   #undef CYTHON_FAST_THREAD_STATE
     158             :   #define CYTHON_FAST_THREAD_STATE 0
     159             :   #undef CYTHON_FAST_GIL
     160             :   #define CYTHON_FAST_GIL 0
     161             :   #undef CYTHON_METH_FASTCALL
     162             :   #define CYTHON_METH_FASTCALL 0
     163             :   #undef CYTHON_FAST_PYCALL
     164             :   #define CYTHON_FAST_PYCALL 0
     165             :   #ifndef CYTHON_PEP487_INIT_SUBCLASS
     166             :     #define CYTHON_PEP487_INIT_SUBCLASS (PY_MAJOR_VERSION >= 3)
     167             :   #endif
     168             :   #if PY_VERSION_HEX < 0x03090000
     169             :     #undef CYTHON_PEP489_MULTI_PHASE_INIT
     170             :     #define CYTHON_PEP489_MULTI_PHASE_INIT 0
     171             :   #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT)
     172             :     #define CYTHON_PEP489_MULTI_PHASE_INIT 1
     173             :   #endif
     174             :   #undef CYTHON_USE_MODULE_STATE
     175             :   #define CYTHON_USE_MODULE_STATE 0
     176             :   #undef CYTHON_USE_TP_FINALIZE
     177             :   #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1 && PYPY_VERSION_NUM >= 0x07030C00)
     178             :   #undef CYTHON_USE_DICT_VERSIONS
     179             :   #define CYTHON_USE_DICT_VERSIONS 0
     180             :   #undef CYTHON_USE_EXC_INFO_STACK
     181             :   #define CYTHON_USE_EXC_INFO_STACK 0
     182             :   #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
     183             :     #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
     184             :   #endif
     185             :   #undef CYTHON_USE_FREELISTS
     186             :   #define CYTHON_USE_FREELISTS 0
     187             : #elif defined(CYTHON_LIMITED_API)
     188             :   #ifdef Py_LIMITED_API
     189             :     #undef __PYX_LIMITED_VERSION_HEX
     190             :     #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API
     191             :   #endif
     192             :   #define CYTHON_COMPILING_IN_PYPY 0
     193             :   #define CYTHON_COMPILING_IN_CPYTHON 0
     194             :   #define CYTHON_COMPILING_IN_LIMITED_API 1
     195             :   #define CYTHON_COMPILING_IN_GRAAL 0
     196             :   #define CYTHON_COMPILING_IN_NOGIL 0
     197             :   #undef CYTHON_CLINE_IN_TRACEBACK
     198             :   #define CYTHON_CLINE_IN_TRACEBACK 0
     199             :   #undef CYTHON_USE_TYPE_SLOTS
     200             :   #define CYTHON_USE_TYPE_SLOTS 0
     201             :   #undef CYTHON_USE_TYPE_SPECS
     202             :   #define CYTHON_USE_TYPE_SPECS 1
     203             :   #undef CYTHON_USE_PYTYPE_LOOKUP
     204             :   #define CYTHON_USE_PYTYPE_LOOKUP 0
     205             :   #undef CYTHON_USE_ASYNC_SLOTS
     206             :   #define CYTHON_USE_ASYNC_SLOTS 0
     207             :   #undef CYTHON_USE_PYLIST_INTERNALS
     208             :   #define CYTHON_USE_PYLIST_INTERNALS 0
     209             :   #undef CYTHON_USE_UNICODE_INTERNALS
     210             :   #define CYTHON_USE_UNICODE_INTERNALS 0
     211             :   #ifndef CYTHON_USE_UNICODE_WRITER
     212             :     #define CYTHON_USE_UNICODE_WRITER 0
     213             :   #endif
     214             :   #undef CYTHON_USE_PYLONG_INTERNALS
     215             :   #define CYTHON_USE_PYLONG_INTERNALS 0
     216             :   #ifndef CYTHON_AVOID_BORROWED_REFS
     217             :     #define CYTHON_AVOID_BORROWED_REFS 0
     218             :   #endif
     219             :   #undef CYTHON_ASSUME_SAFE_MACROS
     220             :   #define CYTHON_ASSUME_SAFE_MACROS 0
     221             :   #undef CYTHON_UNPACK_METHODS
     222             :   #define CYTHON_UNPACK_METHODS 0
     223             :   #undef CYTHON_FAST_THREAD_STATE
     224             :   #define CYTHON_FAST_THREAD_STATE 0
     225             :   #undef CYTHON_FAST_GIL
     226             :   #define CYTHON_FAST_GIL 0
     227             :   #undef CYTHON_METH_FASTCALL
     228             :   #define CYTHON_METH_FASTCALL 0
     229             :   #undef CYTHON_FAST_PYCALL
     230             :   #define CYTHON_FAST_PYCALL 0
     231             :   #ifndef CYTHON_PEP487_INIT_SUBCLASS
     232             :     #define CYTHON_PEP487_INIT_SUBCLASS 1
     233             :   #endif
     234             :   #undef CYTHON_PEP489_MULTI_PHASE_INIT
     235             :   #define CYTHON_PEP489_MULTI_PHASE_INIT 0
     236             :   #undef CYTHON_USE_MODULE_STATE
     237             :   #define CYTHON_USE_MODULE_STATE 1
     238             :   #ifndef CYTHON_USE_TP_FINALIZE
     239             :     #define CYTHON_USE_TP_FINALIZE 0
     240             :   #endif
     241             :   #undef CYTHON_USE_DICT_VERSIONS
     242             :   #define CYTHON_USE_DICT_VERSIONS 0
     243             :   #undef CYTHON_USE_EXC_INFO_STACK
     244             :   #define CYTHON_USE_EXC_INFO_STACK 0
     245             :   #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
     246             :     #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
     247             :   #endif
     248             :   #undef CYTHON_USE_FREELISTS
     249             :   #define CYTHON_USE_FREELISTS 0
     250             : #elif defined(Py_GIL_DISABLED) || defined(Py_NOGIL)
     251             :   #define CYTHON_COMPILING_IN_PYPY 0
     252             :   #define CYTHON_COMPILING_IN_CPYTHON 0
     253             :   #define CYTHON_COMPILING_IN_LIMITED_API 0
     254             :   #define CYTHON_COMPILING_IN_GRAAL 0
     255             :   #define CYTHON_COMPILING_IN_NOGIL 1
     256             :   #ifndef CYTHON_USE_TYPE_SLOTS
     257             :     #define CYTHON_USE_TYPE_SLOTS 1
     258             :   #endif
     259             :   #ifndef CYTHON_USE_TYPE_SPECS
     260             :     #define CYTHON_USE_TYPE_SPECS 0
     261             :   #endif
     262             :   #undef CYTHON_USE_PYTYPE_LOOKUP
     263             :   #define CYTHON_USE_PYTYPE_LOOKUP 0
     264             :   #ifndef CYTHON_USE_ASYNC_SLOTS
     265             :     #define CYTHON_USE_ASYNC_SLOTS 1
     266             :   #endif
     267             :   #ifndef CYTHON_USE_PYLONG_INTERNALS
     268             :     #define CYTHON_USE_PYLONG_INTERNALS 0
     269             :   #endif
     270             :   #undef CYTHON_USE_PYLIST_INTERNALS
     271             :   #define CYTHON_USE_PYLIST_INTERNALS 0
     272             :   #ifndef CYTHON_USE_UNICODE_INTERNALS
     273             :     #define CYTHON_USE_UNICODE_INTERNALS 1
     274             :   #endif
     275             :   #undef CYTHON_USE_UNICODE_WRITER
     276             :   #define CYTHON_USE_UNICODE_WRITER 0
     277             :   #ifndef CYTHON_AVOID_BORROWED_REFS
     278             :     #define CYTHON_AVOID_BORROWED_REFS 0
     279             :   #endif
     280             :   #ifndef CYTHON_ASSUME_SAFE_MACROS
     281             :     #define CYTHON_ASSUME_SAFE_MACROS 1
     282             :   #endif
     283             :   #ifndef CYTHON_UNPACK_METHODS
     284             :     #define CYTHON_UNPACK_METHODS 1
     285             :   #endif
     286             :   #undef CYTHON_FAST_THREAD_STATE
     287             :   #define CYTHON_FAST_THREAD_STATE 0
     288             :   #undef CYTHON_FAST_GIL
     289             :   #define CYTHON_FAST_GIL 0
     290             :   #ifndef CYTHON_METH_FASTCALL
     291             :     #define CYTHON_METH_FASTCALL 1
     292             :   #endif
     293             :   #undef CYTHON_FAST_PYCALL
     294             :   #define CYTHON_FAST_PYCALL 0
     295             :   #ifndef CYTHON_PEP487_INIT_SUBCLASS
     296             :     #define CYTHON_PEP487_INIT_SUBCLASS 1
     297             :   #endif
     298             :   #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
     299             :     #define CYTHON_PEP489_MULTI_PHASE_INIT 1
     300             :   #endif
     301             :   #ifndef CYTHON_USE_MODULE_STATE
     302             :     #define CYTHON_USE_MODULE_STATE 0
     303             :   #endif
     304             :   #ifndef CYTHON_USE_TP_FINALIZE
     305             :     #define CYTHON_USE_TP_FINALIZE 1
     306             :   #endif
     307             :   #undef CYTHON_USE_DICT_VERSIONS
     308             :   #define CYTHON_USE_DICT_VERSIONS 0
     309             :   #undef CYTHON_USE_EXC_INFO_STACK
     310             :   #define CYTHON_USE_EXC_INFO_STACK 0
     311             :   #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
     312             :     #define CYTHON_UPDATE_DESCRIPTOR_DOC 1
     313             :   #endif
     314             :   #ifndef CYTHON_USE_FREELISTS
     315             :     #define CYTHON_USE_FREELISTS 0
     316             :   #endif
     317             : #else
     318             :   #define CYTHON_COMPILING_IN_PYPY 0
     319             :   #define CYTHON_COMPILING_IN_CPYTHON 1
     320             :   #define CYTHON_COMPILING_IN_LIMITED_API 0
     321             :   #define CYTHON_COMPILING_IN_GRAAL 0
     322             :   #define CYTHON_COMPILING_IN_NOGIL 0
     323             :   #ifndef CYTHON_USE_TYPE_SLOTS
     324             :     #define CYTHON_USE_TYPE_SLOTS 1
     325             :   #endif
     326             :   #ifndef CYTHON_USE_TYPE_SPECS
     327             :     #define CYTHON_USE_TYPE_SPECS 0
     328             :   #endif
     329             :   #ifndef CYTHON_USE_PYTYPE_LOOKUP
     330             :     #define CYTHON_USE_PYTYPE_LOOKUP 1
     331             :   #endif
     332             :   #if PY_MAJOR_VERSION < 3
     333             :     #undef CYTHON_USE_ASYNC_SLOTS
     334             :     #define CYTHON_USE_ASYNC_SLOTS 0
     335             :   #elif !defined(CYTHON_USE_ASYNC_SLOTS)
     336             :     #define CYTHON_USE_ASYNC_SLOTS 1
     337             :   #endif
     338             :   #ifndef CYTHON_USE_PYLONG_INTERNALS
     339             :     #define CYTHON_USE_PYLONG_INTERNALS 1
     340             :   #endif
     341             :   #ifndef CYTHON_USE_PYLIST_INTERNALS
     342             :     #define CYTHON_USE_PYLIST_INTERNALS 1
     343             :   #endif
     344             :   #ifndef CYTHON_USE_UNICODE_INTERNALS
     345             :     #define CYTHON_USE_UNICODE_INTERNALS 1
     346             :   #endif
     347             :   #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2
     348             :     #undef CYTHON_USE_UNICODE_WRITER
     349             :     #define CYTHON_USE_UNICODE_WRITER 0
     350             :   #elif !defined(CYTHON_USE_UNICODE_WRITER)
     351             :     #define CYTHON_USE_UNICODE_WRITER 1
     352             :   #endif
     353             :   #ifndef CYTHON_AVOID_BORROWED_REFS
     354             :     #define CYTHON_AVOID_BORROWED_REFS 0
     355             :   #endif
     356             :   #ifndef CYTHON_ASSUME_SAFE_MACROS
     357             :     #define CYTHON_ASSUME_SAFE_MACROS 1
     358             :   #endif
     359             :   #ifndef CYTHON_UNPACK_METHODS
     360             :     #define CYTHON_UNPACK_METHODS 1
     361             :   #endif
     362             :   #ifndef CYTHON_FAST_THREAD_STATE
     363             :     #define CYTHON_FAST_THREAD_STATE 1
     364             :   #endif
     365             :   #ifndef CYTHON_FAST_GIL
     366             :     #define CYTHON_FAST_GIL (PY_MAJOR_VERSION < 3 || PY_VERSION_HEX >= 0x03060000 && PY_VERSION_HEX < 0x030C00A6)
     367             :   #endif
     368             :   #ifndef CYTHON_METH_FASTCALL
     369             :     #define CYTHON_METH_FASTCALL (PY_VERSION_HEX >= 0x030700A1)
     370             :   #endif
     371             :   #ifndef CYTHON_FAST_PYCALL
     372             :     #define CYTHON_FAST_PYCALL 1
     373             :   #endif
     374             :   #ifndef CYTHON_PEP487_INIT_SUBCLASS
     375             :     #define CYTHON_PEP487_INIT_SUBCLASS 1
     376             :   #endif
     377             :   #if PY_VERSION_HEX < 0x03050000
     378             :     #undef CYTHON_PEP489_MULTI_PHASE_INIT
     379             :     #define CYTHON_PEP489_MULTI_PHASE_INIT 0
     380             :   #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT)
     381             :     #define CYTHON_PEP489_MULTI_PHASE_INIT 1
     382             :   #endif
     383             :   #ifndef CYTHON_USE_MODULE_STATE
     384             :     #define CYTHON_USE_MODULE_STATE 0
     385             :   #endif
     386             :   #if PY_VERSION_HEX < 0x030400a1
     387             :     #undef CYTHON_USE_TP_FINALIZE
     388             :     #define CYTHON_USE_TP_FINALIZE 0
     389             :   #elif !defined(CYTHON_USE_TP_FINALIZE)
     390             :     #define CYTHON_USE_TP_FINALIZE 1
     391             :   #endif
     392             :   #if PY_VERSION_HEX < 0x030600B1
     393             :     #undef CYTHON_USE_DICT_VERSIONS
     394             :     #define CYTHON_USE_DICT_VERSIONS 0
     395             :   #elif !defined(CYTHON_USE_DICT_VERSIONS)
     396             :     #define CYTHON_USE_DICT_VERSIONS  (PY_VERSION_HEX < 0x030C00A5)
     397             :   #endif
     398             :   #if PY_VERSION_HEX < 0x030700A3
     399             :     #undef CYTHON_USE_EXC_INFO_STACK
     400             :     #define CYTHON_USE_EXC_INFO_STACK 0
     401             :   #elif !defined(CYTHON_USE_EXC_INFO_STACK)
     402             :     #define CYTHON_USE_EXC_INFO_STACK 1
     403             :   #endif
     404             :   #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
     405             :     #define CYTHON_UPDATE_DESCRIPTOR_DOC 1
     406             :   #endif
     407             :   #ifndef CYTHON_USE_FREELISTS
     408             :     #define CYTHON_USE_FREELISTS 1
     409             :   #endif
     410             : #endif
     411             : #if !defined(CYTHON_FAST_PYCCALL)
     412             : #define CYTHON_FAST_PYCCALL  (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
     413             : #endif
     414             : #if !defined(CYTHON_VECTORCALL)
     415             : #define CYTHON_VECTORCALL  (CYTHON_FAST_PYCCALL && PY_VERSION_HEX >= 0x030800B1)
     416             : #endif
     417             : #define CYTHON_BACKPORT_VECTORCALL (CYTHON_METH_FASTCALL && PY_VERSION_HEX < 0x030800B1)
     418             : #if CYTHON_USE_PYLONG_INTERNALS
     419             :   #if PY_MAJOR_VERSION < 3
     420             :     #include "longintrepr.h"
     421             :   #endif
     422             :   #undef SHIFT
     423             :   #undef BASE
     424             :   #undef MASK
     425             :   #ifdef SIZEOF_VOID_P
     426             :     enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
     427             :   #endif
     428             : #endif
     429             : #ifndef __has_attribute
     430             :   #define __has_attribute(x) 0
     431             : #endif
     432             : #ifndef __has_cpp_attribute
     433             :   #define __has_cpp_attribute(x) 0
     434             : #endif
     435             : #ifndef CYTHON_RESTRICT
     436             :   #if defined(__GNUC__)
     437             :     #define CYTHON_RESTRICT __restrict__
     438             :   #elif defined(_MSC_VER) && _MSC_VER >= 1400
     439             :     #define CYTHON_RESTRICT __restrict
     440             :   #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
     441             :     #define CYTHON_RESTRICT restrict
     442             :   #else
     443             :     #define CYTHON_RESTRICT
     444             :   #endif
     445             : #endif
     446             : #ifndef CYTHON_UNUSED
     447             :   #if defined(__cplusplus)
     448             :     /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17
     449             :      * but leads to warnings with -pedantic, since it is a C++17 feature */
     450             :     #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
     451             :       #if __has_cpp_attribute(maybe_unused)
     452             :         #define CYTHON_UNUSED [[maybe_unused]]
     453             :       #endif
     454             :     #endif
     455             :   #endif
     456             : #endif
     457             : #ifndef CYTHON_UNUSED
     458             : # if defined(__GNUC__)
     459             : #   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
     460             : #     define CYTHON_UNUSED __attribute__ ((__unused__))
     461             : #   else
     462             : #     define CYTHON_UNUSED
     463             : #   endif
     464             : # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
     465             : #   define CYTHON_UNUSED __attribute__ ((__unused__))
     466             : # else
     467             : #   define CYTHON_UNUSED
     468             : # endif
     469             : #endif
     470             : #ifndef CYTHON_UNUSED_VAR
     471             : #  if defined(__cplusplus)
     472             :      template<class T> void CYTHON_UNUSED_VAR( const T& ) { }
     473             : #  else
     474             : #    define CYTHON_UNUSED_VAR(x) (void)(x)
     475             : #  endif
     476             : #endif
     477             : #ifndef CYTHON_MAYBE_UNUSED_VAR
     478             :   #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x)
     479             : #endif
     480             : #ifndef CYTHON_NCP_UNUSED
     481             : # if CYTHON_COMPILING_IN_CPYTHON
     482             : #  define CYTHON_NCP_UNUSED
     483             : # else
     484             : #  define CYTHON_NCP_UNUSED CYTHON_UNUSED
     485             : # endif
     486             : #endif
     487             : #ifndef CYTHON_USE_CPP_STD_MOVE
     488             :   #if defined(__cplusplus) && (\
     489             :     __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600))
     490             :     #define CYTHON_USE_CPP_STD_MOVE 1
     491             :   #else
     492             :     #define CYTHON_USE_CPP_STD_MOVE 0
     493             :   #endif
     494             : #endif
     495             : #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
     496             : #ifdef _MSC_VER
     497             :     #ifndef _MSC_STDINT_H_
     498             :         #if _MSC_VER < 1300
     499             :             typedef unsigned char     uint8_t;
     500             :             typedef unsigned short    uint16_t;
     501             :             typedef unsigned int      uint32_t;
     502             :         #else
     503             :             typedef unsigned __int8   uint8_t;
     504             :             typedef unsigned __int16  uint16_t;
     505             :             typedef unsigned __int32  uint32_t;
     506             :         #endif
     507             :     #endif
     508             :     #if _MSC_VER < 1300
     509             :         #ifdef _WIN64
     510             :             typedef unsigned long long  __pyx_uintptr_t;
     511             :         #else
     512             :             typedef unsigned int        __pyx_uintptr_t;
     513             :         #endif
     514             :     #else
     515             :         #ifdef _WIN64
     516             :             typedef unsigned __int64    __pyx_uintptr_t;
     517             :         #else
     518             :             typedef unsigned __int32    __pyx_uintptr_t;
     519             :         #endif
     520             :     #endif
     521             : #else
     522             :     #include <stdint.h>
     523             :     typedef uintptr_t  __pyx_uintptr_t;
     524             : #endif
     525             : #ifndef CYTHON_FALLTHROUGH
     526             :   #if defined(__cplusplus)
     527             :     /* for clang __has_cpp_attribute(fallthrough) is true even before C++17
     528             :      * but leads to warnings with -pedantic, since it is a C++17 feature */
     529             :     #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
     530             :       #if __has_cpp_attribute(fallthrough)
     531             :         #define CYTHON_FALLTHROUGH [[fallthrough]]
     532             :       #endif
     533             :     #endif
     534             :     #ifndef CYTHON_FALLTHROUGH
     535             :       #if __has_cpp_attribute(clang::fallthrough)
     536             :         #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
     537             :       #elif __has_cpp_attribute(gnu::fallthrough)
     538             :         #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
     539             :       #endif
     540             :     #endif
     541             :   #endif
     542             :   #ifndef CYTHON_FALLTHROUGH
     543             :     #if __has_attribute(fallthrough)
     544             :       #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
     545             :     #else
     546             :       #define CYTHON_FALLTHROUGH
     547             :     #endif
     548             :   #endif
     549             :   #if defined(__clang__) && defined(__apple_build_version__)
     550             :     #if __apple_build_version__ < 7000000
     551             :       #undef  CYTHON_FALLTHROUGH
     552             :       #define CYTHON_FALLTHROUGH
     553             :     #endif
     554             :   #endif
     555             : #endif
     556             : #ifdef __cplusplus
     557             :   template <typename T>
     558             :   struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);};
     559             :   #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL<type>::value)
     560             : #else
     561             :   #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0)
     562             : #endif
     563             : #if CYTHON_COMPILING_IN_PYPY == 1
     564             :   #define __PYX_NEED_TP_PRINT_SLOT  (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x030A0000)
     565             : #else
     566             :   #define __PYX_NEED_TP_PRINT_SLOT  (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000)
     567             : #endif
     568             : #define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer))
     569             : 
     570             : #ifndef CYTHON_INLINE
     571             :   #if defined(__clang__)
     572             :     #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
     573             :   #elif defined(__GNUC__)
     574             :     #define CYTHON_INLINE __inline__
     575             :   #elif defined(_MSC_VER)
     576             :     #define CYTHON_INLINE __inline
     577             :   #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
     578             :     #define CYTHON_INLINE inline
     579             :   #else
     580             :     #define CYTHON_INLINE
     581             :   #endif
     582             : #endif
     583             : 
     584             : #define __PYX_BUILD_PY_SSIZE_T "n"
     585             : #define CYTHON_FORMAT_SSIZE_T "z"
     586             : #if PY_MAJOR_VERSION < 3
     587             :   #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
     588             :   #define __Pyx_DefaultClassType PyClass_Type
     589             :   #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
     590             :           PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
     591             : #else
     592             :   #define __Pyx_BUILTIN_MODULE_NAME "builtins"
     593             :   #define __Pyx_DefaultClassType PyType_Type
     594             : #if CYTHON_COMPILING_IN_LIMITED_API
     595             :     static CYTHON_INLINE PyObject* __Pyx_PyCode_New(int a, int p, int k, int l, int s, int f,
     596             :                                                     PyObject *code, PyObject *c, PyObject* n, PyObject *v,
     597             :                                                     PyObject *fv, PyObject *cell, PyObject* fn,
     598             :                                                     PyObject *name, int fline, PyObject *lnos) {
     599             :         PyObject *exception_table = NULL;
     600             :         PyObject *types_module=NULL, *code_type=NULL, *result=NULL;
     601             :         #if __PYX_LIMITED_VERSION_HEX < 0x030B0000
     602             :         PyObject *version_info;
     603             :         PyObject *py_minor_version = NULL;
     604             :         #endif
     605             :         long minor_version = 0;
     606             :         PyObject *type, *value, *traceback;
     607             :         PyErr_Fetch(&type, &value, &traceback);
     608             :         #if __PYX_LIMITED_VERSION_HEX >= 0x030B0000
     609             :         minor_version = 11;
     610             :         #else
     611             :         if (!(version_info = PySys_GetObject("version_info"))) goto end;
     612             :         if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end;
     613             :         minor_version = PyLong_AsLong(py_minor_version);
     614             :         Py_DECREF(py_minor_version);
     615             :         if (minor_version == -1 && PyErr_Occurred()) goto end;
     616             :         #endif
     617             :         if (!(types_module = PyImport_ImportModule("types"))) goto end;
     618             :         if (!(code_type = PyObject_GetAttrString(types_module, "CodeType"))) goto end;
     619             :         if (minor_version <= 7) {
     620             :             (void)p;
     621             :             result = PyObject_CallFunction(code_type, "iiiiiOOOOOOiOO", a, k, l, s, f, code,
     622             :                           c, n, v, fn, name, fline, lnos, fv, cell);
     623             :         } else if (minor_version <= 10) {
     624             :             result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOiOO", a,p, k, l, s, f, code,
     625             :                           c, n, v, fn, name, fline, lnos, fv, cell);
     626             :         } else {
     627             :             if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0))) goto end;
     628             :             result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOOiOO", a,p, k, l, s, f, code,
     629             :                           c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell);
     630             :         }
     631             :     end:
     632             :         Py_XDECREF(code_type);
     633             :         Py_XDECREF(exception_table);
     634             :         Py_XDECREF(types_module);
     635             :         if (type) {
     636             :             PyErr_Restore(type, value, traceback);
     637             :         }
     638             :         return result;
     639             :     }
     640             :     #ifndef CO_OPTIMIZED
     641             :     #define CO_OPTIMIZED 0x0001
     642             :     #endif
     643             :     #ifndef CO_NEWLOCALS
     644             :     #define CO_NEWLOCALS 0x0002
     645             :     #endif
     646             :     #ifndef CO_VARARGS
     647             :     #define CO_VARARGS 0x0004
     648             :     #endif
     649             :     #ifndef CO_VARKEYWORDS
     650             :     #define CO_VARKEYWORDS 0x0008
     651             :     #endif
     652             :     #ifndef CO_ASYNC_GENERATOR
     653             :     #define CO_ASYNC_GENERATOR 0x0200
     654             :     #endif
     655             :     #ifndef CO_GENERATOR
     656             :     #define CO_GENERATOR 0x0020
     657             :     #endif
     658             :     #ifndef CO_COROUTINE
     659             :     #define CO_COROUTINE 0x0080
     660             :     #endif
     661             : #elif PY_VERSION_HEX >= 0x030B0000
     662          63 :   static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, int p, int k, int l, int s, int f,
     663             :                                                     PyObject *code, PyObject *c, PyObject* n, PyObject *v,
     664             :                                                     PyObject *fv, PyObject *cell, PyObject* fn,
     665             :                                                     PyObject *name, int fline, PyObject *lnos) {
     666          63 :     PyCodeObject *result;
     667          63 :     PyObject *empty_bytes = PyBytes_FromStringAndSize("", 0);
     668          63 :     if (!empty_bytes) return NULL;
     669          63 :     result =
     670             :       #if PY_VERSION_HEX >= 0x030C0000
     671          63 :         PyUnstable_Code_NewWithPosOnlyArgs
     672             :       #else
     673             :         PyCode_NewWithPosOnlyArgs
     674             :       #endif
     675             :         (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, empty_bytes);
     676          63 :     Py_DECREF(empty_bytes);
     677             :     return result;
     678             :   }
     679             : #elif PY_VERSION_HEX >= 0x030800B2 && !CYTHON_COMPILING_IN_PYPY
     680             :   #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
     681             :           PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
     682             : #else
     683             :   #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
     684             :           PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
     685             : #endif
     686             : #endif
     687             : #if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE)
     688             :   #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type)
     689             : #else
     690             :   #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type))
     691             : #endif
     692             : #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is)
     693             :   #define __Pyx_Py_Is(x, y)  Py_Is(x, y)
     694             : #else
     695             :   #define __Pyx_Py_Is(x, y) ((x) == (y))
     696             : #endif
     697             : #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone)
     698             :   #define __Pyx_Py_IsNone(ob) Py_IsNone(ob)
     699             : #else
     700             :   #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None)
     701             : #endif
     702             : #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue)
     703             :   #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob)
     704             : #else
     705             :   #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True)
     706             : #endif
     707             : #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse)
     708             :   #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob)
     709             : #else
     710             :   #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False)
     711             : #endif
     712             : #define __Pyx_NoneAsNull(obj)  (__Pyx_Py_IsNone(obj) ? NULL : (obj))
     713             : #if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY
     714             :   #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o)
     715             : #else
     716             :   #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o)
     717             : #endif
     718             : #ifndef CO_COROUTINE
     719             :   #define CO_COROUTINE 0x80
     720             : #endif
     721             : #ifndef CO_ASYNC_GENERATOR
     722             :   #define CO_ASYNC_GENERATOR 0x200
     723             : #endif
     724             : #ifndef Py_TPFLAGS_CHECKTYPES
     725             :   #define Py_TPFLAGS_CHECKTYPES 0
     726             : #endif
     727             : #ifndef Py_TPFLAGS_HAVE_INDEX
     728             :   #define Py_TPFLAGS_HAVE_INDEX 0
     729             : #endif
     730             : #ifndef Py_TPFLAGS_HAVE_NEWBUFFER
     731             :   #define Py_TPFLAGS_HAVE_NEWBUFFER 0
     732             : #endif
     733             : #ifndef Py_TPFLAGS_HAVE_FINALIZE
     734             :   #define Py_TPFLAGS_HAVE_FINALIZE 0
     735             : #endif
     736             : #ifndef Py_TPFLAGS_SEQUENCE
     737             :   #define Py_TPFLAGS_SEQUENCE 0
     738             : #endif
     739             : #ifndef Py_TPFLAGS_MAPPING
     740             :   #define Py_TPFLAGS_MAPPING 0
     741             : #endif
     742             : #ifndef METH_STACKLESS
     743             :   #define METH_STACKLESS 0
     744             : #endif
     745             : #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
     746             :   #ifndef METH_FASTCALL
     747             :      #define METH_FASTCALL 0x80
     748             :   #endif
     749             :   typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
     750             :   typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
     751             :                                                           Py_ssize_t nargs, PyObject *kwnames);
     752             : #else
     753             :   #if PY_VERSION_HEX >= 0x030d00A4
     754             :   #  define __Pyx_PyCFunctionFast PyCFunctionFast
     755             :   #  define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords
     756             :   #else
     757             :   #  define __Pyx_PyCFunctionFast _PyCFunctionFast
     758             :   #  define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
     759             :   #endif
     760             : #endif
     761             : #if CYTHON_METH_FASTCALL
     762             :   #define __Pyx_METH_FASTCALL METH_FASTCALL
     763             :   #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast
     764             :   #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords
     765             : #else
     766             :   #define __Pyx_METH_FASTCALL METH_VARARGS
     767             :   #define __Pyx_PyCFunction_FastCall PyCFunction
     768             :   #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords
     769             : #endif
     770             : #if CYTHON_VECTORCALL
     771             :   #define __pyx_vectorcallfunc vectorcallfunc
     772             :   #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET  PY_VECTORCALL_ARGUMENTS_OFFSET
     773             :   #define __Pyx_PyVectorcall_NARGS(n)  PyVectorcall_NARGS((size_t)(n))
     774             : #elif CYTHON_BACKPORT_VECTORCALL
     775             :   typedef PyObject *(*__pyx_vectorcallfunc)(PyObject *callable, PyObject *const *args,
     776             :                                             size_t nargsf, PyObject *kwnames);
     777             :   #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET  ((size_t)1 << (8 * sizeof(size_t) - 1))
     778             :   #define __Pyx_PyVectorcall_NARGS(n)  ((Py_ssize_t)(((size_t)(n)) & ~__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET))
     779             : #else
     780             :   #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET  0
     781             :   #define __Pyx_PyVectorcall_NARGS(n)  ((Py_ssize_t)(n))
     782             : #endif
     783             : #if PY_MAJOR_VERSION >= 0x030900B1
     784             : #define __Pyx_PyCFunction_CheckExact(func)  PyCFunction_CheckExact(func)
     785             : #else
     786             : #define __Pyx_PyCFunction_CheckExact(func)  PyCFunction_Check(func)
     787             : #endif
     788             : #define __Pyx_CyOrPyCFunction_Check(func)  PyCFunction_Check(func)
     789             : #if CYTHON_COMPILING_IN_CPYTHON
     790             : #define __Pyx_CyOrPyCFunction_GET_FUNCTION(func)  (((PyCFunctionObject*)(func))->m_ml->ml_meth)
     791             : #elif !CYTHON_COMPILING_IN_LIMITED_API
     792             : #define __Pyx_CyOrPyCFunction_GET_FUNCTION(func)  PyCFunction_GET_FUNCTION(func)
     793             : #endif
     794             : #if CYTHON_COMPILING_IN_CPYTHON
     795             : #define __Pyx_CyOrPyCFunction_GET_FLAGS(func)  (((PyCFunctionObject*)(func))->m_ml->ml_flags)
     796           0 : static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) {
     797           0 :     return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self;
     798             : }
     799             : #endif
     800             : static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void *cfunc) {
     801             : #if CYTHON_COMPILING_IN_LIMITED_API
     802             :     return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc;
     803             : #else
     804             :     return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc;
     805             : #endif
     806             : }
     807             : #define __Pyx_IsSameCFunction(func, cfunc)   __Pyx__IsSameCFunction(func, cfunc)
     808             : #if __PYX_LIMITED_VERSION_HEX < 0x030900B1
     809             :   #define __Pyx_PyType_FromModuleAndSpec(m, s, b)  ((void)m, PyType_FromSpecWithBases(s, b))
     810             :   typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *);
     811             : #else
     812             :   #define __Pyx_PyType_FromModuleAndSpec(m, s, b)  PyType_FromModuleAndSpec(m, s, b)
     813             :   #define __Pyx_PyCMethod  PyCMethod
     814             : #endif
     815             : #ifndef METH_METHOD
     816             :   #define METH_METHOD 0x200
     817             : #endif
     818             : #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
     819             :   #define PyObject_Malloc(s)   PyMem_Malloc(s)
     820             :   #define PyObject_Free(p)     PyMem_Free(p)
     821             :   #define PyObject_Realloc(p)  PyMem_Realloc(p)
     822             : #endif
     823             : #if CYTHON_COMPILING_IN_LIMITED_API
     824             :   #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
     825             :   #define __Pyx_PyFrame_SetLineNumber(frame, lineno)
     826             : #else
     827             :   #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
     828             :   #define __Pyx_PyFrame_SetLineNumber(frame, lineno)  (frame)->f_lineno = (lineno)
     829             : #endif
     830             : #if CYTHON_COMPILING_IN_LIMITED_API
     831             :   #define __Pyx_PyThreadState_Current PyThreadState_Get()
     832             : #elif !CYTHON_FAST_THREAD_STATE
     833             :   #define __Pyx_PyThreadState_Current PyThreadState_GET()
     834             : #elif PY_VERSION_HEX >= 0x030d00A1
     835             :   #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked()
     836             : #elif PY_VERSION_HEX >= 0x03060000
     837             :   #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
     838             : #elif PY_VERSION_HEX >= 0x03000000
     839             :   #define __Pyx_PyThreadState_Current PyThreadState_GET()
     840             : #else
     841             :   #define __Pyx_PyThreadState_Current _PyThreadState_Current
     842             : #endif
     843             : #if CYTHON_COMPILING_IN_LIMITED_API
     844             : static CYTHON_INLINE void *__Pyx_PyModule_GetState(PyObject *op)
     845             : {
     846             :     void *result;
     847             :     result = PyModule_GetState(op);
     848             :     if (!result)
     849             :         Py_FatalError("Couldn't find the module state");
     850             :     return result;
     851             : }
     852             : #endif
     853             : #define __Pyx_PyObject_GetSlot(obj, name, func_ctype)  __Pyx_PyType_GetSlot(Py_TYPE(obj), name, func_ctype)
     854             : #if CYTHON_COMPILING_IN_LIMITED_API
     855             :   #define __Pyx_PyType_GetSlot(type, name, func_ctype)  ((func_ctype) PyType_GetSlot((type), Py_##name))
     856             : #else
     857             :   #define __Pyx_PyType_GetSlot(type, name, func_ctype)  ((type)->name)
     858             : #endif
     859             : #if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
     860             : #include "pythread.h"
     861             : #define Py_tss_NEEDS_INIT 0
     862             : typedef int Py_tss_t;
     863             : static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
     864             :   *key = PyThread_create_key();
     865             :   return 0;
     866             : }
     867             : static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
     868             :   Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
     869             :   *key = Py_tss_NEEDS_INIT;
     870             :   return key;
     871             : }
     872             : static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
     873             :   PyObject_Free(key);
     874             : }
     875             : static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
     876             :   return *key != Py_tss_NEEDS_INIT;
     877             : }
     878             : static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
     879             :   PyThread_delete_key(*key);
     880             :   *key = Py_tss_NEEDS_INIT;
     881             : }
     882             : static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
     883             :   return PyThread_set_key_value(*key, value);
     884             : }
     885             : static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
     886             :   return PyThread_get_key_value(*key);
     887             : }
     888             : #endif
     889             : #if PY_MAJOR_VERSION < 3
     890             :     #if CYTHON_COMPILING_IN_PYPY
     891             :         #if PYPY_VERSION_NUM < 0x07030600
     892             :             #if defined(__cplusplus) && __cplusplus >= 201402L
     893             :                 [[deprecated("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6")]]
     894             :             #elif defined(__GNUC__) || defined(__clang__)
     895             :                 __attribute__ ((__deprecated__("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6")))
     896             :             #elif defined(_MSC_VER)
     897             :                 __declspec(deprecated("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6"))
     898             :             #endif
     899             :             static CYTHON_INLINE int PyGILState_Check(void) {
     900             :                 return 0;
     901             :             }
     902             :         #else  // PYPY_VERSION_NUM < 0x07030600
     903             :         #endif  // PYPY_VERSION_NUM < 0x07030600
     904             :     #else
     905             :         static CYTHON_INLINE int PyGILState_Check(void) {
     906             :             PyThreadState * tstate = _PyThreadState_Current;
     907             :             return tstate && (tstate == PyGILState_GetThisThreadState());
     908             :         }
     909             :     #endif
     910             : #endif
     911             : #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000 || defined(_PyDict_NewPresized)
     912             : #define __Pyx_PyDict_NewPresized(n)  ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
     913             : #else
     914             : #define __Pyx_PyDict_NewPresized(n)  PyDict_New()
     915             : #endif
     916             : #if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
     917             :   #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
     918             :   #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
     919             : #else
     920             :   #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
     921             :   #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
     922             : #endif
     923             : #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX > 0x030600B4 && PY_VERSION_HEX < 0x030d0000 && CYTHON_USE_UNICODE_INTERNALS
     924             : #define __Pyx_PyDict_GetItemStrWithError(dict, name)  _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
     925          25 : static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) {
     926          25 :     PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name);
     927          25 :     if (res == NULL) PyErr_Clear();
     928          25 :     return res;
     929             : }
     930             : #elif PY_MAJOR_VERSION >= 3 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000)
     931             : #define __Pyx_PyDict_GetItemStrWithError  PyDict_GetItemWithError
     932             : #define __Pyx_PyDict_GetItemStr           PyDict_GetItem
     933             : #else
     934             : static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) {
     935             : #if CYTHON_COMPILING_IN_PYPY
     936             :     return PyDict_GetItem(dict, name);
     937             : #else
     938             :     PyDictEntry *ep;
     939             :     PyDictObject *mp = (PyDictObject*) dict;
     940             :     long hash = ((PyStringObject *) name)->ob_shash;
     941             :     assert(hash != -1);
     942             :     ep = (mp->ma_lookup)(mp, name, hash);
     943             :     if (ep == NULL) {
     944             :         return NULL;
     945             :     }
     946             :     return ep->me_value;
     947             : #endif
     948             : }
     949             : #define __Pyx_PyDict_GetItemStr           PyDict_GetItem
     950             : #endif
     951             : #if CYTHON_USE_TYPE_SLOTS
     952             :   #define __Pyx_PyType_GetFlags(tp)   (((PyTypeObject *)tp)->tp_flags)
     953             :   #define __Pyx_PyType_HasFeature(type, feature)  ((__Pyx_PyType_GetFlags(type) & (feature)) != 0)
     954             :   #define __Pyx_PyObject_GetIterNextFunc(obj)  (Py_TYPE(obj)->tp_iternext)
     955             : #else
     956             :   #define __Pyx_PyType_GetFlags(tp)   (PyType_GetFlags((PyTypeObject *)tp))
     957             :   #define __Pyx_PyType_HasFeature(type, feature)  PyType_HasFeature(type, feature)
     958             :   #define __Pyx_PyObject_GetIterNextFunc(obj)  PyIter_Next
     959             : #endif
     960             : #if CYTHON_COMPILING_IN_LIMITED_API
     961             :   #define __Pyx_SetItemOnTypeDict(tp, k, v) PyObject_GenericSetAttr((PyObject*)tp, k, v)
     962             : #else
     963             :   #define __Pyx_SetItemOnTypeDict(tp, k, v) PyDict_SetItem(tp->tp_dict, k, v)
     964             : #endif
     965             : #if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX >= 0x03080000
     966             : #define __Pyx_PyHeapTypeObject_GC_Del(obj)  {\
     967             :     PyTypeObject *type = Py_TYPE((PyObject*)obj);\
     968             :     assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\
     969             :     PyObject_GC_Del(obj);\
     970             :     Py_DECREF(type);\
     971             : }
     972             : #else
     973             : #define __Pyx_PyHeapTypeObject_GC_Del(obj)  PyObject_GC_Del(obj)
     974             : #endif
     975             : #if CYTHON_COMPILING_IN_LIMITED_API
     976             :   #define CYTHON_PEP393_ENABLED 1
     977             :   #define __Pyx_PyUnicode_READY(op)       (0)
     978             :   #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GetLength(u)
     979             :   #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i)
     980             :   #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   ((void)u, 1114111U)
     981             :   #define __Pyx_PyUnicode_KIND(u)         ((void)u, (0))
     982             :   #define __Pyx_PyUnicode_DATA(u)         ((void*)u)
     983             :   #define __Pyx_PyUnicode_READ(k, d, i)   ((void)k, PyUnicode_ReadChar((PyObject*)(d), i))
     984             :   #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GetLength(u))
     985             : #elif PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
     986             :   #define CYTHON_PEP393_ENABLED 1
     987             :   #if PY_VERSION_HEX >= 0x030C0000
     988             :     #define __Pyx_PyUnicode_READY(op)       (0)
     989             :   #else
     990             :     #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ?\
     991             :                                                 0 : _PyUnicode_Ready((PyObject *)(op)))
     992             :   #endif
     993             :   #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_LENGTH(u)
     994             :   #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
     995             :   #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   PyUnicode_MAX_CHAR_VALUE(u)
     996             :   #define __Pyx_PyUnicode_KIND(u)         ((int)PyUnicode_KIND(u))
     997             :   #define __Pyx_PyUnicode_DATA(u)         PyUnicode_DATA(u)
     998             :   #define __Pyx_PyUnicode_READ(k, d, i)   PyUnicode_READ(k, d, i)
     999             :   #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  PyUnicode_WRITE(k, d, i, (Py_UCS4) ch)
    1000             :   #if PY_VERSION_HEX >= 0x030C0000
    1001             :     #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_LENGTH(u))
    1002             :   #else
    1003             :     #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000
    1004             :     #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length))
    1005             :     #else
    1006             :     #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
    1007             :     #endif
    1008             :   #endif
    1009             : #else
    1010             :   #define CYTHON_PEP393_ENABLED 0
    1011             :   #define PyUnicode_1BYTE_KIND  1
    1012             :   #define PyUnicode_2BYTE_KIND  2
    1013             :   #define PyUnicode_4BYTE_KIND  4
    1014             :   #define __Pyx_PyUnicode_READY(op)       (0)
    1015             :   #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_SIZE(u)
    1016             :   #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
    1017             :   #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   ((sizeof(Py_UNICODE) == 2) ? 65535U : 1114111U)
    1018             :   #define __Pyx_PyUnicode_KIND(u)         ((int)sizeof(Py_UNICODE))
    1019             :   #define __Pyx_PyUnicode_DATA(u)         ((void*)PyUnicode_AS_UNICODE(u))
    1020             :   #define __Pyx_PyUnicode_READ(k, d, i)   ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
    1021             :   #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  (((void)(k)), ((Py_UNICODE*)d)[i] = (Py_UNICODE) ch)
    1022             :   #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_SIZE(u))
    1023             : #endif
    1024             : #if CYTHON_COMPILING_IN_PYPY
    1025             :   #define __Pyx_PyUnicode_Concat(a, b)      PyNumber_Add(a, b)
    1026             :   #define __Pyx_PyUnicode_ConcatSafe(a, b)  PyNumber_Add(a, b)
    1027             : #else
    1028             :   #define __Pyx_PyUnicode_Concat(a, b)      PyUnicode_Concat(a, b)
    1029             :   #define __Pyx_PyUnicode_ConcatSafe(a, b)  ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
    1030             :       PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
    1031             : #endif
    1032             : #if CYTHON_COMPILING_IN_PYPY
    1033             :   #if !defined(PyUnicode_DecodeUnicodeEscape)
    1034             :     #define PyUnicode_DecodeUnicodeEscape(s, size, errors)  PyUnicode_Decode(s, size, "unicode_escape", errors)
    1035             :   #endif
    1036             :   #if !defined(PyUnicode_Contains) || (PY_MAJOR_VERSION == 2 && PYPY_VERSION_NUM < 0x07030500)
    1037             :     #undef PyUnicode_Contains
    1038             :     #define PyUnicode_Contains(u, s)  PySequence_Contains(u, s)
    1039             :   #endif
    1040             :   #if !defined(PyByteArray_Check)
    1041             :     #define PyByteArray_Check(obj)  PyObject_TypeCheck(obj, &PyByteArray_Type)
    1042             :   #endif
    1043             :   #if !defined(PyObject_Format)
    1044             :     #define PyObject_Format(obj, fmt)  PyObject_CallMethod(obj, "__format__", "O", fmt)
    1045             :   #endif
    1046             : #endif
    1047             : #define __Pyx_PyString_FormatSafe(a, b)   ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
    1048             : #define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
    1049             : #if PY_MAJOR_VERSION >= 3
    1050             :   #define __Pyx_PyString_Format(a, b)  PyUnicode_Format(a, b)
    1051             : #else
    1052             :   #define __Pyx_PyString_Format(a, b)  PyString_Format(a, b)
    1053             : #endif
    1054             : #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
    1055             :   #define PyObject_ASCII(o)            PyObject_Repr(o)
    1056             : #endif
    1057             : #if PY_MAJOR_VERSION >= 3
    1058             :   #define PyBaseString_Type            PyUnicode_Type
    1059             :   #define PyStringObject               PyUnicodeObject
    1060             :   #define PyString_Type                PyUnicode_Type
    1061             :   #define PyString_Check               PyUnicode_Check
    1062             :   #define PyString_CheckExact          PyUnicode_CheckExact
    1063             : #ifndef PyObject_Unicode
    1064             :   #define PyObject_Unicode             PyObject_Str
    1065             : #endif
    1066             : #endif
    1067             : #if PY_MAJOR_VERSION >= 3
    1068             :   #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
    1069             :   #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
    1070             : #else
    1071             :   #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
    1072             :   #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
    1073             : #endif
    1074             : #if CYTHON_COMPILING_IN_CPYTHON
    1075             :   #define __Pyx_PySequence_ListKeepNew(obj)\
    1076             :     (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj))
    1077             : #else
    1078             :   #define __Pyx_PySequence_ListKeepNew(obj)  PySequence_List(obj)
    1079             : #endif
    1080             : #ifndef PySet_CheckExact
    1081             :   #define PySet_CheckExact(obj)        __Pyx_IS_TYPE(obj, &PySet_Type)
    1082             : #endif
    1083             : #if PY_VERSION_HEX >= 0x030900A4
    1084             :   #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt)
    1085             :   #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size)
    1086             : #else
    1087             :   #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt)
    1088             :   #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)
    1089             : #endif
    1090             : #if CYTHON_ASSUME_SAFE_MACROS
    1091             :   #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i)
    1092             :   #define __Pyx_PySequence_SIZE(seq)  Py_SIZE(seq)
    1093             :   #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0))
    1094             :   #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0))
    1095             :   #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o)
    1096             :   #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o)
    1097             :   #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o)
    1098             :   #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o)
    1099             :   #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o)
    1100             : #else
    1101             :   #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i)
    1102             :   #define __Pyx_PySequence_SIZE(seq)  PySequence_Size(seq)
    1103             :   #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v)
    1104             :   #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v)
    1105             :   #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o)
    1106             :   #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o)
    1107             :   #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o)
    1108             :   #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o)
    1109             :   #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o)
    1110             : #endif
    1111             : #if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1
    1112             :   #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name)
    1113             : #else
    1114          12 :   static CYTHON_INLINE PyObject *__Pyx_PyImport_AddModuleRef(const char *name) {
    1115          12 :       PyObject *module = PyImport_AddModule(name);
    1116          12 :       Py_XINCREF(module);
    1117          12 :       return module;
    1118             :   }
    1119             : #endif
    1120             : #if PY_MAJOR_VERSION >= 3
    1121             :   #define PyIntObject                  PyLongObject
    1122             :   #define PyInt_Type                   PyLong_Type
    1123             :   #define PyInt_Check(op)              PyLong_Check(op)
    1124             :   #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
    1125             :   #define __Pyx_Py3Int_Check(op)       PyLong_Check(op)
    1126             :   #define __Pyx_Py3Int_CheckExact(op)  PyLong_CheckExact(op)
    1127             :   #define PyInt_FromString             PyLong_FromString
    1128             :   #define PyInt_FromUnicode            PyLong_FromUnicode
    1129             :   #define PyInt_FromLong               PyLong_FromLong
    1130             :   #define PyInt_FromSize_t             PyLong_FromSize_t
    1131             :   #define PyInt_FromSsize_t            PyLong_FromSsize_t
    1132             :   #define PyInt_AsLong                 PyLong_AsLong
    1133             :   #define PyInt_AS_LONG                PyLong_AS_LONG
    1134             :   #define PyInt_AsSsize_t              PyLong_AsSsize_t
    1135             :   #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
    1136             :   #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
    1137             :   #define PyNumber_Int                 PyNumber_Long
    1138             : #else
    1139             :   #define __Pyx_Py3Int_Check(op)       (PyLong_Check(op) || PyInt_Check(op))
    1140             :   #define __Pyx_Py3Int_CheckExact(op)  (PyLong_CheckExact(op) || PyInt_CheckExact(op))
    1141             : #endif
    1142             : #if PY_MAJOR_VERSION >= 3
    1143             :   #define PyBoolObject                 PyLongObject
    1144             : #endif
    1145             : #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
    1146             :   #ifndef PyUnicode_InternFromString
    1147             :     #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
    1148             :   #endif
    1149             : #endif
    1150             : #if PY_VERSION_HEX < 0x030200A4
    1151             :   typedef long Py_hash_t;
    1152             :   #define __Pyx_PyInt_FromHash_t PyInt_FromLong
    1153             :   #define __Pyx_PyInt_AsHash_t   __Pyx_PyIndex_AsHash_t
    1154             : #else
    1155             :   #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
    1156             :   #define __Pyx_PyInt_AsHash_t   __Pyx_PyIndex_AsSsize_t
    1157             : #endif
    1158             : #if CYTHON_USE_ASYNC_SLOTS
    1159             :   #if PY_VERSION_HEX >= 0x030500B1
    1160             :     #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
    1161             :     #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
    1162             :   #else
    1163             :     #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
    1164             :   #endif
    1165             : #else
    1166             :   #define __Pyx_PyType_AsAsync(obj) NULL
    1167             : #endif
    1168             : #ifndef __Pyx_PyAsyncMethodsStruct
    1169             :     typedef struct {
    1170             :         unaryfunc am_await;
    1171             :         unaryfunc am_aiter;
    1172             :         unaryfunc am_anext;
    1173             :     } __Pyx_PyAsyncMethodsStruct;
    1174             : #endif
    1175             : 
    1176             : #if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)
    1177             :   #if !defined(_USE_MATH_DEFINES)
    1178             :     #define _USE_MATH_DEFINES
    1179             :   #endif
    1180             : #endif
    1181             : #include <math.h>
    1182             : #ifdef NAN
    1183             : #define __PYX_NAN() ((float) NAN)
    1184             : #else
    1185             : static CYTHON_INLINE float __PYX_NAN() {
    1186             :   float value;
    1187             :   memset(&value, 0xFF, sizeof(value));
    1188             :   return value;
    1189             : }
    1190             : #endif
    1191             : #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
    1192             : #define __Pyx_truncl trunc
    1193             : #else
    1194             : #define __Pyx_truncl truncl
    1195             : #endif
    1196             : 
    1197             : #define __PYX_MARK_ERR_POS(f_index, lineno) \
    1198             :     { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__;  (void)__pyx_clineno; }
    1199             : #define __PYX_ERR(f_index, lineno, Ln_error) \
    1200             :     { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }
    1201             : 
    1202             : #ifdef CYTHON_EXTERN_C
    1203             :     #undef __PYX_EXTERN_C
    1204             :     #define __PYX_EXTERN_C CYTHON_EXTERN_C
    1205             : #elif defined(__PYX_EXTERN_C)
    1206             :     #ifdef _MSC_VER
    1207             :     #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.")
    1208             :     #else
    1209             :     #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.
    1210             :     #endif
    1211             : #else
    1212             :   #ifdef __cplusplus
    1213             :     #define __PYX_EXTERN_C extern "C"
    1214             :   #else
    1215             :     #define __PYX_EXTERN_C extern
    1216             :   #endif
    1217             : #endif
    1218             : 
    1219             : #define __PYX_HAVE__scipy__interpolate___interpnd
    1220             : #define __PYX_HAVE_API__scipy__interpolate___interpnd
    1221             : /* Early includes */
    1222             : #include <float.h>
    1223             : #include <math.h>
    1224             : #include "numpy/ndarrayobject.h"
    1225             : #include "pythread.h"
    1226             : #include <string.h>
    1227             : #include <stdlib.h>
    1228             : #ifdef _OPENMP
    1229             : #include <omp.h>
    1230             : #endif /* _OPENMP */
    1231             : 
    1232             : #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
    1233             : #define CYTHON_WITHOUT_ASSERTIONS
    1234             : #endif
    1235             : 
    1236             : typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
    1237             :                 const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
    1238             : 
    1239             : #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
    1240             : #define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
    1241             : #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
    1242             : #define __PYX_DEFAULT_STRING_ENCODING ""
    1243             : #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
    1244             : #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
    1245             : #define __Pyx_uchar_cast(c) ((unsigned char)c)
    1246             : #define __Pyx_long_cast(x) ((long)x)
    1247             : #define __Pyx_fits_Py_ssize_t(v, type, is_signed)  (\
    1248             :     (sizeof(type) < sizeof(Py_ssize_t))  ||\
    1249             :     (sizeof(type) > sizeof(Py_ssize_t) &&\
    1250             :           likely(v < (type)PY_SSIZE_T_MAX ||\
    1251             :                  v == (type)PY_SSIZE_T_MAX)  &&\
    1252             :           (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
    1253             :                                 v == (type)PY_SSIZE_T_MIN)))  ||\
    1254             :     (sizeof(type) == sizeof(Py_ssize_t) &&\
    1255             :           (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
    1256             :                                v == (type)PY_SSIZE_T_MAX)))  )
    1257       16173 : static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
    1258       16173 :     return (size_t) i < (size_t) limit;
    1259             : }
    1260             : #if defined (__cplusplus) && __cplusplus >= 201103L
    1261             :     #include <cstdlib>
    1262             :     #define __Pyx_sst_abs(value) std::abs(value)
    1263             : #elif SIZEOF_INT >= SIZEOF_SIZE_T
    1264             :     #define __Pyx_sst_abs(value) abs(value)
    1265             : #elif SIZEOF_LONG >= SIZEOF_SIZE_T
    1266             :     #define __Pyx_sst_abs(value) labs(value)
    1267             : #elif defined (_MSC_VER)
    1268             :     #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
    1269             : #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    1270             :     #define __Pyx_sst_abs(value) llabs(value)
    1271             : #elif defined (__GNUC__)
    1272             :     #define __Pyx_sst_abs(value) __builtin_llabs(value)
    1273             : #else
    1274             :     #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
    1275             : #endif
    1276             : static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s);
    1277             : static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
    1278             : static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
    1279             : static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*);
    1280             : #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
    1281             : #define __Pyx_PyBytes_FromString        PyBytes_FromString
    1282             : #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
    1283             : static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
    1284             : #if PY_MAJOR_VERSION < 3
    1285             :     #define __Pyx_PyStr_FromString        __Pyx_PyBytes_FromString
    1286             :     #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
    1287             : #else
    1288             :     #define __Pyx_PyStr_FromString        __Pyx_PyUnicode_FromString
    1289             :     #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
    1290             : #endif
    1291             : #define __Pyx_PyBytes_AsWritableString(s)     ((char*) PyBytes_AS_STRING(s))
    1292             : #define __Pyx_PyBytes_AsWritableSString(s)    ((signed char*) PyBytes_AS_STRING(s))
    1293             : #define __Pyx_PyBytes_AsWritableUString(s)    ((unsigned char*) PyBytes_AS_STRING(s))
    1294             : #define __Pyx_PyBytes_AsString(s)     ((const char*) PyBytes_AS_STRING(s))
    1295             : #define __Pyx_PyBytes_AsSString(s)    ((const signed char*) PyBytes_AS_STRING(s))
    1296             : #define __Pyx_PyBytes_AsUString(s)    ((const unsigned char*) PyBytes_AS_STRING(s))
    1297             : #define __Pyx_PyObject_AsWritableString(s)    ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
    1298             : #define __Pyx_PyObject_AsWritableSString(s)    ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
    1299             : #define __Pyx_PyObject_AsWritableUString(s)    ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
    1300             : #define __Pyx_PyObject_AsSString(s)    ((const signed char*) __Pyx_PyObject_AsString(s))
    1301             : #define __Pyx_PyObject_AsUString(s)    ((const unsigned char*) __Pyx_PyObject_AsString(s))
    1302             : #define __Pyx_PyObject_FromCString(s)  __Pyx_PyObject_FromString((const char*)s)
    1303             : #define __Pyx_PyBytes_FromCString(s)   __Pyx_PyBytes_FromString((const char*)s)
    1304             : #define __Pyx_PyByteArray_FromCString(s)   __Pyx_PyByteArray_FromString((const char*)s)
    1305             : #define __Pyx_PyStr_FromCString(s)     __Pyx_PyStr_FromString((const char*)s)
    1306             : #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
    1307             : #define __Pyx_PyUnicode_FromOrdinal(o)       PyUnicode_FromOrdinal((int)o)
    1308             : #define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
    1309             : #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
    1310             : #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
    1311             : static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
    1312             : static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
    1313             : static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
    1314             : static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
    1315             : #define __Pyx_PySequence_Tuple(obj)\
    1316             :     (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
    1317             : static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
    1318             : static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
    1319             : static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*);
    1320             : #if CYTHON_ASSUME_SAFE_MACROS
    1321             : #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
    1322             : #else
    1323             : #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
    1324             : #endif
    1325             : #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
    1326             : #if PY_MAJOR_VERSION >= 3
    1327             : #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
    1328             : #else
    1329             : #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
    1330             : #endif
    1331             : #if CYTHON_USE_PYLONG_INTERNALS
    1332             :   #if PY_VERSION_HEX >= 0x030C00A7
    1333             :   #ifndef _PyLong_SIGN_MASK
    1334             :     #define _PyLong_SIGN_MASK 3
    1335             :   #endif
    1336             :   #ifndef _PyLong_NON_SIZE_BITS
    1337             :     #define _PyLong_NON_SIZE_BITS 3
    1338             :   #endif
    1339             :   #define __Pyx_PyLong_Sign(x)  (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK)
    1340             :   #define __Pyx_PyLong_IsNeg(x)  ((__Pyx_PyLong_Sign(x) & 2) != 0)
    1341             :   #define __Pyx_PyLong_IsNonNeg(x)  (!__Pyx_PyLong_IsNeg(x))
    1342             :   #define __Pyx_PyLong_IsZero(x)  (__Pyx_PyLong_Sign(x) & 1)
    1343             :   #define __Pyx_PyLong_IsPos(x)  (__Pyx_PyLong_Sign(x) == 0)
    1344             :   #define __Pyx_PyLong_CompactValueUnsigned(x)  (__Pyx_PyLong_Digits(x)[0])
    1345             :   #define __Pyx_PyLong_DigitCount(x)  ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS))
    1346             :   #define __Pyx_PyLong_SignedDigitCount(x)\
    1347             :         ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x))
    1348             :   #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue)
    1349             :     #define __Pyx_PyLong_IsCompact(x)     PyUnstable_Long_IsCompact((PyLongObject*) x)
    1350             :     #define __Pyx_PyLong_CompactValue(x)  PyUnstable_Long_CompactValue((PyLongObject*) x)
    1351             :   #else
    1352             :     #define __Pyx_PyLong_IsCompact(x)     (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS))
    1353             :     #define __Pyx_PyLong_CompactValue(x)  ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0])
    1354             :   #endif
    1355             :   typedef Py_ssize_t  __Pyx_compact_pylong;
    1356             :   typedef size_t  __Pyx_compact_upylong;
    1357             :   #else
    1358             :   #define __Pyx_PyLong_IsNeg(x)  (Py_SIZE(x) < 0)
    1359             :   #define __Pyx_PyLong_IsNonNeg(x)  (Py_SIZE(x) >= 0)
    1360             :   #define __Pyx_PyLong_IsZero(x)  (Py_SIZE(x) == 0)
    1361             :   #define __Pyx_PyLong_IsPos(x)  (Py_SIZE(x) > 0)
    1362             :   #define __Pyx_PyLong_CompactValueUnsigned(x)  ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0])
    1363             :   #define __Pyx_PyLong_DigitCount(x)  __Pyx_sst_abs(Py_SIZE(x))
    1364             :   #define __Pyx_PyLong_SignedDigitCount(x)  Py_SIZE(x)
    1365             :   #define __Pyx_PyLong_IsCompact(x)  (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1)
    1366             :   #define __Pyx_PyLong_CompactValue(x)\
    1367             :         ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0]))
    1368             :   typedef sdigit  __Pyx_compact_pylong;
    1369             :   typedef digit  __Pyx_compact_upylong;
    1370             :   #endif
    1371             :   #if PY_VERSION_HEX >= 0x030C00A5
    1372             :   #define __Pyx_PyLong_Digits(x)  (((PyLongObject*)x)->long_value.ob_digit)
    1373             :   #else
    1374             :   #define __Pyx_PyLong_Digits(x)  (((PyLongObject*)x)->ob_digit)
    1375             :   #endif
    1376             : #endif
    1377             : #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    1378             : #include <string.h>
    1379             : static int __Pyx_sys_getdefaultencoding_not_ascii;
    1380             : static int __Pyx_init_sys_getdefaultencoding_params(void) {
    1381             :     PyObject* sys;
    1382             :     PyObject* default_encoding = NULL;
    1383             :     PyObject* ascii_chars_u = NULL;
    1384             :     PyObject* ascii_chars_b = NULL;
    1385             :     const char* default_encoding_c;
    1386             :     sys = PyImport_ImportModule("sys");
    1387             :     if (!sys) goto bad;
    1388             :     default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
    1389             :     Py_DECREF(sys);
    1390             :     if (!default_encoding) goto bad;
    1391             :     default_encoding_c = PyBytes_AsString(default_encoding);
    1392             :     if (!default_encoding_c) goto bad;
    1393             :     if (strcmp(default_encoding_c, "ascii") == 0) {
    1394             :         __Pyx_sys_getdefaultencoding_not_ascii = 0;
    1395             :     } else {
    1396             :         char ascii_chars[128];
    1397             :         int c;
    1398             :         for (c = 0; c < 128; c++) {
    1399             :             ascii_chars[c] = (char) c;
    1400             :         }
    1401             :         __Pyx_sys_getdefaultencoding_not_ascii = 1;
    1402             :         ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
    1403             :         if (!ascii_chars_u) goto bad;
    1404             :         ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
    1405             :         if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
    1406             :             PyErr_Format(
    1407             :                 PyExc_ValueError,
    1408             :                 "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
    1409             :                 default_encoding_c);
    1410             :             goto bad;
    1411             :         }
    1412             :         Py_DECREF(ascii_chars_u);
    1413             :         Py_DECREF(ascii_chars_b);
    1414             :     }
    1415             :     Py_DECREF(default_encoding);
    1416             :     return 0;
    1417             : bad:
    1418             :     Py_XDECREF(default_encoding);
    1419             :     Py_XDECREF(ascii_chars_u);
    1420             :     Py_XDECREF(ascii_chars_b);
    1421             :     return -1;
    1422             : }
    1423             : #endif
    1424             : #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
    1425             : #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
    1426             : #else
    1427             : #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
    1428             : #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
    1429             : #include <string.h>
    1430             : static char* __PYX_DEFAULT_STRING_ENCODING;
    1431             : static int __Pyx_init_sys_getdefaultencoding_params(void) {
    1432             :     PyObject* sys;
    1433             :     PyObject* default_encoding = NULL;
    1434             :     char* default_encoding_c;
    1435             :     sys = PyImport_ImportModule("sys");
    1436             :     if (!sys) goto bad;
    1437             :     default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
    1438             :     Py_DECREF(sys);
    1439             :     if (!default_encoding) goto bad;
    1440             :     default_encoding_c = PyBytes_AsString(default_encoding);
    1441             :     if (!default_encoding_c) goto bad;
    1442             :     __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
    1443             :     if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
    1444             :     strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
    1445             :     Py_DECREF(default_encoding);
    1446             :     return 0;
    1447             : bad:
    1448             :     Py_XDECREF(default_encoding);
    1449             :     return -1;
    1450             : }
    1451             : #endif
    1452             : #endif
    1453             : 
    1454             : 
    1455             : /* Test for GCC > 2.95 */
    1456             : #if defined(__GNUC__)     && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
    1457             :   #define likely(x)   __builtin_expect(!!(x), 1)
    1458             :   #define unlikely(x) __builtin_expect(!!(x), 0)
    1459             : #else /* !__GNUC__ or GCC < 2.95 */
    1460             :   #define likely(x)   (x)
    1461             :   #define unlikely(x) (x)
    1462             : #endif /* __GNUC__ */
    1463             : static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
    1464             : 
    1465             : #if !CYTHON_USE_MODULE_STATE
    1466             : static PyObject *__pyx_m = NULL;
    1467             : #endif
    1468             : static int __pyx_lineno;
    1469             : static int __pyx_clineno = 0;
    1470             : static const char * __pyx_cfilenm = __FILE__;
    1471             : static const char *__pyx_filename;
    1472             : 
    1473             : /* Header.proto */
    1474             : #if !defined(CYTHON_CCOMPLEX)
    1475             :   #if defined(__cplusplus)
    1476             :     #define CYTHON_CCOMPLEX 1
    1477             :   #elif (defined(_Complex_I) && !defined(_MSC_VER)) || ((defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) && !defined(__STDC_NO_COMPLEX__) && !defined(_MSC_VER))
    1478             :     #define CYTHON_CCOMPLEX 1
    1479             :   #else
    1480             :     #define CYTHON_CCOMPLEX 0
    1481             :   #endif
    1482             : #endif
    1483             : #if CYTHON_CCOMPLEX
    1484             :   #ifdef __cplusplus
    1485             :     #include <complex>
    1486             :   #else
    1487             :     #include <complex.h>
    1488             :   #endif
    1489             : #endif
    1490             : #if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__)
    1491             :   #undef _Complex_I
    1492             :   #define _Complex_I 1.0fj
    1493             : #endif
    1494             : 
    1495             : /* #### Code section: filename_table ### */
    1496             : 
    1497             : static const char *__pyx_f[] = {
    1498             :   "_interpnd.pyx",
    1499             :   "<stringsource>",
    1500             : };
    1501             : /* #### Code section: utility_code_proto_before_types ### */
    1502             : /* ForceInitThreads.proto */
    1503             : #ifndef __PYX_FORCE_INIT_THREADS
    1504             :   #define __PYX_FORCE_INIT_THREADS 0
    1505             : #endif
    1506             : 
    1507             : /* NoFastGil.proto */
    1508             : #define __Pyx_PyGILState_Ensure PyGILState_Ensure
    1509             : #define __Pyx_PyGILState_Release PyGILState_Release
    1510             : #define __Pyx_FastGIL_Remember()
    1511             : #define __Pyx_FastGIL_Forget()
    1512             : #define __Pyx_FastGilFuncInit()
    1513             : 
    1514             : /* BufferFormatStructs.proto */
    1515             : struct __Pyx_StructField_;
    1516             : #define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0)
    1517             : typedef struct {
    1518             :   const char* name;
    1519             :   struct __Pyx_StructField_* fields;
    1520             :   size_t size;
    1521             :   size_t arraysize[8];
    1522             :   int ndim;
    1523             :   char typegroup;
    1524             :   char is_unsigned;
    1525             :   int flags;
    1526             : } __Pyx_TypeInfo;
    1527             : typedef struct __Pyx_StructField_ {
    1528             :   __Pyx_TypeInfo* type;
    1529             :   const char* name;
    1530             :   size_t offset;
    1531             : } __Pyx_StructField;
    1532             : typedef struct {
    1533             :   __Pyx_StructField* field;
    1534             :   size_t parent_offset;
    1535             : } __Pyx_BufFmt_StackElem;
    1536             : typedef struct {
    1537             :   __Pyx_StructField root;
    1538             :   __Pyx_BufFmt_StackElem* head;
    1539             :   size_t fmt_offset;
    1540             :   size_t new_count, enc_count;
    1541             :   size_t struct_alignment;
    1542             :   int is_complex;
    1543             :   char enc_type;
    1544             :   char new_packmode;
    1545             :   char enc_packmode;
    1546             :   char is_valid_array;
    1547             : } __Pyx_BufFmt_Context;
    1548             : 
    1549             : /* Atomics.proto */
    1550             : #include <pythread.h>
    1551             : #ifndef CYTHON_ATOMICS
    1552             :     #define CYTHON_ATOMICS 1
    1553             : #endif
    1554             : #define __PYX_CYTHON_ATOMICS_ENABLED() CYTHON_ATOMICS
    1555             : #define __pyx_atomic_int_type int
    1556             : #define __pyx_nonatomic_int_type int
    1557             : #if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\
    1558             :                         (__STDC_VERSION__ >= 201112L) &&\
    1559             :                         !defined(__STDC_NO_ATOMICS__))
    1560             :     #include <stdatomic.h>
    1561             : #elif CYTHON_ATOMICS && (defined(__cplusplus) && (\
    1562             :                     (__cplusplus >= 201103L) ||\
    1563             :                     (defined(_MSC_VER) && _MSC_VER >= 1700)))
    1564             :     #include <atomic>
    1565             : #endif
    1566             : #if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\
    1567             :                         (__STDC_VERSION__ >= 201112L) &&\
    1568             :                         !defined(__STDC_NO_ATOMICS__) &&\
    1569             :                        ATOMIC_INT_LOCK_FREE == 2)
    1570             :     #undef __pyx_atomic_int_type
    1571             :     #define __pyx_atomic_int_type atomic_int
    1572             :     #define __pyx_atomic_incr_aligned(value) atomic_fetch_add_explicit(value, 1, memory_order_relaxed)
    1573             :     #define __pyx_atomic_decr_aligned(value) atomic_fetch_sub_explicit(value, 1, memory_order_acq_rel)
    1574             :     #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER)
    1575             :         #pragma message ("Using standard C atomics")
    1576             :     #elif defined(__PYX_DEBUG_ATOMICS)
    1577             :         #warning "Using standard C atomics"
    1578             :     #endif
    1579             : #elif CYTHON_ATOMICS && (defined(__cplusplus) && (\
    1580             :                     (__cplusplus >= 201103L) ||\
    1581             : \
    1582             :                     (defined(_MSC_VER) && _MSC_VER >= 1700)) &&\
    1583             :                     ATOMIC_INT_LOCK_FREE == 2)
    1584             :     #undef __pyx_atomic_int_type
    1585             :     #define __pyx_atomic_int_type std::atomic_int
    1586             :     #define __pyx_atomic_incr_aligned(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_relaxed)
    1587             :     #define __pyx_atomic_decr_aligned(value) std::atomic_fetch_sub_explicit(value, 1, std::memory_order_acq_rel)
    1588             :     #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER)
    1589             :         #pragma message ("Using standard C++ atomics")
    1590             :     #elif defined(__PYX_DEBUG_ATOMICS)
    1591             :         #warning "Using standard C++ atomics"
    1592             :     #endif
    1593             : #elif CYTHON_ATOMICS && (__GNUC__ >= 5 || (__GNUC__ == 4 &&\
    1594             :                     (__GNUC_MINOR__ > 1 ||\
    1595             :                     (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 2))))
    1596             :     #define __pyx_atomic_incr_aligned(value) __sync_fetch_and_add(value, 1)
    1597             :     #define __pyx_atomic_decr_aligned(value) __sync_fetch_and_sub(value, 1)
    1598             :     #ifdef __PYX_DEBUG_ATOMICS
    1599             :         #warning "Using GNU atomics"
    1600             :     #endif
    1601             : #elif CYTHON_ATOMICS && defined(_MSC_VER)
    1602             :     #include <intrin.h>
    1603             :     #undef __pyx_atomic_int_type
    1604             :     #define __pyx_atomic_int_type long
    1605             :     #undef __pyx_nonatomic_int_type
    1606             :     #define __pyx_nonatomic_int_type long
    1607             :     #pragma intrinsic (_InterlockedExchangeAdd)
    1608             :     #define __pyx_atomic_incr_aligned(value) _InterlockedExchangeAdd(value, 1)
    1609             :     #define __pyx_atomic_decr_aligned(value) _InterlockedExchangeAdd(value, -1)
    1610             :     #ifdef __PYX_DEBUG_ATOMICS
    1611             :         #pragma message ("Using MSVC atomics")
    1612             :     #endif
    1613             : #else
    1614             :     #undef CYTHON_ATOMICS
    1615             :     #define CYTHON_ATOMICS 0
    1616             :     #ifdef __PYX_DEBUG_ATOMICS
    1617             :         #warning "Not using atomics"
    1618             :     #endif
    1619             : #endif
    1620             : #if CYTHON_ATOMICS
    1621             :     #define __pyx_add_acquisition_count(memview)\
    1622             :              __pyx_atomic_incr_aligned(__pyx_get_slice_count_pointer(memview))
    1623             :     #define __pyx_sub_acquisition_count(memview)\
    1624             :             __pyx_atomic_decr_aligned(__pyx_get_slice_count_pointer(memview))
    1625             : #else
    1626             :     #define __pyx_add_acquisition_count(memview)\
    1627             :             __pyx_add_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock)
    1628             :     #define __pyx_sub_acquisition_count(memview)\
    1629             :             __pyx_sub_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock)
    1630             : #endif
    1631             : 
    1632             : /* MemviewSliceStruct.proto */
    1633             : struct __pyx_memoryview_obj;
    1634             : typedef struct {
    1635             :   struct __pyx_memoryview_obj *memview;
    1636             :   char *data;
    1637             :   Py_ssize_t shape[8];
    1638             :   Py_ssize_t strides[8];
    1639             :   Py_ssize_t suboffsets[8];
    1640             : } __Pyx_memviewslice;
    1641             : #define __Pyx_MemoryView_Len(m)  (m.shape[0])
    1642             : 
    1643             : /* #### Code section: numeric_typedefs ### */
    1644             : /* #### Code section: complex_type_declarations ### */
    1645             : /* Declarations.proto */
    1646             : #if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
    1647             :   #ifdef __cplusplus
    1648             :     typedef ::std::complex< double > __pyx_t_double_complex;
    1649             :   #else
    1650             :     typedef double _Complex __pyx_t_double_complex;
    1651             :   #endif
    1652             : #else
    1653             :     typedef struct { double real, imag; } __pyx_t_double_complex;
    1654             : #endif
    1655             : static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double);
    1656             : 
    1657             : /* #### Code section: type_declarations ### */
    1658             : 
    1659             : /*--- Type declarations ---*/
    1660             : struct __pyx_array_obj;
    1661             : struct __pyx_MemviewEnum_obj;
    1662             : struct __pyx_memoryview_obj;
    1663             : struct __pyx_memoryviewslice_obj;
    1664             : struct __pyx_t_5scipy_7spatial_6_qhull_DelaunayInfo_t;
    1665             : typedef struct __pyx_t_5scipy_7spatial_6_qhull_DelaunayInfo_t __pyx_t_5scipy_7spatial_6_qhull_DelaunayInfo_t;
    1666             : 
    1667             : /* "scipy/spatial/_qhull.pxd":16
    1668             :  *         NPY_MAXDIMS
    1669             :  * 
    1670             :  * ctypedef struct DelaunayInfo_t:             # <<<<<<<<<<<<<<
    1671             :  *     int ndim
    1672             :  *     int npoints
    1673             :  */
    1674             : struct __pyx_t_5scipy_7spatial_6_qhull_DelaunayInfo_t {
    1675             :   int ndim;
    1676             :   int npoints;
    1677             :   int nsimplex;
    1678             :   double *points;
    1679             :   int *simplices;
    1680             :   int *neighbors;
    1681             :   double *equations;
    1682             :   double *transform;
    1683             :   int *vertex_to_simplex;
    1684             :   double paraboloid_scale;
    1685             :   double paraboloid_shift;
    1686             :   double *max_bound;
    1687             :   double *min_bound;
    1688             :   int *vertex_neighbors_indices;
    1689             :   int *vertex_neighbors_indptr;
    1690             : };
    1691             : struct __pyx_opt_args_5scipy_11interpolate_9_interpnd__ndim_coords_from_arrays;
    1692             : struct __pyx_opt_args_5scipy_11interpolate_9_interpnd__check_init_shape;
    1693             : struct __pyx_opt_args_5scipy_11interpolate_9_interpnd_estimate_gradients_2d_global;
    1694             : struct __pyx_defaults;
    1695             : typedef struct __pyx_defaults __pyx_defaults;
    1696             : struct __pyx_defaults1;
    1697             : typedef struct __pyx_defaults1 __pyx_defaults1;
    1698             : struct __pyx_defaults2;
    1699             : typedef struct __pyx_defaults2 __pyx_defaults2;
    1700             : struct __pyx_defaults3;
    1701             : typedef struct __pyx_defaults3 __pyx_defaults3;
    1702             : struct __pyx_defaults4;
    1703             : typedef struct __pyx_defaults4 __pyx_defaults4;
    1704             : struct __pyx_defaults5;
    1705             : typedef struct __pyx_defaults5 __pyx_defaults5;
    1706             : struct __pyx_defaults6;
    1707             : typedef struct __pyx_defaults6 __pyx_defaults6;
    1708             : 
    1709             : /* "scipy/interpolate/_interpnd.pyx":173
    1710             :  * 
    1711             :  * 
    1712             :  * cpdef _ndim_coords_from_arrays(points, ndim=None):             # <<<<<<<<<<<<<<
    1713             :  *     """
    1714             :  *     Convert a tuple of coordinate arrays to a (..., ndim)-shaped array.
    1715             :  */
    1716             : struct __pyx_opt_args_5scipy_11interpolate_9_interpnd__ndim_coords_from_arrays {
    1717             :   int __pyx_n;
    1718             :   PyObject *ndim;
    1719             : };
    1720             : 
    1721             : /* "scipy/interpolate/_interpnd.pyx":202
    1722             :  * 
    1723             :  * 
    1724             :  * cdef _check_init_shape(points, values, ndim=None):             # <<<<<<<<<<<<<<
    1725             :  *     """
    1726             :  *     Check shape of points and values arrays
    1727             :  */
    1728             : struct __pyx_opt_args_5scipy_11interpolate_9_interpnd__check_init_shape {
    1729             :   int __pyx_n;
    1730             :   PyObject *ndim;
    1731             : };
    1732             : 
    1733             : /* "scipy/interpolate/_interpnd.pyx":553
    1734             :  * @cython.boundscheck(False)
    1735             :  * @cython.wraparound(False)
    1736             :  * cpdef estimate_gradients_2d_global(tri, y, int maxiter=400, double tol=1e-6):             # <<<<<<<<<<<<<<
    1737             :  *     cdef const double[:,::1] data
    1738             :  *     cdef double[:,:,::1] grad
    1739             :  */
    1740             : struct __pyx_opt_args_5scipy_11interpolate_9_interpnd_estimate_gradients_2d_global {
    1741             :   int __pyx_n;
    1742             :   int maxiter;
    1743             :   double tol;
    1744             : };
    1745             : struct __pyx_defaults {
    1746             :   PyObject *__pyx_arg_fill_value;
    1747             : };
    1748             : struct __pyx_defaults1 {
    1749             :   PyObject *__pyx_arg_fill_value;
    1750             : };
    1751             : struct __pyx_defaults2 {
    1752             :   PyObject *__pyx_arg_fill_value;
    1753             : };
    1754             : struct __pyx_defaults3 {
    1755             :   PyObject *__pyx_arg__fused_sigindex;
    1756             : };
    1757             : struct __pyx_defaults4 {
    1758             :   PyObject *__pyx_arg_fill_value;
    1759             : };
    1760             : struct __pyx_defaults5 {
    1761             :   PyObject *__pyx_arg_fill_value;
    1762             : };
    1763             : struct __pyx_defaults6 {
    1764             :   PyObject *__pyx_arg__fused_sigindex;
    1765             : };
    1766             : 
    1767             : /* "View.MemoryView":114
    1768             :  * @cython.collection_type("sequence")
    1769             :  * @cname("__pyx_array")
    1770             :  * cdef class array:             # <<<<<<<<<<<<<<
    1771             :  * 
    1772             :  *     cdef:
    1773             :  */
    1774             : struct __pyx_array_obj {
    1775             :   PyObject_HEAD
    1776             :   struct __pyx_vtabstruct_array *__pyx_vtab;
    1777             :   char *data;
    1778             :   Py_ssize_t len;
    1779             :   char *format;
    1780             :   int ndim;
    1781             :   Py_ssize_t *_shape;
    1782             :   Py_ssize_t *_strides;
    1783             :   Py_ssize_t itemsize;
    1784             :   PyObject *mode;
    1785             :   PyObject *_format;
    1786             :   void (*callback_free_data)(void *);
    1787             :   int free_data;
    1788             :   int dtype_is_object;
    1789             : };
    1790             : 
    1791             : 
    1792             : /* "View.MemoryView":302
    1793             :  * 
    1794             :  * @cname('__pyx_MemviewEnum')
    1795             :  * cdef class Enum(object):             # <<<<<<<<<<<<<<
    1796             :  *     cdef object name
    1797             :  *     def __init__(self, name):
    1798             :  */
    1799             : struct __pyx_MemviewEnum_obj {
    1800             :   PyObject_HEAD
    1801             :   PyObject *name;
    1802             : };
    1803             : 
    1804             : 
    1805             : /* "View.MemoryView":337
    1806             :  * 
    1807             :  * @cname('__pyx_memoryview')
    1808             :  * cdef class memoryview:             # <<<<<<<<<<<<<<
    1809             :  * 
    1810             :  *     cdef object obj
    1811             :  */
    1812             : struct __pyx_memoryview_obj {
    1813             :   PyObject_HEAD
    1814             :   struct __pyx_vtabstruct_memoryview *__pyx_vtab;
    1815             :   PyObject *obj;
    1816             :   PyObject *_size;
    1817             :   PyObject *_array_interface;
    1818             :   PyThread_type_lock lock;
    1819             :   __pyx_atomic_int_type acquisition_count;
    1820             :   Py_buffer view;
    1821             :   int flags;
    1822             :   int dtype_is_object;
    1823             :   __Pyx_TypeInfo *typeinfo;
    1824             : };
    1825             : 
    1826             : 
    1827             : /* "View.MemoryView":952
    1828             :  * @cython.collection_type("sequence")
    1829             :  * @cname('__pyx_memoryviewslice')
    1830             :  * cdef class _memoryviewslice(memoryview):             # <<<<<<<<<<<<<<
    1831             :  *     "Internal class for passing memoryview slices to Python"
    1832             :  * 
    1833             :  */
    1834             : struct __pyx_memoryviewslice_obj {
    1835             :   struct __pyx_memoryview_obj __pyx_base;
    1836             :   __Pyx_memviewslice from_slice;
    1837             :   PyObject *from_object;
    1838             :   PyObject *(*to_object_func)(char *);
    1839             :   int (*to_dtype_func)(char *, PyObject *);
    1840             : };
    1841             : 
    1842             : 
    1843             : 
    1844             : /* "View.MemoryView":114
    1845             :  * @cython.collection_type("sequence")
    1846             :  * @cname("__pyx_array")
    1847             :  * cdef class array:             # <<<<<<<<<<<<<<
    1848             :  * 
    1849             :  *     cdef:
    1850             :  */
    1851             : 
    1852             : struct __pyx_vtabstruct_array {
    1853             :   PyObject *(*get_memview)(struct __pyx_array_obj *);
    1854             : };
    1855             : static struct __pyx_vtabstruct_array *__pyx_vtabptr_array;
    1856             : 
    1857             : 
    1858             : /* "View.MemoryView":337
    1859             :  * 
    1860             :  * @cname('__pyx_memoryview')
    1861             :  * cdef class memoryview:             # <<<<<<<<<<<<<<
    1862             :  * 
    1863             :  *     cdef object obj
    1864             :  */
    1865             : 
    1866             : struct __pyx_vtabstruct_memoryview {
    1867             :   char *(*get_item_pointer)(struct __pyx_memoryview_obj *, PyObject *);
    1868             :   PyObject *(*is_slice)(struct __pyx_memoryview_obj *, PyObject *);
    1869             :   PyObject *(*setitem_slice_assignment)(struct __pyx_memoryview_obj *, PyObject *, PyObject *);
    1870             :   PyObject *(*setitem_slice_assign_scalar)(struct __pyx_memoryview_obj *, struct __pyx_memoryview_obj *, PyObject *);
    1871             :   PyObject *(*setitem_indexed)(struct __pyx_memoryview_obj *, PyObject *, PyObject *);
    1872             :   PyObject *(*convert_item_to_object)(struct __pyx_memoryview_obj *, char *);
    1873             :   PyObject *(*assign_item_from_object)(struct __pyx_memoryview_obj *, char *, PyObject *);
    1874             :   PyObject *(*_get_base)(struct __pyx_memoryview_obj *);
    1875             : };
    1876             : static struct __pyx_vtabstruct_memoryview *__pyx_vtabptr_memoryview;
    1877             : 
    1878             : 
    1879             : /* "View.MemoryView":952
    1880             :  * @cython.collection_type("sequence")
    1881             :  * @cname('__pyx_memoryviewslice')
    1882             :  * cdef class _memoryviewslice(memoryview):             # <<<<<<<<<<<<<<
    1883             :  *     "Internal class for passing memoryview slices to Python"
    1884             :  * 
    1885             :  */
    1886             : 
    1887             : struct __pyx_vtabstruct__memoryviewslice {
    1888             :   struct __pyx_vtabstruct_memoryview __pyx_base;
    1889             : };
    1890             : static struct __pyx_vtabstruct__memoryviewslice *__pyx_vtabptr__memoryviewslice;
    1891             : /* #### Code section: utility_code_proto ### */
    1892             : 
    1893             : /* --- Runtime support code (head) --- */
    1894             : /* Refnanny.proto */
    1895             : #ifndef CYTHON_REFNANNY
    1896             :   #define CYTHON_REFNANNY 0
    1897             : #endif
    1898             : #if CYTHON_REFNANNY
    1899             :   typedef struct {
    1900             :     void (*INCREF)(void*, PyObject*, Py_ssize_t);
    1901             :     void (*DECREF)(void*, PyObject*, Py_ssize_t);
    1902             :     void (*GOTREF)(void*, PyObject*, Py_ssize_t);
    1903             :     void (*GIVEREF)(void*, PyObject*, Py_ssize_t);
    1904             :     void* (*SetupContext)(const char*, Py_ssize_t, const char*);
    1905             :     void (*FinishContext)(void**);
    1906             :   } __Pyx_RefNannyAPIStruct;
    1907             :   static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
    1908             :   static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
    1909             :   #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
    1910             : #ifdef WITH_THREAD
    1911             :   #define __Pyx_RefNannySetupContext(name, acquire_gil)\
    1912             :           if (acquire_gil) {\
    1913             :               PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
    1914             :               __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\
    1915             :               PyGILState_Release(__pyx_gilstate_save);\
    1916             :           } else {\
    1917             :               __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\
    1918             :           }
    1919             :   #define __Pyx_RefNannyFinishContextNogil() {\
    1920             :               PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
    1921             :               __Pyx_RefNannyFinishContext();\
    1922             :               PyGILState_Release(__pyx_gilstate_save);\
    1923             :           }
    1924             : #else
    1925             :   #define __Pyx_RefNannySetupContext(name, acquire_gil)\
    1926             :           __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__))
    1927             :   #define __Pyx_RefNannyFinishContextNogil() __Pyx_RefNannyFinishContext()
    1928             : #endif
    1929             :   #define __Pyx_RefNannyFinishContextNogil() {\
    1930             :               PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
    1931             :               __Pyx_RefNannyFinishContext();\
    1932             :               PyGILState_Release(__pyx_gilstate_save);\
    1933             :           }
    1934             :   #define __Pyx_RefNannyFinishContext()\
    1935             :           __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
    1936             :   #define __Pyx_INCREF(r)  __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
    1937             :   #define __Pyx_DECREF(r)  __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
    1938             :   #define __Pyx_GOTREF(r)  __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
    1939             :   #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
    1940             :   #define __Pyx_XINCREF(r)  do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0)
    1941             :   #define __Pyx_XDECREF(r)  do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0)
    1942             :   #define __Pyx_XGOTREF(r)  do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0)
    1943             :   #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0)
    1944             : #else
    1945             :   #define __Pyx_RefNannyDeclarations
    1946             :   #define __Pyx_RefNannySetupContext(name, acquire_gil)
    1947             :   #define __Pyx_RefNannyFinishContextNogil()
    1948             :   #define __Pyx_RefNannyFinishContext()
    1949             :   #define __Pyx_INCREF(r) Py_INCREF(r)
    1950             :   #define __Pyx_DECREF(r) Py_DECREF(r)
    1951             :   #define __Pyx_GOTREF(r)
    1952             :   #define __Pyx_GIVEREF(r)
    1953             :   #define __Pyx_XINCREF(r) Py_XINCREF(r)
    1954             :   #define __Pyx_XDECREF(r) Py_XDECREF(r)
    1955             :   #define __Pyx_XGOTREF(r)
    1956             :   #define __Pyx_XGIVEREF(r)
    1957             : #endif
    1958             : #define __Pyx_Py_XDECREF_SET(r, v) do {\
    1959             :         PyObject *tmp = (PyObject *) r;\
    1960             :         r = v; Py_XDECREF(tmp);\
    1961             :     } while (0)
    1962             : #define __Pyx_XDECREF_SET(r, v) do {\
    1963             :         PyObject *tmp = (PyObject *) r;\
    1964             :         r = v; __Pyx_XDECREF(tmp);\
    1965             :     } while (0)
    1966             : #define __Pyx_DECREF_SET(r, v) do {\
    1967             :         PyObject *tmp = (PyObject *) r;\
    1968             :         r = v; __Pyx_DECREF(tmp);\
    1969             :     } while (0)
    1970             : #define __Pyx_CLEAR(r)    do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
    1971             : #define __Pyx_XCLEAR(r)   do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
    1972             : 
    1973             : /* PyErrExceptionMatches.proto */
    1974             : #if CYTHON_FAST_THREAD_STATE
    1975             : #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
    1976             : static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
    1977             : #else
    1978             : #define __Pyx_PyErr_ExceptionMatches(err)  PyErr_ExceptionMatches(err)
    1979             : #endif
    1980             : 
    1981             : /* PyThreadStateGet.proto */
    1982             : #if CYTHON_FAST_THREAD_STATE
    1983             : #define __Pyx_PyThreadState_declare  PyThreadState *__pyx_tstate;
    1984             : #define __Pyx_PyThreadState_assign  __pyx_tstate = __Pyx_PyThreadState_Current;
    1985             : #if PY_VERSION_HEX >= 0x030C00A6
    1986             : #define __Pyx_PyErr_Occurred()  (__pyx_tstate->current_exception != NULL)
    1987             : #define __Pyx_PyErr_CurrentExceptionType()  (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL)
    1988             : #else
    1989             : #define __Pyx_PyErr_Occurred()  (__pyx_tstate->curexc_type != NULL)
    1990             : #define __Pyx_PyErr_CurrentExceptionType()  (__pyx_tstate->curexc_type)
    1991             : #endif
    1992             : #else
    1993             : #define __Pyx_PyThreadState_declare
    1994             : #define __Pyx_PyThreadState_assign
    1995             : #define __Pyx_PyErr_Occurred()  (PyErr_Occurred() != NULL)
    1996             : #define __Pyx_PyErr_CurrentExceptionType()  PyErr_Occurred()
    1997             : #endif
    1998             : 
    1999             : /* PyErrFetchRestore.proto */
    2000             : #if CYTHON_FAST_THREAD_STATE
    2001             : #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
    2002             : #define __Pyx_ErrRestoreWithState(type, value, tb)  __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
    2003             : #define __Pyx_ErrFetchWithState(type, value, tb)    __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
    2004             : #define __Pyx_ErrRestore(type, value, tb)  __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
    2005             : #define __Pyx_ErrFetch(type, value, tb)    __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
    2006             : static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
    2007             : static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
    2008             : #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6
    2009             : #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
    2010             : #else
    2011             : #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
    2012             : #endif
    2013             : #else
    2014             : #define __Pyx_PyErr_Clear() PyErr_Clear()
    2015             : #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
    2016             : #define __Pyx_ErrRestoreWithState(type, value, tb)  PyErr_Restore(type, value, tb)
    2017             : #define __Pyx_ErrFetchWithState(type, value, tb)  PyErr_Fetch(type, value, tb)
    2018             : #define __Pyx_ErrRestoreInState(tstate, type, value, tb)  PyErr_Restore(type, value, tb)
    2019             : #define __Pyx_ErrFetchInState(tstate, type, value, tb)  PyErr_Fetch(type, value, tb)
    2020             : #define __Pyx_ErrRestore(type, value, tb)  PyErr_Restore(type, value, tb)
    2021             : #define __Pyx_ErrFetch(type, value, tb)  PyErr_Fetch(type, value, tb)
    2022             : #endif
    2023             : 
    2024             : /* PyObjectGetAttrStr.proto */
    2025             : #if CYTHON_USE_TYPE_SLOTS
    2026             : static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
    2027             : #else
    2028             : #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
    2029             : #endif
    2030             : 
    2031             : /* PyObjectGetAttrStrNoError.proto */
    2032             : static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);
    2033             : 
    2034             : /* GetBuiltinName.proto */
    2035             : static PyObject *__Pyx_GetBuiltinName(PyObject *name);
    2036             : 
    2037             : /* TupleAndListFromArray.proto */
    2038             : #if CYTHON_COMPILING_IN_CPYTHON
    2039             : static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n);
    2040             : static CYTHON_INLINE PyObject* __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n);
    2041             : #endif
    2042             : 
    2043             : /* IncludeStringH.proto */
    2044             : #include <string.h>
    2045             : 
    2046             : /* BytesEquals.proto */
    2047             : static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);
    2048             : 
    2049             : /* UnicodeEquals.proto */
    2050             : static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);
    2051             : 
    2052             : /* fastcall.proto */
    2053             : #if CYTHON_AVOID_BORROWED_REFS
    2054             :     #define __Pyx_Arg_VARARGS(args, i) PySequence_GetItem(args, i)
    2055             : #elif CYTHON_ASSUME_SAFE_MACROS
    2056             :     #define __Pyx_Arg_VARARGS(args, i) PyTuple_GET_ITEM(args, i)
    2057             : #else
    2058             :     #define __Pyx_Arg_VARARGS(args, i) PyTuple_GetItem(args, i)
    2059             : #endif
    2060             : #if CYTHON_AVOID_BORROWED_REFS
    2061             :     #define __Pyx_Arg_NewRef_VARARGS(arg) __Pyx_NewRef(arg)
    2062             :     #define __Pyx_Arg_XDECREF_VARARGS(arg) Py_XDECREF(arg)
    2063             : #else
    2064             :     #define __Pyx_Arg_NewRef_VARARGS(arg) arg
    2065             :     #define __Pyx_Arg_XDECREF_VARARGS(arg)
    2066             : #endif
    2067             : #define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds)
    2068             : #define __Pyx_KwValues_VARARGS(args, nargs) NULL
    2069             : #define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s)
    2070             : #define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw)
    2071             : #if CYTHON_METH_FASTCALL
    2072             :     #define __Pyx_Arg_FASTCALL(args, i) args[i]
    2073             :     #define __Pyx_NumKwargs_FASTCALL(kwds) PyTuple_GET_SIZE(kwds)
    2074             :     #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs))
    2075             :     static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s);
    2076             : #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000
    2077             :     CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues);
    2078             :   #else
    2079             :     #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw)
    2080             :   #endif
    2081             :     #define __Pyx_Arg_NewRef_FASTCALL(arg) arg  /* no-op, __Pyx_Arg_FASTCALL is direct and this needs
    2082             :                                                    to have the same reference counting */
    2083             :     #define __Pyx_Arg_XDECREF_FASTCALL(arg)
    2084             : #else
    2085             :     #define __Pyx_Arg_FASTCALL __Pyx_Arg_VARARGS
    2086             :     #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS
    2087             :     #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS
    2088             :     #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS
    2089             :     #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS
    2090             :     #define __Pyx_Arg_NewRef_FASTCALL(arg) __Pyx_Arg_NewRef_VARARGS(arg)
    2091             :     #define __Pyx_Arg_XDECREF_FASTCALL(arg) __Pyx_Arg_XDECREF_VARARGS(arg)
    2092             : #endif
    2093             : #if CYTHON_COMPILING_IN_CPYTHON && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    2094             : #define __Pyx_ArgsSlice_VARARGS(args, start, stop) __Pyx_PyTuple_FromArray(&__Pyx_Arg_VARARGS(args, start), stop - start)
    2095             : #define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(&__Pyx_Arg_FASTCALL(args, start), stop - start)
    2096             : #else
    2097             : #define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop)
    2098             : #define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop)
    2099             : #endif
    2100             : 
    2101             : /* RaiseArgTupleInvalid.proto */
    2102             : static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
    2103             :     Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
    2104             : 
    2105             : /* RaiseDoubleKeywords.proto */
    2106             : static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
    2107             : 
    2108             : /* ParseKeywords.proto */
    2109             : static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject *const *kwvalues,
    2110             :     PyObject **argnames[],
    2111             :     PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,
    2112             :     const char* function_name);
    2113             : 
    2114             : /* ArgTypeTest.proto */
    2115             : #define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
    2116             :     ((likely(__Pyx_IS_TYPE(obj, type) | (none_allowed && (obj == Py_None)))) ? 1 :\
    2117             :         __Pyx__ArgTypeTest(obj, type, name, exact))
    2118             : static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);
    2119             : 
    2120             : /* RaiseException.proto */
    2121             : static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
    2122             : 
    2123             : /* PyFunctionFastCall.proto */
    2124             : #if CYTHON_FAST_PYCALL
    2125             : #if !CYTHON_VECTORCALL
    2126             : #define __Pyx_PyFunction_FastCall(func, args, nargs)\
    2127             :     __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
    2128             : static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs);
    2129             : #endif
    2130             : #define __Pyx_BUILD_ASSERT_EXPR(cond)\
    2131             :     (sizeof(char [1 - 2*!(cond)]) - 1)
    2132             : #ifndef Py_MEMBER_SIZE
    2133             : #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
    2134             : #endif
    2135             : #if !CYTHON_VECTORCALL
    2136             : #if PY_VERSION_HEX >= 0x03080000
    2137             :   #include "frameobject.h"
    2138             : #if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API
    2139             :   #ifndef Py_BUILD_CORE
    2140             :     #define Py_BUILD_CORE 1
    2141             :   #endif
    2142             :   #include "internal/pycore_frame.h"
    2143             : #endif
    2144             :   #define __Pxy_PyFrame_Initialize_Offsets()
    2145             :   #define __Pyx_PyFrame_GetLocalsplus(frame)  ((frame)->f_localsplus)
    2146             : #else
    2147             :   static size_t __pyx_pyframe_localsplus_offset = 0;
    2148             :   #include "frameobject.h"
    2149             :   #define __Pxy_PyFrame_Initialize_Offsets()\
    2150             :     ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
    2151             :      (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
    2152             :   #define __Pyx_PyFrame_GetLocalsplus(frame)\
    2153             :     (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
    2154             : #endif
    2155             : #endif
    2156             : #endif
    2157             : 
    2158             : /* PyObjectCall.proto */
    2159             : #if CYTHON_COMPILING_IN_CPYTHON
    2160             : static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
    2161             : #else
    2162             : #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
    2163             : #endif
    2164             : 
    2165             : /* PyObjectCallMethO.proto */
    2166             : #if CYTHON_COMPILING_IN_CPYTHON
    2167             : static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
    2168             : #endif
    2169             : 
    2170             : /* PyObjectFastCall.proto */
    2171             : #define __Pyx_PyObject_FastCall(func, args, nargs)  __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL)
    2172             : static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject **args, size_t nargs, PyObject *kwargs);
    2173             : 
    2174             : /* RaiseUnexpectedTypeError.proto */
    2175             : static int __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj);
    2176             : 
    2177             : /* GCCDiagnostics.proto */
    2178             : #if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
    2179             : #define __Pyx_HAS_GCC_DIAGNOSTIC
    2180             : #endif
    2181             : 
    2182             : /* BuildPyUnicode.proto */
    2183             : static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, char* chars, int clength,
    2184             :                                                 int prepend_sign, char padding_char);
    2185             : 
    2186             : /* CIntToPyUnicode.proto */
    2187             : static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char, char format_char);
    2188             : 
    2189             : /* CIntToPyUnicode.proto */
    2190             : static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char, char format_char);
    2191             : 
    2192             : /* JoinPyUnicode.proto */
    2193             : static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength,
    2194             :                                       Py_UCS4 max_char);
    2195             : 
    2196             : /* StrEquals.proto */
    2197             : #if PY_MAJOR_VERSION >= 3
    2198             : #define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
    2199             : #else
    2200             : #define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
    2201             : #endif
    2202             : 
    2203             : /* PyObjectFormatSimple.proto */
    2204             : #if CYTHON_COMPILING_IN_PYPY
    2205             :     #define __Pyx_PyObject_FormatSimple(s, f) (\
    2206             :         likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
    2207             :         PyObject_Format(s, f))
    2208             : #elif PY_MAJOR_VERSION < 3
    2209             :     #define __Pyx_PyObject_FormatSimple(s, f) (\
    2210             :         likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
    2211             :         likely(PyString_CheckExact(s)) ? PyUnicode_FromEncodedObject(s, NULL, "strict") :\
    2212             :         PyObject_Format(s, f))
    2213             : #elif CYTHON_USE_TYPE_SLOTS
    2214             :     #define __Pyx_PyObject_FormatSimple(s, f) (\
    2215             :         likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
    2216             :         likely(PyLong_CheckExact(s)) ? PyLong_Type.tp_repr(s) :\
    2217             :         likely(PyFloat_CheckExact(s)) ? PyFloat_Type.tp_repr(s) :\
    2218             :         PyObject_Format(s, f))
    2219             : #else
    2220             :     #define __Pyx_PyObject_FormatSimple(s, f) (\
    2221             :         likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
    2222             :         PyObject_Format(s, f))
    2223             : #endif
    2224             : 
    2225             : CYTHON_UNUSED static int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
    2226             : static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *); /*proto*/
    2227             : /* GetAttr.proto */
    2228             : static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);
    2229             : 
    2230             : /* GetItemInt.proto */
    2231             : #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    2232             :     (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    2233             :     __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
    2234             :     (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
    2235             :                __Pyx_GetItemInt_Generic(o, to_py_func(i))))
    2236             : #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    2237             :     (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    2238             :     __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
    2239             :     (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
    2240             : static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
    2241             :                                                               int wraparound, int boundscheck);
    2242             : #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    2243             :     (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    2244             :     __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
    2245             :     (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
    2246             : static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
    2247             :                                                               int wraparound, int boundscheck);
    2248             : static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
    2249             : static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
    2250             :                                                      int is_list, int wraparound, int boundscheck);
    2251             : 
    2252             : /* PyObjectCallOneArg.proto */
    2253             : static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
    2254             : 
    2255             : /* ObjectGetItem.proto */
    2256             : #if CYTHON_USE_TYPE_SLOTS
    2257             : static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key);
    2258             : #else
    2259             : #define __Pyx_PyObject_GetItem(obj, key)  PyObject_GetItem(obj, key)
    2260             : #endif
    2261             : 
    2262             : /* KeywordStringCheck.proto */
    2263             : static int __Pyx_CheckKeywordStrings(PyObject *kw, const char* function_name, int kw_allowed);
    2264             : 
    2265             : /* DivInt[Py_ssize_t].proto */
    2266             : static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t, Py_ssize_t);
    2267             : 
    2268             : /* UnaryNegOverflows.proto */
    2269             : #define __Pyx_UNARY_NEG_WOULD_OVERFLOW(x)\
    2270             :         (((x) < 0) & ((unsigned long)(x) == 0-(unsigned long)(x)))
    2271             : 
    2272             : /* GetAttr3.proto */
    2273             : static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *);
    2274             : 
    2275             : /* PyDictVersioning.proto */
    2276             : #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
    2277             : #define __PYX_DICT_VERSION_INIT  ((PY_UINT64_T) -1)
    2278             : #define __PYX_GET_DICT_VERSION(dict)  (((PyDictObject*)(dict))->ma_version_tag)
    2279             : #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
    2280             :     (version_var) = __PYX_GET_DICT_VERSION(dict);\
    2281             :     (cache_var) = (value);
    2282             : #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
    2283             :     static PY_UINT64_T __pyx_dict_version = 0;\
    2284             :     static PyObject *__pyx_dict_cached_value = NULL;\
    2285             :     if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
    2286             :         (VAR) = __pyx_dict_cached_value;\
    2287             :     } else {\
    2288             :         (VAR) = __pyx_dict_cached_value = (LOOKUP);\
    2289             :         __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
    2290             :     }\
    2291             : }
    2292             : static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
    2293             : static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
    2294             : static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
    2295             : #else
    2296             : #define __PYX_GET_DICT_VERSION(dict)  (0)
    2297             : #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
    2298             : #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP)  (VAR) = (LOOKUP);
    2299             : #endif
    2300             : 
    2301             : /* GetModuleGlobalName.proto */
    2302             : #if CYTHON_USE_DICT_VERSIONS
    2303             : #define __Pyx_GetModuleGlobalName(var, name)  do {\
    2304             :     static PY_UINT64_T __pyx_dict_version = 0;\
    2305             :     static PyObject *__pyx_dict_cached_value = NULL;\
    2306             :     (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
    2307             :         (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
    2308             :         __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
    2309             : } while(0)
    2310             : #define __Pyx_GetModuleGlobalNameUncached(var, name)  do {\
    2311             :     PY_UINT64_T __pyx_dict_version;\
    2312             :     PyObject *__pyx_dict_cached_value;\
    2313             :     (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
    2314             : } while(0)
    2315             : static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
    2316             : #else
    2317             : #define __Pyx_GetModuleGlobalName(var, name)  (var) = __Pyx__GetModuleGlobalName(name)
    2318             : #define __Pyx_GetModuleGlobalNameUncached(var, name)  (var) = __Pyx__GetModuleGlobalName(name)
    2319             : static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
    2320             : #endif
    2321             : 
    2322             : /* AssertionsEnabled.proto */
    2323             : #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
    2324             :   #define __Pyx_init_assertions_enabled()  (0)
    2325             :   #define __pyx_assertions_enabled()  (1)
    2326             : #elif CYTHON_COMPILING_IN_LIMITED_API  ||  (CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030C0000)
    2327             :   static int __pyx_assertions_enabled_flag;
    2328             :   #define __pyx_assertions_enabled() (__pyx_assertions_enabled_flag)
    2329           3 :   static int __Pyx_init_assertions_enabled(void) {
    2330           3 :     PyObject *builtins, *debug, *debug_str;
    2331           3 :     int flag;
    2332           3 :     builtins = PyEval_GetBuiltins();
    2333           3 :     if (!builtins) goto bad;
    2334           3 :     debug_str = PyUnicode_FromStringAndSize("__debug__", 9);
    2335           3 :     if (!debug_str) goto bad;
    2336           3 :     debug = PyObject_GetItem(builtins, debug_str);
    2337           3 :     Py_DECREF(debug_str);
    2338           3 :     if (!debug) goto bad;
    2339           3 :     flag = PyObject_IsTrue(debug);
    2340           3 :     Py_DECREF(debug);
    2341           3 :     if (flag == -1) goto bad;
    2342           3 :     __pyx_assertions_enabled_flag = flag;
    2343           3 :     return 0;
    2344           0 :   bad:
    2345           0 :     __pyx_assertions_enabled_flag = 1;
    2346           0 :     return -1;
    2347             :   }
    2348             : #else
    2349             :   #define __Pyx_init_assertions_enabled()  (0)
    2350             :   #define __pyx_assertions_enabled()  (!Py_OptimizeFlag)
    2351             : #endif
    2352             : 
    2353             : /* RaiseTooManyValuesToUnpack.proto */
    2354             : static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
    2355             : 
    2356             : /* RaiseNeedMoreValuesToUnpack.proto */
    2357             : static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
    2358             : 
    2359             : /* RaiseNoneIterError.proto */
    2360             : static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);
    2361             : 
    2362             : /* ExtTypeTest.proto */
    2363             : static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);
    2364             : 
    2365             : /* GetTopmostException.proto */
    2366             : #if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE
    2367             : static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
    2368             : #endif
    2369             : 
    2370             : /* SaveResetException.proto */
    2371             : #if CYTHON_FAST_THREAD_STATE
    2372             : #define __Pyx_ExceptionSave(type, value, tb)  __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
    2373             : static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
    2374             : #define __Pyx_ExceptionReset(type, value, tb)  __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
    2375             : static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
    2376             : #else
    2377             : #define __Pyx_ExceptionSave(type, value, tb)   PyErr_GetExcInfo(type, value, tb)
    2378             : #define __Pyx_ExceptionReset(type, value, tb)  PyErr_SetExcInfo(type, value, tb)
    2379             : #endif
    2380             : 
    2381             : /* GetException.proto */
    2382             : #if CYTHON_FAST_THREAD_STATE
    2383             : #define __Pyx_GetException(type, value, tb)  __Pyx__GetException(__pyx_tstate, type, value, tb)
    2384             : static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
    2385             : #else
    2386             : static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
    2387             : #endif
    2388             : 
    2389             : /* SwapException.proto */
    2390             : #if CYTHON_FAST_THREAD_STATE
    2391             : #define __Pyx_ExceptionSwap(type, value, tb)  __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
    2392             : static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
    2393             : #else
    2394             : static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
    2395             : #endif
    2396             : 
    2397             : /* Import.proto */
    2398             : static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
    2399             : 
    2400             : /* ImportDottedModule.proto */
    2401             : static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple);
    2402             : #if PY_MAJOR_VERSION >= 3
    2403             : static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject *name, PyObject *parts_tuple);
    2404             : #endif
    2405             : 
    2406             : /* FastTypeChecks.proto */
    2407             : #if CYTHON_COMPILING_IN_CPYTHON
    2408             : #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
    2409             : #define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2)
    2410             : static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
    2411             : static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b);
    2412             : static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
    2413             : static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
    2414             : #else
    2415             : #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
    2416             : #define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2))
    2417             : #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
    2418             : #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
    2419             : #endif
    2420             : #define __Pyx_PyErr_ExceptionMatches2(err1, err2)  __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2)
    2421             : #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
    2422             : 
    2423             : CYTHON_UNUSED static int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
    2424             : /* ListCompAppend.proto */
    2425             : #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
    2426           0 : static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
    2427           0 :     PyListObject* L = (PyListObject*) list;
    2428           0 :     Py_ssize_t len = Py_SIZE(list);
    2429           0 :     if (likely(L->allocated > len)) {
    2430           0 :         Py_INCREF(x);
    2431             :         #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000
    2432             :         L->ob_item[len] = x;
    2433             :         #else
    2434           0 :         PyList_SET_ITEM(list, len, x);
    2435             :         #endif
    2436           0 :         __Pyx_SET_SIZE(list, len + 1);
    2437           0 :         return 0;
    2438             :     }
    2439           0 :     return PyList_Append(list, x);
    2440             : }
    2441             : #else
    2442             : #define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
    2443             : #endif
    2444             : 
    2445             : /* PySequenceMultiply.proto */
    2446             : #define __Pyx_PySequence_Multiply_Left(mul, seq)  __Pyx_PySequence_Multiply(seq, mul)
    2447             : static CYTHON_INLINE PyObject* __Pyx_PySequence_Multiply(PyObject *seq, Py_ssize_t mul);
    2448             : 
    2449             : /* SetItemInt.proto */
    2450             : #define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    2451             :     (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    2452             :     __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) :\
    2453             :     (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) :\
    2454             :                __Pyx_SetItemInt_Generic(o, to_py_func(i), v)))
    2455             : static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v);
    2456             : static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v,
    2457             :                                                int is_list, int wraparound, int boundscheck);
    2458             : 
    2459             : /* RaiseUnboundLocalError.proto */
    2460             : static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname);
    2461             : 
    2462             : /* DivInt[long].proto */
    2463             : static CYTHON_INLINE long __Pyx_div_long(long, long);
    2464             : 
    2465             : /* PySequenceContains.proto */
    2466           0 : static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) {
    2467           0 :     int result = PySequence_Contains(seq, item);
    2468           0 :     return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
    2469             : }
    2470             : 
    2471             : /* ImportFrom.proto */
    2472             : static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);
    2473             : 
    2474             : /* HasAttr.proto */
    2475             : static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *);
    2476             : 
    2477             : /* PyObjectSetAttrStr.proto */
    2478             : #if CYTHON_USE_TYPE_SLOTS
    2479             : #define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o, n, NULL)
    2480             : static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value);
    2481             : #else
    2482             : #define __Pyx_PyObject_DelAttrStr(o,n)   PyObject_DelAttr(o,n)
    2483             : #define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v)
    2484             : #endif
    2485             : 
    2486             : /* SliceObject.proto */
    2487             : static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(
    2488             :         PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop,
    2489             :         PyObject** py_start, PyObject** py_stop, PyObject** py_slice,
    2490             :         int has_cstart, int has_cstop, int wraparound);
    2491             : 
    2492             : /* PyIntCompare.proto */
    2493             : static CYTHON_INLINE int __Pyx_PyInt_BoolEqObjC(PyObject *op1, PyObject *op2, long intval, long inplace);
    2494             : 
    2495             : /* pybytes_as_double.proto */
    2496             : static double __Pyx_SlowPyString_AsDouble(PyObject *obj);
    2497             : static double __Pyx__PyBytes_AsDouble(PyObject *obj, const char* start, Py_ssize_t length);
    2498           0 : static CYTHON_INLINE double __Pyx_PyBytes_AsDouble(PyObject *obj) {
    2499           0 :     char* as_c_string;
    2500           0 :     Py_ssize_t size;
    2501             : #if CYTHON_ASSUME_SAFE_MACROS
    2502           0 :     as_c_string = PyBytes_AS_STRING(obj);
    2503           0 :     size = PyBytes_GET_SIZE(obj);
    2504             : #else
    2505             :     if (PyBytes_AsStringAndSize(obj, &as_c_string, &size) < 0) {
    2506             :         return (double)-1;
    2507             :     }
    2508             : #endif
    2509           0 :     return __Pyx__PyBytes_AsDouble(obj, as_c_string, size);
    2510             : }
    2511           0 : static CYTHON_INLINE double __Pyx_PyByteArray_AsDouble(PyObject *obj) {
    2512           0 :     char* as_c_string;
    2513           0 :     Py_ssize_t size;
    2514             : #if CYTHON_ASSUME_SAFE_MACROS
    2515           0 :     as_c_string = PyByteArray_AS_STRING(obj);
    2516           0 :     size = PyByteArray_GET_SIZE(obj);
    2517             : #else
    2518             :     as_c_string = PyByteArray_AsString(obj);
    2519             :     if (as_c_string == NULL) {
    2520             :         return (double)-1;
    2521             :     }
    2522             :     size = PyByteArray_Size(obj);
    2523             : #endif
    2524           0 :     return __Pyx__PyBytes_AsDouble(obj, as_c_string, size);
    2525             : }
    2526             : 
    2527             : /* pyunicode_as_double.proto */
    2528             : #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY && CYTHON_ASSUME_SAFE_MACROS
    2529           0 : static const char* __Pyx__PyUnicode_AsDouble_Copy(const void* data, const int kind, char* buffer, Py_ssize_t start, Py_ssize_t end) {
    2530           0 :     int last_was_punctuation;
    2531           0 :     Py_ssize_t i;
    2532           0 :     last_was_punctuation = 1;
    2533           0 :     for (i=start; i <= end; i++) {
    2534           0 :         Py_UCS4 chr = PyUnicode_READ(kind, data, i);
    2535           0 :         int is_punctuation = (chr == '_') | (chr == '.');
    2536           0 :         *buffer = (char)chr;
    2537           0 :         buffer += (chr != '_');
    2538           0 :         if (unlikely(chr > 127)) goto parse_failure;
    2539           0 :         if (unlikely(last_was_punctuation & is_punctuation)) goto parse_failure;
    2540           0 :         last_was_punctuation = is_punctuation;
    2541             :     }
    2542           0 :     if (unlikely(last_was_punctuation)) goto parse_failure;
    2543           0 :     *buffer = '\0';
    2544           0 :     return buffer;
    2545             : parse_failure:
    2546             :     return NULL;
    2547             : }
    2548           0 : static double __Pyx__PyUnicode_AsDouble_inf_nan(const void* data, int kind, Py_ssize_t start, Py_ssize_t length) {
    2549           0 :     int matches = 1;
    2550           0 :     Py_UCS4 chr;
    2551           0 :     Py_UCS4 sign = PyUnicode_READ(kind, data, start);
    2552           0 :     int is_signed = (sign == '-') | (sign == '+');
    2553           0 :     start += is_signed;
    2554           0 :     length -= is_signed;
    2555           0 :     switch (PyUnicode_READ(kind, data, start)) {
    2556             :         #ifdef Py_NAN
    2557           0 :         case 'n':
    2558             :         case 'N':
    2559           0 :             if (unlikely(length != 3)) goto parse_failure;
    2560           0 :             chr = PyUnicode_READ(kind, data, start+1);
    2561           0 :             matches &= (chr == 'a') | (chr == 'A');
    2562           0 :             chr = PyUnicode_READ(kind, data, start+2);
    2563           0 :             matches &= (chr == 'n') | (chr == 'N');
    2564           0 :             if (unlikely(!matches)) goto parse_failure;
    2565           0 :             return (sign == '-') ? -Py_NAN : Py_NAN;
    2566             :         #endif
    2567           0 :         case 'i':
    2568             :         case 'I':
    2569           0 :             if (unlikely(length < 3)) goto parse_failure;
    2570           0 :             chr = PyUnicode_READ(kind, data, start+1);
    2571           0 :             matches &= (chr == 'n') | (chr == 'N');
    2572           0 :             chr = PyUnicode_READ(kind, data, start+2);
    2573           0 :             matches &= (chr == 'f') | (chr == 'F');
    2574           0 :             if (likely(length == 3 && matches))
    2575           0 :                 return (sign == '-') ? -Py_HUGE_VAL : Py_HUGE_VAL;
    2576           0 :             if (unlikely(length != 8)) goto parse_failure;
    2577           0 :             chr = PyUnicode_READ(kind, data, start+3);
    2578           0 :             matches &= (chr == 'i') | (chr == 'I');
    2579           0 :             chr = PyUnicode_READ(kind, data, start+4);
    2580           0 :             matches &= (chr == 'n') | (chr == 'N');
    2581           0 :             chr = PyUnicode_READ(kind, data, start+5);
    2582           0 :             matches &= (chr == 'i') | (chr == 'I');
    2583           0 :             chr = PyUnicode_READ(kind, data, start+6);
    2584           0 :             matches &= (chr == 't') | (chr == 'T');
    2585           0 :             chr = PyUnicode_READ(kind, data, start+7);
    2586           0 :             matches &= (chr == 'y') | (chr == 'Y');
    2587           0 :             if (unlikely(!matches)) goto parse_failure;
    2588           0 :             return (sign == '-') ? -Py_HUGE_VAL : Py_HUGE_VAL;
    2589             :         case '.': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9':
    2590             :             break;
    2591           0 :         default:
    2592           0 :             goto parse_failure;
    2593             :     }
    2594             :     return 0.0;
    2595             : parse_failure:
    2596             :     return -1.0;
    2597             : }
    2598           0 : static double __Pyx_PyUnicode_AsDouble_WithSpaces(PyObject *obj) {
    2599           0 :     double value;
    2600           0 :     const char *last;
    2601           0 :     char *end;
    2602           0 :     Py_ssize_t start, length = PyUnicode_GET_LENGTH(obj);
    2603           0 :     const int kind = PyUnicode_KIND(obj);
    2604           0 :     const void* data = PyUnicode_DATA(obj);
    2605           0 :     start = 0;
    2606           0 :     while (Py_UNICODE_ISSPACE(PyUnicode_READ(kind, data, start)))
    2607           0 :         start++;
    2608           0 :     while (start < length - 1 && Py_UNICODE_ISSPACE(PyUnicode_READ(kind, data, length - 1)))
    2609             :         length--;
    2610           0 :     length -= start;
    2611           0 :     if (unlikely(length <= 0)) goto fallback;
    2612           0 :     value = __Pyx__PyUnicode_AsDouble_inf_nan(data, kind, start, length);
    2613           0 :     if (unlikely(value == -1.0)) goto fallback;
    2614           0 :     if (value != 0.0) return value;
    2615           0 :     if (length < 40) {
    2616           0 :         char number[40];
    2617           0 :         last = __Pyx__PyUnicode_AsDouble_Copy(data, kind, number, start, start + length);
    2618           0 :         if (unlikely(!last)) goto fallback;
    2619           0 :         value = PyOS_string_to_double(number, &end, NULL);
    2620             :     } else {
    2621           0 :         char *number = (char*) PyMem_Malloc((length + 1) * sizeof(char));
    2622           0 :         if (unlikely(!number)) goto fallback;
    2623           0 :         last = __Pyx__PyUnicode_AsDouble_Copy(data, kind, number, start, start + length);
    2624           0 :         if (unlikely(!last)) {
    2625           0 :             PyMem_Free(number);
    2626           0 :             goto fallback;
    2627             :         }
    2628           0 :         value = PyOS_string_to_double(number, &end, NULL);
    2629           0 :         PyMem_Free(number);
    2630             :     }
    2631           0 :     if (likely(end == last) || (value == (double)-1 && PyErr_Occurred())) {
    2632           0 :         return value;
    2633             :     }
    2634           0 : fallback:
    2635           0 :     return __Pyx_SlowPyString_AsDouble(obj);
    2636             : }
    2637             : #endif
    2638           0 : static CYTHON_INLINE double __Pyx_PyUnicode_AsDouble(PyObject *obj) {
    2639             : #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY && CYTHON_ASSUME_SAFE_MACROS
    2640           0 :     if (unlikely(__Pyx_PyUnicode_READY(obj) == -1))
    2641             :         return (double)-1;
    2642           0 :     if (likely(PyUnicode_IS_ASCII(obj))) {
    2643           0 :         const char *s;
    2644           0 :         Py_ssize_t length;
    2645           0 :         s = PyUnicode_AsUTF8AndSize(obj, &length);
    2646           0 :         return __Pyx__PyBytes_AsDouble(obj, s, length);
    2647             :     }
    2648           0 :     return __Pyx_PyUnicode_AsDouble_WithSpaces(obj);
    2649             : #else
    2650             :     return __Pyx_SlowPyString_AsDouble(obj);
    2651             : #endif
    2652             : }
    2653             : 
    2654             : /* pynumber_float.proto */
    2655             : static CYTHON_INLINE PyObject* __Pyx__PyNumber_Float(PyObject* obj);
    2656             : #define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : __Pyx__PyNumber_Float(x))
    2657             : 
    2658             : /* IterFinish.proto */
    2659             : static CYTHON_INLINE int __Pyx_IterFinish(void);
    2660             : 
    2661             : /* UnpackItemEndCheck.proto */
    2662             : static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected);
    2663             : 
    2664             : /* PyIntCompare.proto */
    2665             : static CYTHON_INLINE int __Pyx_PyInt_BoolNeObjC(PyObject *op1, PyObject *op2, long intval, long inplace);
    2666             : 
    2667             : /* PyDictContains.proto */
    2668           0 : static CYTHON_INLINE int __Pyx_PyDict_ContainsTF(PyObject* item, PyObject* dict, int eq) {
    2669           0 :     int result = PyDict_Contains(dict, item);
    2670           0 :     return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
    2671             : }
    2672             : 
    2673             : /* DictGetItem.proto */
    2674             : #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
    2675             : static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key);
    2676             : #define __Pyx_PyObject_Dict_GetItem(obj, name)\
    2677             :     (likely(PyDict_CheckExact(obj)) ?\
    2678             :      __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name))
    2679             : #else
    2680             : #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)
    2681             : #define __Pyx_PyObject_Dict_GetItem(obj, name)  PyObject_GetItem(obj, name)
    2682             : #endif
    2683             : 
    2684             : /* PyObjectCallNoArg.proto */
    2685             : static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
    2686             : 
    2687             : /* PyObjectGetMethod.proto */
    2688             : static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method);
    2689             : 
    2690             : /* PyObjectCallMethod0.proto */
    2691             : static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name);
    2692             : 
    2693             : /* UnpackTupleError.proto */
    2694             : static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index);
    2695             : 
    2696             : /* UnpackTuple2.proto */
    2697             : #define __Pyx_unpack_tuple2(tuple, value1, value2, is_tuple, has_known_size, decref_tuple)\
    2698             :     (likely(is_tuple || PyTuple_Check(tuple)) ?\
    2699             :         (likely(has_known_size || PyTuple_GET_SIZE(tuple) == 2) ?\
    2700             :             __Pyx_unpack_tuple2_exact(tuple, value1, value2, decref_tuple) :\
    2701             :             (__Pyx_UnpackTupleError(tuple, 2), -1)) :\
    2702             :         __Pyx_unpack_tuple2_generic(tuple, value1, value2, has_known_size, decref_tuple))
    2703             : static CYTHON_INLINE int __Pyx_unpack_tuple2_exact(
    2704             :     PyObject* tuple, PyObject** value1, PyObject** value2, int decref_tuple);
    2705             : static int __Pyx_unpack_tuple2_generic(
    2706             :     PyObject* tuple, PyObject** value1, PyObject** value2, int has_known_size, int decref_tuple);
    2707             : 
    2708             : /* dict_iter.proto */
    2709             : static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* dict, int is_dict, PyObject* method_name,
    2710             :                                                    Py_ssize_t* p_orig_length, int* p_is_dict);
    2711             : static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* dict_or_iter, Py_ssize_t orig_length, Py_ssize_t* ppos,
    2712             :                                               PyObject** pkey, PyObject** pvalue, PyObject** pitem, int is_dict);
    2713             : 
    2714             : /* ListExtend.proto */
    2715           0 : static CYTHON_INLINE int __Pyx_PyList_Extend(PyObject* L, PyObject* v) {
    2716             : #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000
    2717           0 :     PyObject* none = _PyList_Extend((PyListObject*)L, v);
    2718           0 :     if (unlikely(!none))
    2719             :         return -1;
    2720           0 :     Py_DECREF(none);
    2721             :     return 0;
    2722             : #else
    2723             :     return PyList_SetSlice(L, PY_SSIZE_T_MAX, PY_SSIZE_T_MAX, v);
    2724             : #endif
    2725             : }
    2726             : 
    2727             : /* py_dict_values.proto */
    2728             : static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d);
    2729             : 
    2730             : /* UnpackUnboundCMethod.proto */
    2731             : typedef struct {
    2732             :     PyObject *type;
    2733             :     PyObject **method_name;
    2734             :     PyCFunction func;
    2735             :     PyObject *method;
    2736             :     int flag;
    2737             : } __Pyx_CachedCFunction;
    2738             : 
    2739             : /* CallUnboundCMethod0.proto */
    2740             : static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self);
    2741             : #if CYTHON_COMPILING_IN_CPYTHON
    2742             : #define __Pyx_CallUnboundCMethod0(cfunc, self)\
    2743             :     (likely((cfunc)->func) ?\
    2744             :         (likely((cfunc)->flag == METH_NOARGS) ?  (*((cfunc)->func))(self, NULL) :\
    2745             :          (PY_VERSION_HEX >= 0x030600B1 && likely((cfunc)->flag == METH_FASTCALL) ?\
    2746             :             (PY_VERSION_HEX >= 0x030700A0 ?\
    2747             :                 (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)(cfunc)->func)(self, &__pyx_empty_tuple, 0) :\
    2748             :                 (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, &__pyx_empty_tuple, 0, NULL)) :\
    2749             :           (PY_VERSION_HEX >= 0x030700A0 && (cfunc)->flag == (METH_FASTCALL | METH_KEYWORDS) ?\
    2750             :             (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, &__pyx_empty_tuple, 0, NULL) :\
    2751             :             (likely((cfunc)->flag == (METH_VARARGS | METH_KEYWORDS)) ?  ((*(PyCFunctionWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, __pyx_empty_tuple, NULL)) :\
    2752             :                ((cfunc)->flag == METH_VARARGS ?  (*((cfunc)->func))(self, __pyx_empty_tuple) :\
    2753             :                __Pyx__CallUnboundCMethod0(cfunc, self)))))) :\
    2754             :         __Pyx__CallUnboundCMethod0(cfunc, self))
    2755             : #else
    2756             : #define __Pyx_CallUnboundCMethod0(cfunc, self)  __Pyx__CallUnboundCMethod0(cfunc, self)
    2757             : #endif
    2758             : 
    2759             : /* dict_getitem_default.proto */
    2760             : static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value);
    2761             : 
    2762             : /* CallUnboundCMethod1.proto */
    2763             : static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg);
    2764             : #if CYTHON_COMPILING_IN_CPYTHON
    2765             : static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg);
    2766             : #else
    2767             : #define __Pyx_CallUnboundCMethod1(cfunc, self, arg)  __Pyx__CallUnboundCMethod1(cfunc, self, arg)
    2768             : #endif
    2769             : 
    2770             : /* CallUnboundCMethod2.proto */
    2771             : static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2);
    2772             : #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030600B1
    2773             : static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2);
    2774             : #else
    2775             : #define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2)  __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2)
    2776             : #endif
    2777             : 
    2778             : /* ListAppend.proto */
    2779             : #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
    2780          94 : static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
    2781          94 :     PyListObject* L = (PyListObject*) list;
    2782          94 :     Py_ssize_t len = Py_SIZE(list);
    2783          94 :     if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
    2784           0 :         Py_INCREF(x);
    2785             :         #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000
    2786             :         L->ob_item[len] = x;
    2787             :         #else
    2788           0 :         PyList_SET_ITEM(list, len, x);
    2789             :         #endif
    2790           0 :         __Pyx_SET_SIZE(list, len + 1);
    2791           0 :         return 0;
    2792             :     }
    2793          94 :     return PyList_Append(list, x);
    2794             : }
    2795             : #else
    2796             : #define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
    2797             : #endif
    2798             : 
    2799             : /* PyObject_GenericGetAttrNoDict.proto */
    2800             : #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
    2801             : static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
    2802             : #else
    2803             : #define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
    2804             : #endif
    2805             : 
    2806             : /* PyObject_GenericGetAttr.proto */
    2807             : #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
    2808             : static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);
    2809             : #else
    2810             : #define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
    2811             : #endif
    2812             : 
    2813             : /* IncludeStructmemberH.proto */
    2814             : #include <structmember.h>
    2815             : 
    2816             : /* FixUpExtensionType.proto */
    2817             : #if CYTHON_USE_TYPE_SPECS
    2818             : static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type);
    2819             : #endif
    2820             : 
    2821             : /* ValidateBasesTuple.proto */
    2822             : #if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS
    2823             : static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases);
    2824             : #endif
    2825             : 
    2826             : /* PyType_Ready.proto */
    2827             : CYTHON_UNUSED static int __Pyx_PyType_Ready(PyTypeObject *t);
    2828             : 
    2829             : /* SetVTable.proto */
    2830             : static int __Pyx_SetVtable(PyTypeObject* typeptr , void* vtable);
    2831             : 
    2832             : /* GetVTable.proto */
    2833             : static void* __Pyx_GetVtable(PyTypeObject *type);
    2834             : 
    2835             : /* MergeVTables.proto */
    2836             : #if !CYTHON_COMPILING_IN_LIMITED_API
    2837             : static int __Pyx_MergeVtables(PyTypeObject *type);
    2838             : #endif
    2839             : 
    2840             : /* SetupReduce.proto */
    2841             : #if !CYTHON_COMPILING_IN_LIMITED_API
    2842             : static int __Pyx_setup_reduce(PyObject* type_obj);
    2843             : #endif
    2844             : 
    2845             : /* FetchSharedCythonModule.proto */
    2846             : static PyObject *__Pyx_FetchSharedCythonABIModule(void);
    2847             : 
    2848             : /* FetchCommonType.proto */
    2849             : #if !CYTHON_USE_TYPE_SPECS
    2850             : static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
    2851             : #else
    2852             : static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyObject *module, PyType_Spec *spec, PyObject *bases);
    2853             : #endif
    2854             : 
    2855             : /* PyMethodNew.proto */
    2856             : #if CYTHON_COMPILING_IN_LIMITED_API
    2857             : static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
    2858             :     PyObject *typesModule=NULL, *methodType=NULL, *result=NULL;
    2859             :     CYTHON_UNUSED_VAR(typ);
    2860             :     if (!self)
    2861             :         return __Pyx_NewRef(func);
    2862             :     typesModule = PyImport_ImportModule("types");
    2863             :     if (!typesModule) return NULL;
    2864             :     methodType = PyObject_GetAttrString(typesModule, "MethodType");
    2865             :     Py_DECREF(typesModule);
    2866             :     if (!methodType) return NULL;
    2867             :     result = PyObject_CallFunctionObjArgs(methodType, func, self, NULL);
    2868             :     Py_DECREF(methodType);
    2869             :     return result;
    2870             : }
    2871             : #elif PY_MAJOR_VERSION >= 3
    2872           0 : static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
    2873           0 :     CYTHON_UNUSED_VAR(typ);
    2874           0 :     if (!self)
    2875           0 :         return __Pyx_NewRef(func);
    2876           0 :     return PyMethod_New(func, self);
    2877             : }
    2878             : #else
    2879             :     #define __Pyx_PyMethod_New PyMethod_New
    2880             : #endif
    2881             : 
    2882             : /* PyVectorcallFastCallDict.proto */
    2883             : #if CYTHON_METH_FASTCALL
    2884             : static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw);
    2885             : #endif
    2886             : 
    2887             : /* CythonFunctionShared.proto */
    2888             : #define __Pyx_CyFunction_USED
    2889             : #define __Pyx_CYFUNCTION_STATICMETHOD  0x01
    2890             : #define __Pyx_CYFUNCTION_CLASSMETHOD   0x02
    2891             : #define __Pyx_CYFUNCTION_CCLASS        0x04
    2892             : #define __Pyx_CYFUNCTION_COROUTINE     0x08
    2893             : #define __Pyx_CyFunction_GetClosure(f)\
    2894             :     (((__pyx_CyFunctionObject *) (f))->func_closure)
    2895             : #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
    2896             :   #define __Pyx_CyFunction_GetClassObj(f)\
    2897             :       (((__pyx_CyFunctionObject *) (f))->func_classobj)
    2898             : #else
    2899             :   #define __Pyx_CyFunction_GetClassObj(f)\
    2900             :       ((PyObject*) ((PyCMethodObject *) (f))->mm_class)
    2901             : #endif
    2902             : #define __Pyx_CyFunction_SetClassObj(f, classobj)\
    2903             :     __Pyx__CyFunction_SetClassObj((__pyx_CyFunctionObject *) (f), (classobj))
    2904             : #define __Pyx_CyFunction_Defaults(type, f)\
    2905             :     ((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
    2906             : #define __Pyx_CyFunction_SetDefaultsGetter(f, g)\
    2907             :     ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
    2908             : typedef struct {
    2909             : #if CYTHON_COMPILING_IN_LIMITED_API
    2910             :     PyObject_HEAD
    2911             :     PyObject *func;
    2912             : #elif PY_VERSION_HEX < 0x030900B1
    2913             :     PyCFunctionObject func;
    2914             : #else
    2915             :     PyCMethodObject func;
    2916             : #endif
    2917             : #if CYTHON_BACKPORT_VECTORCALL
    2918             :     __pyx_vectorcallfunc func_vectorcall;
    2919             : #endif
    2920             : #if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API
    2921             :     PyObject *func_weakreflist;
    2922             : #endif
    2923             :     PyObject *func_dict;
    2924             :     PyObject *func_name;
    2925             :     PyObject *func_qualname;
    2926             :     PyObject *func_doc;
    2927             :     PyObject *func_globals;
    2928             :     PyObject *func_code;
    2929             :     PyObject *func_closure;
    2930             : #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
    2931             :     PyObject *func_classobj;
    2932             : #endif
    2933             :     void *defaults;
    2934             :     int defaults_pyobjects;
    2935             :     size_t defaults_size;
    2936             :     int flags;
    2937             :     PyObject *defaults_tuple;
    2938             :     PyObject *defaults_kwdict;
    2939             :     PyObject *(*defaults_getter)(PyObject *);
    2940             :     PyObject *func_annotations;
    2941             :     PyObject *func_is_coroutine;
    2942             : } __pyx_CyFunctionObject;
    2943             : #undef __Pyx_CyOrPyCFunction_Check
    2944             : #define __Pyx_CyFunction_Check(obj)  __Pyx_TypeCheck(obj, __pyx_CyFunctionType)
    2945             : #define __Pyx_CyOrPyCFunction_Check(obj)  __Pyx_TypeCheck2(obj, __pyx_CyFunctionType, &PyCFunction_Type)
    2946             : #define __Pyx_CyFunction_CheckExact(obj)  __Pyx_IS_TYPE(obj, __pyx_CyFunctionType)
    2947             : static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc);
    2948             : #undef __Pyx_IsSameCFunction
    2949             : #define __Pyx_IsSameCFunction(func, cfunc)   __Pyx__IsSameCyOrCFunction(func, cfunc)
    2950             : static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml,
    2951             :                                       int flags, PyObject* qualname,
    2952             :                                       PyObject *closure,
    2953             :                                       PyObject *module, PyObject *globals,
    2954             :                                       PyObject* code);
    2955             : static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj);
    2956             : static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m,
    2957             :                                                          size_t size,
    2958             :                                                          int pyobjects);
    2959             : static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
    2960             :                                                             PyObject *tuple);
    2961             : static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
    2962             :                                                              PyObject *dict);
    2963             : static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
    2964             :                                                               PyObject *dict);
    2965             : static int __pyx_CyFunction_init(PyObject *module);
    2966             : #if CYTHON_METH_FASTCALL
    2967             : static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
    2968             : static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
    2969             : static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
    2970             : static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
    2971             : #if CYTHON_BACKPORT_VECTORCALL
    2972             : #define __Pyx_CyFunction_func_vectorcall(f) (((__pyx_CyFunctionObject*)f)->func_vectorcall)
    2973             : #else
    2974             : #define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall)
    2975             : #endif
    2976             : #endif
    2977             : 
    2978             : /* CythonFunction.proto */
    2979             : static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml,
    2980             :                                       int flags, PyObject* qualname,
    2981             :                                       PyObject *closure,
    2982             :                                       PyObject *module, PyObject *globals,
    2983             :                                       PyObject* code);
    2984             : 
    2985             : /* SetNameInClass.proto */
    2986             : #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && PY_VERSION_HEX < 0x030d0000
    2987             : #define __Pyx_SetNameInClass(ns, name, value)\
    2988             :     (likely(PyDict_CheckExact(ns)) ? _PyDict_SetItem_KnownHash(ns, name, value, ((PyASCIIObject *) name)->hash) : PyObject_SetItem(ns, name, value))
    2989             : #elif CYTHON_COMPILING_IN_CPYTHON
    2990             : #define __Pyx_SetNameInClass(ns, name, value)\
    2991             :     (likely(PyDict_CheckExact(ns)) ? PyDict_SetItem(ns, name, value) : PyObject_SetItem(ns, name, value))
    2992             : #else
    2993             : #define __Pyx_SetNameInClass(ns, name, value)  PyObject_SetItem(ns, name, value)
    2994             : #endif
    2995             : 
    2996             : /* CalculateMetaclass.proto */
    2997             : static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases);
    2998             : 
    2999             : /* PyObjectCall2Args.proto */
    3000             : static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);
    3001             : 
    3002             : /* PyObjectLookupSpecial.proto */
    3003             : #if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    3004             : #define __Pyx_PyObject_LookupSpecialNoError(obj, attr_name)  __Pyx__PyObject_LookupSpecial(obj, attr_name, 0)
    3005             : #define __Pyx_PyObject_LookupSpecial(obj, attr_name)  __Pyx__PyObject_LookupSpecial(obj, attr_name, 1)
    3006             : static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error);
    3007             : #else
    3008             : #define __Pyx_PyObject_LookupSpecialNoError(o,n) __Pyx_PyObject_GetAttrStrNoError(o,n)
    3009             : #define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n)
    3010             : #endif
    3011             : 
    3012             : /* Py3ClassCreate.proto */
    3013             : static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname,
    3014             :                                            PyObject *mkw, PyObject *modname, PyObject *doc);
    3015             : static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict,
    3016             :                                       PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass);
    3017             : 
    3018             : /* Py3UpdateBases.proto */
    3019             : static PyObject* __Pyx_PEP560_update_bases(PyObject *bases);
    3020             : 
    3021             : /* FusedFunction.proto */
    3022             : typedef struct {
    3023             :     __pyx_CyFunctionObject func;
    3024             :     PyObject *__signatures__;
    3025             :     PyObject *self;
    3026             : } __pyx_FusedFunctionObject;
    3027             : static PyObject *__pyx_FusedFunction_New(PyMethodDef *ml, int flags,
    3028             :                                          PyObject *qualname, PyObject *closure,
    3029             :                                          PyObject *module, PyObject *globals,
    3030             :                                          PyObject *code);
    3031             : static int __pyx_FusedFunction_clear(__pyx_FusedFunctionObject *self);
    3032             : static int __pyx_FusedFunction_init(PyObject *module);
    3033             : #define __Pyx_FusedFunction_USED
    3034             : 
    3035             : /* CLineInTraceback.proto */
    3036             : #ifdef CYTHON_CLINE_IN_TRACEBACK
    3037             : #define __Pyx_CLineForTraceback(tstate, c_line)  (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
    3038             : #else
    3039             : static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
    3040             : #endif
    3041             : 
    3042             : /* CodeObjectCache.proto */
    3043             : #if !CYTHON_COMPILING_IN_LIMITED_API
    3044             : typedef struct {
    3045             :     PyCodeObject* code_object;
    3046             :     int code_line;
    3047             : } __Pyx_CodeObjectCacheEntry;
    3048             : struct __Pyx_CodeObjectCache {
    3049             :     int count;
    3050             :     int max_count;
    3051             :     __Pyx_CodeObjectCacheEntry* entries;
    3052             : };
    3053             : static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
    3054             : static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
    3055             : static PyCodeObject *__pyx_find_code_object(int code_line);
    3056             : static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
    3057             : #endif
    3058             : 
    3059             : /* AddTraceback.proto */
    3060             : static void __Pyx_AddTraceback(const char *funcname, int c_line,
    3061             :                                int py_line, const char *filename);
    3062             : 
    3063             : /* RealImag.proto */
    3064             : #if CYTHON_CCOMPLEX
    3065             :   #ifdef __cplusplus
    3066             :     #define __Pyx_CREAL(z) ((z).real())
    3067             :     #define __Pyx_CIMAG(z) ((z).imag())
    3068             :   #else
    3069             :     #define __Pyx_CREAL(z) (__real__(z))
    3070             :     #define __Pyx_CIMAG(z) (__imag__(z))
    3071             :   #endif
    3072             : #else
    3073             :     #define __Pyx_CREAL(z) ((z).real)
    3074             :     #define __Pyx_CIMAG(z) ((z).imag)
    3075             : #endif
    3076             : #if defined(__cplusplus) && CYTHON_CCOMPLEX\
    3077             :         && (defined(_WIN32) || defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 5 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4 )) || __cplusplus >= 201103)
    3078             :     #define __Pyx_SET_CREAL(z,x) ((z).real(x))
    3079             :     #define __Pyx_SET_CIMAG(z,y) ((z).imag(y))
    3080             : #else
    3081             :     #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x)
    3082             :     #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y)
    3083             : #endif
    3084             : 
    3085             : /* Arithmetic.proto */
    3086             : #if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
    3087             :     #define __Pyx_c_eq_double(a, b)   ((a)==(b))
    3088             :     #define __Pyx_c_sum_double(a, b)  ((a)+(b))
    3089             :     #define __Pyx_c_diff_double(a, b) ((a)-(b))
    3090             :     #define __Pyx_c_prod_double(a, b) ((a)*(b))
    3091             :     #define __Pyx_c_quot_double(a, b) ((a)/(b))
    3092             :     #define __Pyx_c_neg_double(a)     (-(a))
    3093             :   #ifdef __cplusplus
    3094             :     #define __Pyx_c_is_zero_double(z) ((z)==(double)0)
    3095             :     #define __Pyx_c_conj_double(z)    (::std::conj(z))
    3096             :     #if 1
    3097             :         #define __Pyx_c_abs_double(z)     (::std::abs(z))
    3098             :         #define __Pyx_c_pow_double(a, b)  (::std::pow(a, b))
    3099             :     #endif
    3100             :   #else
    3101             :     #define __Pyx_c_is_zero_double(z) ((z)==0)
    3102             :     #define __Pyx_c_conj_double(z)    (conj(z))
    3103             :     #if 1
    3104             :         #define __Pyx_c_abs_double(z)     (cabs(z))
    3105             :         #define __Pyx_c_pow_double(a, b)  (cpow(a, b))
    3106             :     #endif
    3107             :  #endif
    3108             : #else
    3109             :     static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex, __pyx_t_double_complex);
    3110             :     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex, __pyx_t_double_complex);
    3111             :     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex, __pyx_t_double_complex);
    3112             :     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex, __pyx_t_double_complex);
    3113             :     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex, __pyx_t_double_complex);
    3114             :     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex);
    3115             :     static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex);
    3116             :     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex);
    3117             :     #if 1
    3118             :         static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex);
    3119             :         static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex, __pyx_t_double_complex);
    3120             :     #endif
    3121             : #endif
    3122             : 
    3123             : #if PY_MAJOR_VERSION < 3
    3124             :     static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags);
    3125             :     static void __Pyx_ReleaseBuffer(Py_buffer *view);
    3126             : #else
    3127             :     #define __Pyx_GetBuffer PyObject_GetBuffer
    3128             :     #define __Pyx_ReleaseBuffer PyBuffer_Release
    3129             : #endif
    3130             : 
    3131             : 
    3132             : /* BufferStructDeclare.proto */
    3133             : typedef struct {
    3134             :   Py_ssize_t shape, strides, suboffsets;
    3135             : } __Pyx_Buf_DimInfo;
    3136             : typedef struct {
    3137             :   size_t refcount;
    3138             :   Py_buffer pybuffer;
    3139             : } __Pyx_Buffer;
    3140             : typedef struct {
    3141             :   __Pyx_Buffer *rcbuffer;
    3142             :   char *data;
    3143             :   __Pyx_Buf_DimInfo diminfo[8];
    3144             : } __Pyx_LocalBuf_ND;
    3145             : 
    3146             : /* MemviewSliceIsContig.proto */
    3147             : static int __pyx_memviewslice_is_contig(const __Pyx_memviewslice mvs, char order, int ndim);
    3148             : 
    3149             : /* OverlappingSlices.proto */
    3150             : static int __pyx_slices_overlap(__Pyx_memviewslice *slice1,
    3151             :                                 __Pyx_memviewslice *slice2,
    3152             :                                 int ndim, size_t itemsize);
    3153             : 
    3154             : /* IsLittleEndian.proto */
    3155             : static CYTHON_INLINE int __Pyx_Is_Little_Endian(void);
    3156             : 
    3157             : /* BufferFormatCheck.proto */
    3158             : static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts);
    3159             : static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx,
    3160             :                               __Pyx_BufFmt_StackElem* stack,
    3161             :                               __Pyx_TypeInfo* type);
    3162             : 
    3163             : /* TypeInfoCompare.proto */
    3164             : static int __pyx_typeinfo_cmp(__Pyx_TypeInfo *a, __Pyx_TypeInfo *b);
    3165             : 
    3166             : /* MemviewSliceValidateAndInit.proto */
    3167             : static int __Pyx_ValidateAndInit_memviewslice(
    3168             :                 int *axes_specs,
    3169             :                 int c_or_f_flag,
    3170             :                 int buf_flags,
    3171             :                 int ndim,
    3172             :                 __Pyx_TypeInfo *dtype,
    3173             :                 __Pyx_BufFmt_StackElem stack[],
    3174             :                 __Pyx_memviewslice *memviewslice,
    3175             :                 PyObject *original_obj);
    3176             : 
    3177             : /* ObjectToMemviewSlice.proto */
    3178             : static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_d_dc_double__const__(PyObject *, int writable_flag);
    3179             : 
    3180             : /* FromPy.proto */
    3181             : static __pyx_t_double_complex __Pyx_PyComplex_As___pyx_t_double_complex(PyObject*);
    3182             : 
    3183             : /* ObjectToMemviewSlice.proto */
    3184             : static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_d_dc_int__const__(PyObject *, int writable_flag);
    3185             : 
    3186             : /* ObjectToMemviewSlice.proto */
    3187             : static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_d_dc_double(PyObject *, int writable_flag);
    3188             : 
    3189             : /* MemviewDtypeToObject.proto */
    3190             : static CYTHON_INLINE PyObject *__pyx_memview_get_double(const char *itemp);
    3191             : static CYTHON_INLINE int __pyx_memview_set_double(const char *itemp, PyObject *obj);
    3192             : 
    3193             : /* ObjectToMemviewSlice.proto */
    3194             : static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_d_dc___pyx_t_double_complex__const__(PyObject *, int writable_flag);
    3195             : 
    3196             : /* ObjectToMemviewSlice.proto */
    3197             : static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_d_dc___pyx_t_double_complex(PyObject *, int writable_flag);
    3198             : 
    3199             : /* ToPy.proto */
    3200             : #define __pyx_PyComplex_FromComplex(z)\
    3201             :         PyComplex_FromDoubles((double)__Pyx_CREAL(z),\
    3202             :                               (double)__Pyx_CIMAG(z))
    3203             : 
    3204             : /* MemviewDtypeToObject.proto */
    3205             : static CYTHON_INLINE PyObject *__pyx_memview_get___pyx_t_double_complex(const char *itemp);
    3206             : static CYTHON_INLINE int __pyx_memview_set___pyx_t_double_complex(const char *itemp, PyObject *obj);
    3207             : 
    3208             : /* ObjectToMemviewSlice.proto */
    3209             : static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_d_d_dc_double(PyObject *, int writable_flag);
    3210             : 
    3211             : /* ObjectToMemviewSlice.proto */
    3212             : static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dsdsds_double__const__(PyObject *, int writable_flag);
    3213             : 
    3214             : /* ObjectToMemviewSlice.proto */
    3215             : static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dsdsds___pyx_t_double_complex__const__(PyObject *, int writable_flag);
    3216             : 
    3217             : /* MemviewSliceCopyTemplate.proto */
    3218             : static __Pyx_memviewslice
    3219             : __pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs,
    3220             :                                  const char *mode, int ndim,
    3221             :                                  size_t sizeof_dtype, int contig_flag,
    3222             :                                  int dtype_is_object);
    3223             : 
    3224             : /* MemviewSliceInit.proto */
    3225             : #define __Pyx_BUF_MAX_NDIMS %(BUF_MAX_NDIMS)d
    3226             : #define __Pyx_MEMVIEW_DIRECT   1
    3227             : #define __Pyx_MEMVIEW_PTR      2
    3228             : #define __Pyx_MEMVIEW_FULL     4
    3229             : #define __Pyx_MEMVIEW_CONTIG   8
    3230             : #define __Pyx_MEMVIEW_STRIDED  16
    3231             : #define __Pyx_MEMVIEW_FOLLOW   32
    3232             : #define __Pyx_IS_C_CONTIG 1
    3233             : #define __Pyx_IS_F_CONTIG 2
    3234             : static int __Pyx_init_memviewslice(
    3235             :                 struct __pyx_memoryview_obj *memview,
    3236             :                 int ndim,
    3237             :                 __Pyx_memviewslice *memviewslice,
    3238             :                 int memview_is_new_reference);
    3239             : static CYTHON_INLINE int __pyx_add_acquisition_count_locked(
    3240             :     __pyx_atomic_int_type *acquisition_count, PyThread_type_lock lock);
    3241             : static CYTHON_INLINE int __pyx_sub_acquisition_count_locked(
    3242             :     __pyx_atomic_int_type *acquisition_count, PyThread_type_lock lock);
    3243             : #define __pyx_get_slice_count_pointer(memview) (&memview->acquisition_count)
    3244             : #define __PYX_INC_MEMVIEW(slice, have_gil) __Pyx_INC_MEMVIEW(slice, have_gil, __LINE__)
    3245             : #define __PYX_XCLEAR_MEMVIEW(slice, have_gil) __Pyx_XCLEAR_MEMVIEW(slice, have_gil, __LINE__)
    3246             : static CYTHON_INLINE void __Pyx_INC_MEMVIEW(__Pyx_memviewslice *, int, int);
    3247             : static CYTHON_INLINE void __Pyx_XCLEAR_MEMVIEW(__Pyx_memviewslice *, int, int);
    3248             : 
    3249             : /* CIntFromPy.proto */
    3250             : static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
    3251             : 
    3252             : /* CIntToPy.proto */
    3253             : static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
    3254             : 
    3255             : /* CIntToPy.proto */
    3256             : static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
    3257             : 
    3258             : /* CIntFromPy.proto */
    3259             : static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
    3260             : 
    3261             : /* CIntFromPy.proto */
    3262             : static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *);
    3263             : 
    3264             : /* FormatTypeName.proto */
    3265             : #if CYTHON_COMPILING_IN_LIMITED_API
    3266             : typedef PyObject *__Pyx_TypeName;
    3267             : #define __Pyx_FMT_TYPENAME "%U"
    3268             : static __Pyx_TypeName __Pyx_PyType_GetName(PyTypeObject* tp);
    3269             : #define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj)
    3270             : #else
    3271             : typedef const char *__Pyx_TypeName;
    3272             : #define __Pyx_FMT_TYPENAME "%.200s"
    3273             : #define __Pyx_PyType_GetName(tp) ((tp)->tp_name)
    3274             : #define __Pyx_DECREF_TypeName(obj)
    3275             : #endif
    3276             : 
    3277             : /* CheckBinaryVersion.proto */
    3278             : static unsigned long __Pyx_get_runtime_version(void);
    3279             : static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer);
    3280             : 
    3281             : /* FunctionImport.proto */
    3282             : static int __Pyx_ImportFunction_3_0_11(PyObject *module, const char *funcname, void (**f)(void), const char *sig);
    3283             : 
    3284             : /* InitStrings.proto */
    3285             : static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
    3286             : 
    3287             : /* #### Code section: module_declarations ### */
    3288             : static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self); /* proto*/
    3289             : static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto*/
    3290             : static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj); /* proto*/
    3291             : static PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src); /* proto*/
    3292             : static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memoryview_obj *__pyx_v_self, struct __pyx_memoryview_obj *__pyx_v_dst, PyObject *__pyx_v_value); /* proto*/
    3293             : static PyObject *__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto*/
    3294             : static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/
    3295             : static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/
    3296             : static PyObject *__pyx_memoryview__get_base(struct __pyx_memoryview_obj *__pyx_v_self); /* proto*/
    3297             : static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/
    3298             : static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/
    3299             : static PyObject *__pyx_memoryviewslice__get_base(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto*/
    3300             : 
    3301             : /* Module declarations from "cython.view" */
    3302             : 
    3303             : /* Module declarations from "cython.dataclasses" */
    3304             : 
    3305             : /* Module declarations from "cython" */
    3306             : 
    3307             : /* Module declarations from "libc.float" */
    3308             : 
    3309             : /* Module declarations from "libc.math" */
    3310             : 
    3311             : /* Module declarations from "scipy.spatial._qhull" */
    3312             : static int (*__pyx_f_5scipy_7spatial_6_qhull__get_delaunay_info)(__pyx_t_5scipy_7spatial_6_qhull_DelaunayInfo_t *, PyObject *, int, int, int); /*proto*/
    3313             : static void (*__pyx_f_5scipy_7spatial_6_qhull__barycentric_coordinates)(int, double *, double const *, double *); /*proto*/
    3314             : static int (*__pyx_f_5scipy_7spatial_6_qhull__find_simplex)(__pyx_t_5scipy_7spatial_6_qhull_DelaunayInfo_t *, double *, double const *, int *, double, double); /*proto*/
    3315             : 
    3316             : /* Module declarations from "scipy.interpolate._interpnd" */
    3317             : static PyObject *__pyx_collections_abc_Sequence = 0;
    3318             : static PyObject *generic = 0;
    3319             : static PyObject *strided = 0;
    3320             : static PyObject *indirect = 0;
    3321             : static PyObject *contiguous = 0;
    3322             : static PyObject *indirect_contiguous = 0;
    3323             : static int __pyx_memoryview_thread_locks_used;
    3324             : static PyThread_type_lock __pyx_memoryview_thread_locks[8];
    3325             : static PyObject *__pyx_f_5scipy_11interpolate_9_interpnd__ndim_coords_from_arrays(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_5scipy_11interpolate_9_interpnd__ndim_coords_from_arrays *__pyx_optional_args); /*proto*/
    3326             : static PyObject *__pyx_f_5scipy_11interpolate_9_interpnd__check_init_shape(PyObject *, PyObject *, struct __pyx_opt_args_5scipy_11interpolate_9_interpnd__check_init_shape *__pyx_optional_args); /*proto*/
    3327             : static int __pyx_f_5scipy_11interpolate_9_interpnd__estimate_gradients_2d_global(__pyx_t_5scipy_7spatial_6_qhull_DelaunayInfo_t const *, double const *, int, double, double *); /*proto*/
    3328             : static PyObject *__pyx_f_5scipy_11interpolate_9_interpnd_estimate_gradients_2d_global(PyObject *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_5scipy_11interpolate_9_interpnd_estimate_gradients_2d_global *__pyx_optional_args); /*proto*/
    3329             : static double __pyx_fuse_0__pyx_f_5scipy_11interpolate_9_interpnd__clough_tocher_2d_single(__pyx_t_5scipy_7spatial_6_qhull_DelaunayInfo_t const *, int, double *, double *, double *); /*proto*/
    3330             : static __pyx_t_double_complex __pyx_fuse_1__pyx_f_5scipy_11interpolate_9_interpnd__clough_tocher_2d_single(__pyx_t_5scipy_7spatial_6_qhull_DelaunayInfo_t const *, int, double *, __pyx_t_double_complex *, __pyx_t_double_complex *); /*proto*/
    3331             : static int __pyx_array_allocate_buffer(struct __pyx_array_obj *); /*proto*/
    3332             : static struct __pyx_array_obj *__pyx_array_new(PyObject *, Py_ssize_t, char *, char *, char *); /*proto*/
    3333             : static PyObject *__pyx_memoryview_new(PyObject *, int, int, __Pyx_TypeInfo *); /*proto*/
    3334             : static CYTHON_INLINE int __pyx_memoryview_check(PyObject *); /*proto*/
    3335             : static PyObject *_unellipsify(PyObject *, int); /*proto*/
    3336             : static int assert_direct_dimensions(Py_ssize_t *, int); /*proto*/
    3337             : static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_obj *, PyObject *); /*proto*/
    3338             : static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *, Py_ssize_t, Py_ssize_t, Py_ssize_t, int, int, int *, Py_ssize_t, Py_ssize_t, Py_ssize_t, int, int, int, int); /*proto*/
    3339             : static char *__pyx_pybuffer_index(Py_buffer *, char *, Py_ssize_t, Py_ssize_t); /*proto*/
    3340             : static int __pyx_memslice_transpose(__Pyx_memviewslice *); /*proto*/
    3341             : static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice, int, PyObject *(*)(char *), int (*)(char *, PyObject *), int); /*proto*/
    3342             : static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
    3343             : static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
    3344             : static PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_obj *); /*proto*/
    3345             : static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
    3346             : static Py_ssize_t abs_py_ssize_t(Py_ssize_t); /*proto*/
    3347             : static char __pyx_get_best_slice_order(__Pyx_memviewslice *, int); /*proto*/
    3348             : static void _copy_strided_to_strided(char *, Py_ssize_t *, char *, Py_ssize_t *, Py_ssize_t *, Py_ssize_t *, int, size_t); /*proto*/
    3349             : static void copy_strided_to_strided(__Pyx_memviewslice *, __Pyx_memviewslice *, int, size_t); /*proto*/
    3350             : static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *, int); /*proto*/
    3351             : static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *, Py_ssize_t *, Py_ssize_t, int, char); /*proto*/
    3352             : static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *, __Pyx_memviewslice *, char, int); /*proto*/
    3353             : static int __pyx_memoryview_err_extents(int, Py_ssize_t, Py_ssize_t); /*proto*/
    3354             : static int __pyx_memoryview_err_dim(PyObject *, PyObject *, int); /*proto*/
    3355             : static int __pyx_memoryview_err(PyObject *, PyObject *); /*proto*/
    3356             : static int __pyx_memoryview_err_no_memory(void); /*proto*/
    3357             : static int __pyx_memoryview_copy_contents(__Pyx_memviewslice, __Pyx_memviewslice, int, int, int); /*proto*/
    3358             : static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *, int, int); /*proto*/
    3359             : static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *, int, int, int); /*proto*/
    3360             : static void __pyx_memoryview_refcount_objects_in_slice_with_gil(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/
    3361             : static void __pyx_memoryview_refcount_objects_in_slice(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/
    3362             : static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *, int, size_t, void *, int); /*proto*/
    3363             : static void __pyx_memoryview__slice_assign_scalar(char *, Py_ssize_t *, Py_ssize_t *, int, size_t, void *); /*proto*/
    3364             : static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *, PyObject *); /*proto*/
    3365             : /* #### Code section: typeinfo ### */
    3366             : static __Pyx_TypeInfo __Pyx_TypeInfo_double__const__ = { "const double", NULL, sizeof(double const ), { 0 }, 0, 'R', 0, 0 };
    3367             : static __Pyx_TypeInfo __Pyx_TypeInfo_int__const__ = { "const int", NULL, sizeof(int const ), { 0 }, 0, __PYX_IS_UNSIGNED(int const ) ? 'U' : 'I', __PYX_IS_UNSIGNED(int const ), 0 };
    3368             : static __Pyx_TypeInfo __Pyx_TypeInfo_double = { "double", NULL, sizeof(double), { 0 }, 0, 'R', 0, 0 };
    3369             : static __Pyx_TypeInfo __Pyx_TypeInfo___pyx_t_double_complex__const__ = { "const double complex", NULL, sizeof(__pyx_t_double_complex const ), { 0 }, 0, 'C', 0, 0 };
    3370             : static __Pyx_TypeInfo __Pyx_TypeInfo___pyx_t_double_complex = { "double complex", NULL, sizeof(__pyx_t_double_complex), { 0 }, 0, 'C', 0, 0 };
    3371             : /* #### Code section: before_global_var ### */
    3372             : #define __Pyx_MODULE_NAME "scipy.interpolate._interpnd"
    3373             : extern int __pyx_module_is_main_scipy__interpolate___interpnd;
    3374             : int __pyx_module_is_main_scipy__interpolate___interpnd = 0;
    3375             : 
    3376             : /* Implementation of "scipy.interpolate._interpnd" */
    3377             : /* #### Code section: global_var ### */
    3378             : static PyObject *__pyx_builtin_Warning;
    3379             : static PyObject *__pyx_builtin_ValueError;
    3380             : static PyObject *__pyx_builtin_range;
    3381             : static PyObject *__pyx_builtin_enumerate;
    3382             : static PyObject *__pyx_builtin_TypeError;
    3383             : static PyObject *__pyx_builtin___import__;
    3384             : static PyObject *__pyx_builtin_MemoryError;
    3385             : static PyObject *__pyx_builtin_AssertionError;
    3386             : static PyObject *__pyx_builtin_Ellipsis;
    3387             : static PyObject *__pyx_builtin_id;
    3388             : static PyObject *__pyx_builtin_IndexError;
    3389             : /* #### Code section: string_decls ### */
    3390             : static const char __pyx_k_[] = ": ";
    3391             : static const char __pyx_k_O[] = "O";
    3392             : static const char __pyx_k_T[] = "T";
    3393             : static const char __pyx_k_c[] = "c";
    3394             : static const char __pyx_k_f[] = "f";
    3395             : static const char __pyx_k_i[] = "i";
    3396             : static const char __pyx_k_j[] = "j";
    3397             : static const char __pyx_k_k[] = "k";
    3398             : static const char __pyx_k_m[] = "m";
    3399             : static const char __pyx_k_r[] = "r";
    3400             : static const char __pyx_k_s[] = "s";
    3401             : static const char __pyx_k_w[] = "w";
    3402             : static const char __pyx_k_y[] = "y";
    3403             : static const char __pyx_k__2[] = ".";
    3404             : static const char __pyx_k__3[] = "*";
    3405             : static const char __pyx_k__6[] = "'";
    3406             : static const char __pyx_k__7[] = ")";
    3407             : static const char __pyx_k_df[] = "df";
    3408             : static const char __pyx_k_gc[] = "gc";
    3409             : static const char __pyx_k_id[] = "id";
    3410             : static const char __pyx_k_np[] = "np";
    3411             : static const char __pyx_k_xi[] = "xi";
    3412             : static const char __pyx_k__19[] = "()";
    3413             : static const char __pyx_k__20[] = "|";
    3414             : static const char __pyx_k__74[] = "?";
    3415             : static const char __pyx_k_abc[] = "abc";
    3416             : static const char __pyx_k_and[] = " and ";
    3417             : static const char __pyx_k_doc[] = "__doc__";
    3418             : static const char __pyx_k_eps[] = "eps";
    3419             : static const char __pyx_k_get[] = "get";
    3420             : static const char __pyx_k_got[] = " (got ";
    3421             : static const char __pyx_k_nan[] = "nan";
    3422             : static const char __pyx_k_new[] = "__new__";
    3423             : static const char __pyx_k_obj[] = "obj";
    3424             : static const char __pyx_k_out[] = "out";
    3425             : static const char __pyx_k_ptp[] = "ptp";
    3426             : static const char __pyx_k_sys[] = "sys";
    3427             : static const char __pyx_k_tol[] = "tol";
    3428             : static const char __pyx_k_tri[] = "tri";
    3429             : static const char __pyx_k_args[] = "args";
    3430             : static const char __pyx_k_axis[] = "axis";
    3431             : static const char __pyx_k_base[] = "base";
    3432             : static const char __pyx_k_call[] = "__call__";
    3433             : static const char __pyx_k_dict[] = "__dict__";
    3434             : static const char __pyx_k_grad[] = "grad";
    3435             : static const char __pyx_k_imag[] = "imag";
    3436             : static const char __pyx_k_info[] = "info";
    3437             : static const char __pyx_k_init[] = "__init__";
    3438             : static const char __pyx_k_main[] = "__main__";
    3439             : static const char __pyx_k_mean[] = "mean";
    3440             : static const char __pyx_k_mode[] = "mode";
    3441             : static const char __pyx_k_name[] = "name";
    3442             : static const char __pyx_k_ndim[] = "ndim";
    3443             : static const char __pyx_k_pack[] = "pack";
    3444             : static const char __pyx_k_prod[] = "prod";
    3445             : static const char __pyx_k_real[] = "real";
    3446             : static const char __pyx_k_self[] = "self";
    3447             : static const char __pyx_k_size[] = "size";
    3448             : static const char __pyx_k_spec[] = "__spec__";
    3449             : static const char __pyx_k_step[] = "step";
    3450             : static const char __pyx_k_stop[] = "stop";
    3451             : static const char __pyx_k_test[] = "__test__";
    3452             : static const char __pyx_k_warn[] = "warn";
    3453             : static const char __pyx_k_ASCII[] = "ASCII";
    3454             : static const char __pyx_k_class[] = "__class__";
    3455             : static const char __pyx_k_count[] = "count";
    3456             : static const char __pyx_k_dtype[] = "dtype";
    3457             : static const char __pyx_k_dummy[] = "dummy";
    3458             : static const char __pyx_k_empty[] = "empty";
    3459             : static const char __pyx_k_error[] = "error";
    3460             : static const char __pyx_k_flags[] = "flags";
    3461             : static const char __pyx_k_index[] = "index";
    3462             : static const char __pyx_k_numpy[] = "numpy";
    3463             : static const char __pyx_k_qhull[] = "qhull";
    3464             : static const char __pyx_k_range[] = "range";
    3465             : static const char __pyx_k_scale[] = "scale";
    3466             : static const char __pyx_k_scipy[] = "scipy";
    3467             : static const char __pyx_k_shape[] = "shape";
    3468             : static const char __pyx_k_split[] = "split";
    3469             : static const char __pyx_k_start[] = "start";
    3470             : static const char __pyx_k_strip[] = "strip";
    3471             : static const char __pyx_k_super[] = "super";
    3472             : static const char __pyx_k_tol_2[] = "_tol";
    3473             : static const char __pyx_k_zeros[] = "zeros";
    3474             : static const char __pyx_k_double[] = "double";
    3475             : static const char __pyx_k_enable[] = "enable";
    3476             : static const char __pyx_k_encode[] = "encode";
    3477             : static const char __pyx_k_format[] = "format";
    3478             : static const char __pyx_k_import[] = "__import__";
    3479             : static const char __pyx_k_kwargs[] = "kwargs";
    3480             : static const char __pyx_k_module[] = "__module__";
    3481             : static const char __pyx_k_name_2[] = "__name__";
    3482             : static const char __pyx_k_offset[] = "offset";
    3483             : static const char __pyx_k_pickle[] = "pickle";
    3484             : static const char __pyx_k_points[] = "points";
    3485             : static const char __pyx_k_reduce[] = "__reduce__";
    3486             : static const char __pyx_k_struct[] = "struct";
    3487             : static const char __pyx_k_unpack[] = "unpack";
    3488             : static const char __pyx_k_update[] = "update";
    3489             : static const char __pyx_k_values[] = "values";
    3490             : static const char __pyx_k_Warning[] = "Warning";
    3491             : static const char __pyx_k_asarray[] = "asarray";
    3492             : static const char __pyx_k_disable[] = "disable";
    3493             : static const char __pyx_k_float64[] = "float64";
    3494             : static const char __pyx_k_fortran[] = "fortran";
    3495             : static const char __pyx_k_maxiter[] = "maxiter";
    3496             : static const char __pyx_k_memview[] = "memview";
    3497             : static const char __pyx_k_npoints[] = "npoints";
    3498             : static const char __pyx_k_nvalues[] = "nvalues";
    3499             : static const char __pyx_k_prepare[] = "__prepare__";
    3500             : static const char __pyx_k_qhull_2[] = "_qhull";
    3501             : static const char __pyx_k_rescale[] = "rescale";
    3502             : static const char __pyx_k_reshape[] = "reshape";
    3503             : static const char __pyx_k_scale_x[] = "_scale_x";
    3504             : static const char __pyx_k_spatial[] = "spatial";
    3505             : static const char __pyx_k_Delaunay[] = "Delaunay";
    3506             : static const char __pyx_k_Ellipsis[] = "Ellipsis";
    3507             : static const char __pyx_k_Sequence[] = "Sequence";
    3508             : static const char __pyx_k_defaults[] = "defaults";
    3509             : static const char __pyx_k_getstate[] = "__getstate__";
    3510             : static const char __pyx_k_isimplex[] = "isimplex";
    3511             : static const char __pyx_k_itemsize[] = "itemsize";
    3512             : static const char __pyx_k_pyx_type[] = "__pyx_type";
    3513             : static const char __pyx_k_qualname[] = "__qualname__";
    3514             : static const char __pyx_k_register[] = "register";
    3515             : static const char __pyx_k_set_name[] = "__set_name__";
    3516             : static const char __pyx_k_setstate[] = "__setstate__";
    3517             : static const char __pyx_k_warnings[] = "warnings";
    3518             : static const char __pyx_k_TypeError[] = "TypeError";
    3519             : static const char __pyx_k_enumerate[] = "enumerate";
    3520             : static const char __pyx_k_eps_broad[] = "eps_broad";
    3521             : static const char __pyx_k_isenabled[] = "isenabled";
    3522             : static const char __pyx_k_maxiter_2[] = "_maxiter";
    3523             : static const char __pyx_k_metaclass[] = "__metaclass__";
    3524             : static const char __pyx_k_pyx_state[] = "__pyx_state";
    3525             : static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
    3526             : static const char __pyx_k_simplices[] = "simplices";
    3527             : static const char __pyx_k_transpose[] = "transpose";
    3528             : static const char __pyx_k_IndexError[] = "IndexError";
    3529             : static const char __pyx_k_ValueError[] = "ValueError";
    3530             : static const char __pyx_k_asanyarray[] = "asanyarray";
    3531             : static const char __pyx_k_complex128[] = "complex128";
    3532             : static const char __pyx_k_fill_value[] = "fill_value";
    3533             : static const char __pyx_k_is_complex[] = "is_complex";
    3534             : static const char __pyx_k_issubdtype[] = "issubdtype";
    3535             : static const char __pyx_k_pyx_result[] = "__pyx_result";
    3536             : static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
    3537             : static const char __pyx_k_set_values[] = "_set_values";
    3538             : static const char __pyx_k_signatures[] = "signatures";
    3539             : static const char __pyx_k_MemoryError[] = "MemoryError";
    3540             : static const char __pyx_k_PickleError[] = "PickleError";
    3541             : static const char __pyx_k_collections[] = "collections";
    3542             : static const char __pyx_k_do_evaluate[] = "_do_evaluate";
    3543             : static const char __pyx_k_mro_entries[] = "__mro_entries__";
    3544             : static const char __pyx_k_need_values[] = "need_values";
    3545             : static const char __pyx_k_initializing[] = "_initializing";
    3546             : static const char __pyx_k_is_coroutine[] = "_is_coroutine";
    3547             : static const char __pyx_k_pyx_checksum[] = "__pyx_checksum";
    3548             : static const char __pyx_k_stringsource[] = "<stringsource>";
    3549             : static const char __pyx_k_values_shape[] = "values_shape";
    3550             : static const char __pyx_k_version_info[] = "version_info";
    3551             : static const char __pyx_k_class_getitem[] = "__class_getitem__";
    3552             : static const char __pyx_k_init_subclass[] = "__init_subclass__";
    3553             : static const char __pyx_k_preprocess_xi[] = "_preprocess_xi";
    3554             : static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
    3555             : static const char __pyx_k_AssertionError[] = "AssertionError";
    3556             : static const char __pyx_k_double_complex[] = "double complex";
    3557             : static const char __pyx_k_fused_sigindex[] = "_fused_sigindex";
    3558             : static const char __pyx_k_View_MemoryView[] = "View.MemoryView";
    3559             : static const char __pyx_k_allocate_buffer[] = "allocate_buffer";
    3560             : static const char __pyx_k_collections_abc[] = "collections.abc";
    3561             : static const char __pyx_k_complexfloating[] = "complexfloating";
    3562             : static const char __pyx_k_dtype_is_object[] = "dtype_is_object";
    3563             : static const char __pyx_k_evaluate_double[] = "_evaluate_double";
    3564             : static const char __pyx_k_need_contiguous[] = "need_contiguous";
    3565             : static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError";
    3566             : static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
    3567             : static const char __pyx_k_broadcast_arrays[] = "broadcast_arrays";
    3568             : static const char __pyx_k_check_call_shape[] = "_check_call_shape";
    3569             : static const char __pyx_k_evaluate_complex[] = "_evaluate_complex";
    3570             : static const char __pyx_k_ascontiguousarray[] = "ascontiguousarray";
    3571             : static const char __pyx_k_pyx_unpickle_Enum[] = "__pyx_unpickle_Enum";
    3572             : static const char __pyx_k_NDInterpolatorBase[] = "NDInterpolatorBase";
    3573             : static const char __pyx_k_asyncio_coroutines[] = "asyncio.coroutines";
    3574             : static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
    3575             : static const char __pyx_k_strided_and_direct[] = "<strided and direct>";
    3576             : static const char __pyx_k_LinearNDInterpolator[] = "LinearNDInterpolator";
    3577             : static const char __pyx_k_scipy_spatial__qhull[] = "scipy.spatial._qhull";
    3578             : static const char __pyx_k_strided_and_indirect[] = "<strided and indirect>";
    3579             : static const char __pyx_k_Invalid_shape_in_axis[] = "Invalid shape in axis ";
    3580             : static const char __pyx_k_contiguous_and_direct[] = "<contiguous and direct>";
    3581             : static const char __pyx_k_Cannot_index_with_type[] = "Cannot index with type '";
    3582             : static const char __pyx_k_MemoryView_of_r_object[] = "<MemoryView of %r object>";
    3583             : static const char __pyx_k_MemoryView_of_r_at_0x_x[] = "<MemoryView of %r at 0x%x>";
    3584             : static const char __pyx_k_calculate_triangulation[] = "_calculate_triangulation";
    3585             : static const char __pyx_k_contiguous_and_indirect[] = "<contiguous and indirect>";
    3586             : static const char __pyx_k_ndim_coords_from_arrays[] = "_ndim_coords_from_arrays";
    3587             : static const char __pyx_k_Dimension_d_is_not_direct[] = "Dimension %d is not direct";
    3588             : static const char __pyx_k_GradientEstimationWarning[] = "GradientEstimationWarning";
    3589             : static const char __pyx_k_NDInterpolatorBase___call[] = "NDInterpolatorBase.__call__";
    3590             : static const char __pyx_k_NDInterpolatorBase___init[] = "NDInterpolatorBase.__init__";
    3591             : static const char __pyx_k_CloughTocher2DInterpolator[] = "CloughTocher2DInterpolator";
    3592             : static const char __pyx_k_Index_out_of_bounds_axis_d[] = "Index out of bounds (axis %d)";
    3593             : static const char __pyx_k_interpolation_points_shape[] = "interpolation_points_shape";
    3594             : static const char __pyx_k_LinearNDInterpolator___init[] = "LinearNDInterpolator.__init__";
    3595             : static const char __pyx_k_NDInterpolatorBase__scale_x[] = "NDInterpolatorBase._scale_x";
    3596             : static const char __pyx_k_No_matching_signature_found[] = "No matching signature found";
    3597             : static const char __pyx_k_Step_may_not_be_zero_axis_d[] = "Step may not be zero (axis %d)";
    3598             : static const char __pyx_k_itemsize_0_for_cython_array[] = "itemsize <= 0 for cython.array";
    3599             : static const char __pyx_k_scipy_interpolate__interpnd[] = "scipy.interpolate._interpnd";
    3600             : static const char __pyx_k_estimate_gradients_2d_global[] = "estimate_gradients_2d_global";
    3601             : static const char __pyx_k_unable_to_allocate_array_data[] = "unable to allocate array data.";
    3602             : static const char __pyx_k_y_has_a_wrong_number_of_items[] = "'y' has a wrong number of items";
    3603             : static const char __pyx_k_NDInterpolatorBase__set_values[] = "NDInterpolatorBase._set_values";
    3604             : static const char __pyx_k_strided_and_direct_or_indirect[] = "<strided and direct or indirect>";
    3605             : static const char __pyx_k_CloughTocher2DInterpolator__set[] = "CloughTocher2DInterpolator._set_values";
    3606             : static const char __pyx_k_Common_routines_for_interpolato[] = "\n    Common routines for interpolators.\n\n    .. versionadded:: 0.9\n\n    ";
    3607             : static const char __pyx_k_LinearNDInterpolator__calculate[] = "LinearNDInterpolator._calculate_triangulation";
    3608             : static const char __pyx_k_LinearNDInterpolator_points_val[] = "\n    LinearNDInterpolator(points, values, fill_value=np.nan, rescale=False)\n\n    Piecewise linear interpolator in N > 1 dimensions.\n\n    .. versionadded:: 0.9\n\n    Methods\n    -------\n    __call__\n\n    Parameters\n    ----------\n    points : ndarray of floats, shape (npoints, ndims); or Delaunay\n        2-D array of data point coordinates, or a precomputed Delaunay triangulation.\n    values : ndarray of float or complex, shape (npoints, ...), optional\n        N-D array of data values at `points`.  The length of `values` along the\n        first axis must be equal to the length of `points`. Unlike some\n        interpolators, the interpolation axis cannot be changed.\n    fill_value : float, optional\n        Value used to fill in for requested points outside of the\n        convex hull of the input points.  If not provided, then\n        the default is ``nan``.\n    rescale : bool, optional\n        Rescale points to unit cube before performing interpolation.\n        This is useful if some of the input dimensions have\n        incommensurable units and differ by many orders of magnitude.\n\n    Notes\n    -----\n    The interpolant is constructed by triangulating the input data\n    with Qhull [1]_, and on each triangle performing linear\n    barycentric interpolation.\n\n    .. note:: For data on a regular grid use `interpn` instead.\n\n    Examples\n    --------\n    We can interpolate values on a 2D plane:\n\n    >>> from scipy.interpolate import LinearNDInterpolator\n    >>> import numpy as np\n    >>> import matplotlib.pyplot as plt\n    >>> rng = np.random.default_rng()\n    >>> x = rng.random(10) - 0.5\n    >>> y = rng.random(10) - 0.5\n    >>> z = np.hypot(x, y)\n    >>> X = np.linspace(min(x), max(x))\n    >>> Y = np.linspace(min(y), max(y))\n    >>> X, Y = np.meshgrid(X, Y)  # 2D grid for interpolation\n    >>> interp = LinearNDInterpolator(list(zip(x, y)), z)\n    >>> Z = interp(X, Y)\n    >>> plt.pcolormesh(X, Y, Z, shading='auto')\n    >"">> plt.plot(x, y, \"ok\", label=\"input point\")\n    >>> plt.legend()\n    >>> plt.colorbar()\n    >>> plt.axis(\"equal\")\n    >>> plt.show()\n\n    See also\n    --------\n    griddata :\n        Interpolate unstructured D-D data.\n    NearestNDInterpolator :\n        Nearest-neighbor interpolator in N dimensions.\n    CloughTocher2DInterpolator :\n        Piecewise cubic, C1 smooth, curvature-minimizing interpolator in 2D.\n    interpn : Interpolation on a regular grid or rectilinear grid.\n    RegularGridInterpolator : Interpolator on a regular or rectilinear grid\n                              in arbitrary dimensions (`interpn` wraps this\n                              class).\n\n    References\n    ----------\n    .. [1] http://www.qhull.org/\n\n    ";
    3609             : static const char __pyx_k_Rescaling_is_not_supported_when[] = "Rescaling is not supported when passing a Delaunay triangulation as ``points``.";
    3610             : static const char __pyx_k_Simple_N_D_interpolation_versio[] = "\nSimple N-D interpolation\n\n.. versionadded:: 0.9\n\n";
    3611             : static const char __pyx_k_home_czgdp18079_Quansight_scipy[] = "/home/czgdp18079/Quansight/scipy/scipy/interpolate/_interpnd.pyx";
    3612             : static const char __pyx_k_input_data_must_be_at_least_2_D[] = "input data must be at least 2-D";
    3613             : static const char __pyx_k_number_of_dimensions_in_xi_does[] = "number of dimensions in xi does not match x";
    3614             : static const char __pyx_k_All_dimensions_preceding_dimensi[] = "All dimensions preceding dimension %d must be indexed and not sliced";
    3615             : static const char __pyx_k_Buffer_view_does_not_expose_stri[] = "Buffer view does not expose strides";
    3616             : static const char __pyx_k_Can_only_create_a_buffer_that_is[] = "Can only create a buffer that is contiguous in memory.";
    3617             : static const char __pyx_k_Cannot_assign_to_read_only_memor[] = "Cannot assign to read-only memoryview";
    3618             : static const char __pyx_k_Cannot_create_writable_memory_vi[] = "Cannot create writable memory view from read-only memoryview";
    3619             : static const char __pyx_k_Cannot_transpose_memoryview_with[] = "Cannot transpose memoryview with indirect dimensions";
    3620             : static const char __pyx_k_CloughTocher2DInterpolator___ini[] = "CloughTocher2DInterpolator.__init__";
    3621             : static const char __pyx_k_CloughTocher2DInterpolator__calc[] = "CloughTocher2DInterpolator._calculate_triangulation";
    3622             : static const char __pyx_k_CloughTocher2DInterpolator__do_e[] = "CloughTocher2DInterpolator._do_evaluate";
    3623             : static const char __pyx_k_CloughTocher2DInterpolator__eval[] = "CloughTocher2DInterpolator._evaluate_double";
    3624             : static const char __pyx_k_CloughTocher2DInterpolator_point[] = "CloughTocher2DInterpolator(points, values, tol=1e-6).\n\n    Piecewise cubic, C1 smooth, curvature-minimizing interpolator in 2D.\n\n    .. versionadded:: 0.9\n\n    Methods\n    -------\n    __call__\n\n    Parameters\n    ----------\n    points : ndarray of floats, shape (npoints, ndims); or Delaunay\n        2-D array of data point coordinates, or a precomputed Delaunay triangulation.\n    values : ndarray of float or complex, shape (npoints, ...)\n        N-D array of data values at `points`. The length of `values` along the\n        first axis must be equal to the length of `points`. Unlike some\n        interpolators, the interpolation axis cannot be changed.\n    fill_value : float, optional\n        Value used to fill in for requested points outside of the\n        convex hull of the input points.  If not provided, then\n        the default is ``nan``.\n    tol : float, optional\n        Absolute/relative tolerance for gradient estimation.\n    maxiter : int, optional\n        Maximum number of iterations in gradient estimation.\n    rescale : bool, optional\n        Rescale points to unit cube before performing interpolation.\n        This is useful if some of the input dimensions have\n        incommensurable units and differ by many orders of magnitude.\n\n    Notes\n    -----\n    The interpolant is constructed by triangulating the input data\n    with Qhull [1]_, and constructing a piecewise cubic\n    interpolating Bezier polynomial on each triangle, using a\n    Clough-Tocher scheme [CT]_.  The interpolant is guaranteed to be\n    continuously differentiable.\n\n    The gradients of the interpolant are chosen so that the curvature\n    of the interpolating surface is approximatively minimized. The\n    gradients necessary for this are estimated using the global\n    algorithm described in [Nielson83]_ and [Renka84]_.\n\n    .. note:: For data on a regular grid use `interpn` instead.\n\n    Examples\n    --------\n    We can interpolate values on a 2D ""plane:\n\n    >>> from scipy.interpolate import CloughTocher2DInterpolator\n    >>> import numpy as np\n    >>> import matplotlib.pyplot as plt\n    >>> rng = np.random.default_rng()\n    >>> x = rng.random(10) - 0.5\n    >>> y = rng.random(10) - 0.5\n    >>> z = np.hypot(x, y)\n    >>> X = np.linspace(min(x), max(x))\n    >>> Y = np.linspace(min(y), max(y))\n    >>> X, Y = np.meshgrid(X, Y)  # 2D grid for interpolation\n    >>> interp = CloughTocher2DInterpolator(list(zip(x, y)), z)\n    >>> Z = interp(X, Y)\n    >>> plt.pcolormesh(X, Y, Z, shading='auto')\n    >>> plt.plot(x, y, \"ok\", label=\"input point\")\n    >>> plt.legend()\n    >>> plt.colorbar()\n    >>> plt.axis(\"equal\")\n    >>> plt.show()\n\n    See also\n    --------\n    griddata :\n        Interpolate unstructured D-D data.\n    LinearNDInterpolator :\n        Piecewise linear interpolator in N > 1 dimensions.\n    NearestNDInterpolator :\n        Nearest-neighbor interpolator in N > 1 dimensions.\n    interpn : Interpolation on a regular grid or rectilinear grid.\n    RegularGridInterpolator : Interpolator on a regular or rectilinear grid\n                              in arbitrary dimensions (`interpn` wraps this\n                              class).\n\n    References\n    ----------\n    .. [1] http://www.qhull.org/\n\n    .. [CT] See, for example,\n       P. Alfeld,\n       ''A trivariate Clough-Tocher scheme for tetrahedral data''.\n       Computer Aided Geometric Design, 1, 169 (1984);\n       G. Farin,\n       ''Triangular Bernstein-Bezier patches''.\n       Computer Aided Geometric Design, 3, 83 (1986).\n\n    .. [Nielson83] G. Nielson,\n       ''A method for interpolating scattered data based upon a minimum norm\n       network''.\n       Math. Comp., 40, 253 (1983).\n\n    .. [Renka84] R. J. Renka and A. K. Cline.\n       ''A Triangle-based C1 interpolation method.'',\n       Rocky Mountain J. Math., 14, 223 (1984).\n\n    ";
    3625             : static const char __pyx_k_Empty_shape_tuple_for_cython_arr[] = "Empty shape tuple for cython.array";
    3626             : static const char __pyx_k_Expected_at_least_d_argument_s_g[] = "Expected at least %d argument%s, got %d";
    3627             : static const char __pyx_k_Function_call_with_ambiguous_arg[] = "Function call with ambiguous argument types";
    3628             : static const char __pyx_k_Gradient_estimation_did_not_conv[] = "Gradient estimation did not converge, the results may be inaccurate";
    3629             : static const char __pyx_k_Incompatible_checksums_0x_x_vs_0[] = "Incompatible checksums (0x%x vs (0x82a3537, 0x6ae9995, 0xb068931) = (name))";
    3630             : static const char __pyx_k_Indirect_dimensions_not_supporte[] = "Indirect dimensions not supported";
    3631             : static const char __pyx_k_Invalid_mode_expected_c_or_fortr[] = "Invalid mode, expected 'c' or 'fortran', got ";
    3632             : static const char __pyx_k_LinearNDInterpolator__do_evaluat[] = "LinearNDInterpolator._do_evaluate";
    3633             : static const char __pyx_k_LinearNDInterpolator__evaluate_c[] = "LinearNDInterpolator._evaluate_complex";
    3634             : static const char __pyx_k_LinearNDInterpolator__evaluate_d[] = "LinearNDInterpolator._evaluate_double";
    3635             : static const char __pyx_k_NDInterpolatorBase__calculate_tr[] = "NDInterpolatorBase._calculate_triangulation";
    3636             : static const char __pyx_k_NDInterpolatorBase__check_call_s[] = "NDInterpolatorBase._check_call_shape";
    3637             : static const char __pyx_k_NDInterpolatorBase__preprocess_x[] = "NDInterpolatorBase._preprocess_xi";
    3638             : static const char __pyx_k_Out_of_bounds_on_buffer_access_a[] = "Out of bounds on buffer access (axis ";
    3639             : static const char __pyx_k_Unable_to_convert_item_to_object[] = "Unable to convert item to object";
    3640             : static const char __pyx_k_coordinate_arrays_do_not_have_th[] = "coordinate arrays do not have the same shape";
    3641             : static const char __pyx_k_different_number_of_values_and_p[] = "different number of values and points";
    3642             : static const char __pyx_k_got_differing_extents_in_dimensi[] = "got differing extents in dimension ";
    3643             : static const char __pyx_k_invalid_shape_for_input_data_poi[] = "invalid shape for input data points";
    3644             : static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__";
    3645             : static const char __pyx_k_this_mode_of_interpolation_avail[] = "this mode of interpolation available only for %d-D data";
    3646             : static const char __pyx_k_unable_to_allocate_shape_and_str[] = "unable to allocate shape and strides.";
    3647             : static const char __pyx_k_CloughTocher2DInterpolator__eval_2[] = "CloughTocher2DInterpolator._evaluate_complex";
    3648             : /* #### Code section: decls ### */
    3649             : static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, PyObject *__pyx_v_format, PyObject *__pyx_v_mode, int __pyx_v_allocate_buffer); /* proto */
    3650             : static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(struct __pyx_array_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
    3651             : static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struct __pyx_array_obj *__pyx_v_self); /* proto */
    3652             : static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct __pyx_array_obj *__pyx_v_self); /* proto */
    3653             : static Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(struct __pyx_array_obj *__pyx_v_self); /* proto */
    3654             : static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr); /* proto */
    3655             : static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item); /* proto */
    3656             : static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value); /* proto */
    3657             : static PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self); /* proto */
    3658             : static PyObject *__pyx_pf___pyx_array_2__setstate_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
    3659             : static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
    3660             : static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */
    3661             : static PyObject *__pyx_pf___pyx_MemviewEnum___reduce_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */
    3662             : static PyObject *__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
    3663             : static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_v_flags, int __pyx_v_dtype_is_object); /* proto */
    3664             : static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
    3665             : static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
    3666             : static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto */
    3667             : static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(struct __pyx_memoryview_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
    3668             : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
    3669             : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
    3670             : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
    3671             : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
    3672             : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
    3673             : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
    3674             : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
    3675             : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
    3676             : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
    3677             : static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
    3678             : static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
    3679             : static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
    3680             : static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
    3681             : static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
    3682             : static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
    3683             : static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
    3684             : static PyObject *__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
    3685             : static PyObject *__pyx_pf___pyx_memoryview_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
    3686             : static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
    3687             : static PyObject *__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
    3688             : static PyObject *__pyx_pf___pyx_memoryviewslice_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
    3689             : static PyObject *__pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
    3690             : static PyObject *__pyx_pf_5scipy_11interpolate_9_interpnd_4__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
    3691             : static PyObject *__pyx_pf_5scipy_11interpolate_9_interpnd_18NDInterpolatorBase___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_points, PyObject *__pyx_v_values, PyObject *__pyx_v_fill_value, PyObject *__pyx_v_ndim, PyObject *__pyx_v_rescale, PyObject *__pyx_v_need_contiguous, PyObject *__pyx_v_need_values); /* proto */
    3692             : static PyObject *__pyx_pf_5scipy_11interpolate_9_interpnd_18NDInterpolatorBase_2_calculate_triangulation(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_points); /* proto */
    3693             : static PyObject *__pyx_pf_5scipy_11interpolate_9_interpnd_6__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
    3694             : static PyObject *__pyx_pf_5scipy_11interpolate_9_interpnd_18NDInterpolatorBase_4_set_values(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_values, PyObject *__pyx_v_fill_value, PyObject *__pyx_v_need_contiguous, PyObject *__pyx_v_ndim); /* proto */
    3695             : static PyObject *__pyx_pf_5scipy_11interpolate_9_interpnd_18NDInterpolatorBase_6_check_call_shape(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_xi); /* proto */
    3696             : static PyObject *__pyx_pf_5scipy_11interpolate_9_interpnd_18NDInterpolatorBase_8_scale_x(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_xi); /* proto */
    3697             : static PyObject *__pyx_pf_5scipy_11interpolate_9_interpnd_18NDInterpolatorBase_10_preprocess_xi(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args); /* proto */
    3698             : static PyObject *__pyx_pf_5scipy_11interpolate_9_interpnd_18NDInterpolatorBase_12__call__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args); /* proto */
    3699             : static PyObject *__pyx_pf_5scipy_11interpolate_9_interpnd__ndim_coords_from_arrays(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_points, PyObject *__pyx_v_ndim); /* proto */
    3700             : static PyObject *__pyx_pf_5scipy_11interpolate_9_interpnd_8__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
    3701             : static PyObject *__pyx_pf_5scipy_11interpolate_9_interpnd_20LinearNDInterpolator___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_points, PyObject *__pyx_v_values, PyObject *__pyx_v_fill_value, PyObject *__pyx_v_rescale); /* proto */
    3702             : static PyObject *__pyx_pf_5scipy_11interpolate_9_interpnd_20LinearNDInterpolator_2_calculate_triangulation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_points); /* proto */
    3703             : static PyObject *__pyx_pf_5scipy_11interpolate_9_interpnd_20LinearNDInterpolator_4_evaluate_double(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_xi); /* proto */
    3704             : static PyObject *__pyx_pf_5scipy_11interpolate_9_interpnd_20LinearNDInterpolator_6_evaluate_complex(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_xi); /* proto */
    3705             : static PyObject *__pyx_pf_5scipy_11interpolate_9_interpnd_20LinearNDInterpolator_8_do_evaluate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_signatures, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs, CYTHON_UNUSED PyObject *__pyx_v_defaults, PyObject *__pyx_v__fused_sigindex); /* proto */
    3706             : static PyObject *__pyx_pf_5scipy_11interpolate_9_interpnd_20LinearNDInterpolator_10_do_evaluate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, __Pyx_memviewslice __pyx_v_xi, CYTHON_UNUSED double __pyx_v_dummy); /* proto */
    3707             : static PyObject *__pyx_pf_5scipy_11interpolate_9_interpnd_20LinearNDInterpolator_12_do_evaluate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, __Pyx_memviewslice __pyx_v_xi, CYTHON_UNUSED __pyx_t_double_complex __pyx_v_dummy); /* proto */
    3708             : static PyObject *__pyx_pf_5scipy_11interpolate_9_interpnd_2estimate_gradients_2d_global(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_tri, PyObject *__pyx_v_y, int __pyx_v_maxiter, double __pyx_v_tol); /* proto */
    3709             : static PyObject *__pyx_pf_5scipy_11interpolate_9_interpnd_10__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
    3710             : static PyObject *__pyx_pf_5scipy_11interpolate_9_interpnd_26CloughTocher2DInterpolator___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_points, PyObject *__pyx_v_values, PyObject *__pyx_v_fill_value, PyObject *__pyx_v_tol, PyObject *__pyx_v_maxiter, PyObject *__pyx_v_rescale); /* proto */
    3711             : static PyObject *__pyx_pf_5scipy_11interpolate_9_interpnd_12__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
    3712             : static PyObject *__pyx_pf_5scipy_11interpolate_9_interpnd_26CloughTocher2DInterpolator_2_set_values(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_values, PyObject *__pyx_v_fill_value, PyObject *__pyx_v_need_contiguous, PyObject *__pyx_v_ndim); /* proto */
    3713             : static PyObject *__pyx_pf_5scipy_11interpolate_9_interpnd_26CloughTocher2DInterpolator_4_calculate_triangulation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_points); /* proto */
    3714             : static PyObject *__pyx_pf_5scipy_11interpolate_9_interpnd_26CloughTocher2DInterpolator_6_evaluate_double(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_xi); /* proto */
    3715             : static PyObject *__pyx_pf_5scipy_11interpolate_9_interpnd_26CloughTocher2DInterpolator_8_evaluate_complex(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_xi); /* proto */
    3716             : static PyObject *__pyx_pf_5scipy_11interpolate_9_interpnd_26CloughTocher2DInterpolator_10_do_evaluate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_signatures, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs, CYTHON_UNUSED PyObject *__pyx_v_defaults, PyObject *__pyx_v__fused_sigindex); /* proto */
    3717             : static PyObject *__pyx_pf_5scipy_11interpolate_9_interpnd_26CloughTocher2DInterpolator_12_do_evaluate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, __Pyx_memviewslice __pyx_v_xi, CYTHON_UNUSED double __pyx_v_dummy); /* proto */
    3718             : static PyObject *__pyx_pf_5scipy_11interpolate_9_interpnd_26CloughTocher2DInterpolator_14_do_evaluate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, __Pyx_memviewslice __pyx_v_xi, CYTHON_UNUSED __pyx_t_double_complex __pyx_v_dummy); /* proto */
    3719             : static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
    3720             : static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
    3721             : static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
    3722             : static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
    3723             : static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_get = {0, 0, 0, 0, 0};
    3724             : static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_values = {0, 0, 0, 0, 0};
    3725             : /* #### Code section: late_includes ### */
    3726             : /* #### Code section: module_state ### */
    3727             : typedef struct {
    3728             :   PyObject *__pyx_d;
    3729             :   PyObject *__pyx_b;
    3730             :   PyObject *__pyx_cython_runtime;
    3731             :   PyObject *__pyx_empty_tuple;
    3732             :   PyObject *__pyx_empty_bytes;
    3733             :   PyObject *__pyx_empty_unicode;
    3734             :   #ifdef __Pyx_CyFunction_USED
    3735             :   PyTypeObject *__pyx_CyFunctionType;
    3736             :   #endif
    3737             :   #ifdef __Pyx_FusedFunction_USED
    3738             :   PyTypeObject *__pyx_FusedFunctionType;
    3739             :   #endif
    3740             :   #ifdef __Pyx_Generator_USED
    3741             :   PyTypeObject *__pyx_GeneratorType;
    3742             :   #endif
    3743             :   #ifdef __Pyx_IterableCoroutine_USED
    3744             :   PyTypeObject *__pyx_IterableCoroutineType;
    3745             :   #endif
    3746             :   #ifdef __Pyx_Coroutine_USED
    3747             :   PyTypeObject *__pyx_CoroutineAwaitType;
    3748             :   #endif
    3749             :   #ifdef __Pyx_Coroutine_USED
    3750             :   PyTypeObject *__pyx_CoroutineType;
    3751             :   #endif
    3752             :   #if CYTHON_USE_MODULE_STATE
    3753             :   #endif
    3754             :   #if CYTHON_USE_MODULE_STATE
    3755             :   #endif
    3756             :   #if CYTHON_USE_MODULE_STATE
    3757             :   #endif
    3758             :   #if CYTHON_USE_MODULE_STATE
    3759             :   #endif
    3760             :   #if CYTHON_USE_MODULE_STATE
    3761             :   #endif
    3762             :   #if CYTHON_USE_MODULE_STATE
    3763             :   #endif
    3764             :   #if CYTHON_USE_MODULE_STATE
    3765             :   PyObject *__pyx_type___pyx_array;
    3766             :   PyObject *__pyx_type___pyx_MemviewEnum;
    3767             :   PyObject *__pyx_type___pyx_memoryview;
    3768             :   PyObject *__pyx_type___pyx_memoryviewslice;
    3769             :   #endif
    3770             :   PyTypeObject *__pyx_array_type;
    3771             :   PyTypeObject *__pyx_MemviewEnum_type;
    3772             :   PyTypeObject *__pyx_memoryview_type;
    3773             :   PyTypeObject *__pyx_memoryviewslice_type;
    3774             :   PyObject *__pyx_kp_u_;
    3775             :   PyObject *__pyx_n_s_ASCII;
    3776             :   PyObject *__pyx_kp_s_All_dimensions_preceding_dimensi;
    3777             :   PyObject *__pyx_n_s_AssertionError;
    3778             :   PyObject *__pyx_kp_s_Buffer_view_does_not_expose_stri;
    3779             :   PyObject *__pyx_kp_s_Can_only_create_a_buffer_that_is;
    3780             :   PyObject *__pyx_kp_s_Cannot_assign_to_read_only_memor;
    3781             :   PyObject *__pyx_kp_s_Cannot_create_writable_memory_vi;
    3782             :   PyObject *__pyx_kp_u_Cannot_index_with_type;
    3783             :   PyObject *__pyx_kp_s_Cannot_transpose_memoryview_with;
    3784             :   PyObject *__pyx_n_s_CloughTocher2DInterpolator;
    3785             :   PyObject *__pyx_n_s_CloughTocher2DInterpolator___ini;
    3786             :   PyObject *__pyx_n_s_CloughTocher2DInterpolator__calc;
    3787             :   PyObject *__pyx_n_s_CloughTocher2DInterpolator__do_e;
    3788             :   PyObject *__pyx_n_s_CloughTocher2DInterpolator__eval;
    3789             :   PyObject *__pyx_n_s_CloughTocher2DInterpolator__eval_2;
    3790             :   PyObject *__pyx_n_s_CloughTocher2DInterpolator__set;
    3791             :   PyObject *__pyx_kp_s_CloughTocher2DInterpolator_point;
    3792             :   PyObject *__pyx_kp_s_Common_routines_for_interpolato;
    3793             :   PyObject *__pyx_n_s_Delaunay;
    3794             :   PyObject *__pyx_kp_s_Dimension_d_is_not_direct;
    3795             :   PyObject *__pyx_n_s_Ellipsis;
    3796             :   PyObject *__pyx_kp_s_Empty_shape_tuple_for_cython_arr;
    3797             :   PyObject *__pyx_kp_s_Expected_at_least_d_argument_s_g;
    3798             :   PyObject *__pyx_kp_s_Function_call_with_ambiguous_arg;
    3799             :   PyObject *__pyx_n_s_GradientEstimationWarning;
    3800             :   PyObject *__pyx_kp_u_Gradient_estimation_did_not_conv;
    3801             :   PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0;
    3802             :   PyObject *__pyx_n_s_IndexError;
    3803             :   PyObject *__pyx_kp_s_Index_out_of_bounds_axis_d;
    3804             :   PyObject *__pyx_kp_s_Indirect_dimensions_not_supporte;
    3805             :   PyObject *__pyx_kp_u_Invalid_mode_expected_c_or_fortr;
    3806             :   PyObject *__pyx_kp_u_Invalid_shape_in_axis;
    3807             :   PyObject *__pyx_n_s_LinearNDInterpolator;
    3808             :   PyObject *__pyx_n_s_LinearNDInterpolator___init;
    3809             :   PyObject *__pyx_n_s_LinearNDInterpolator__calculate;
    3810             :   PyObject *__pyx_n_s_LinearNDInterpolator__do_evaluat;
    3811             :   PyObject *__pyx_n_s_LinearNDInterpolator__evaluate_c;
    3812             :   PyObject *__pyx_n_s_LinearNDInterpolator__evaluate_d;
    3813             :   PyObject *__pyx_kp_s_LinearNDInterpolator_points_val;
    3814             :   PyObject *__pyx_n_s_MemoryError;
    3815             :   PyObject *__pyx_kp_s_MemoryView_of_r_at_0x_x;
    3816             :   PyObject *__pyx_kp_s_MemoryView_of_r_object;
    3817             :   PyObject *__pyx_n_s_NDInterpolatorBase;
    3818             :   PyObject *__pyx_n_s_NDInterpolatorBase___call;
    3819             :   PyObject *__pyx_n_s_NDInterpolatorBase___init;
    3820             :   PyObject *__pyx_n_s_NDInterpolatorBase__calculate_tr;
    3821             :   PyObject *__pyx_n_s_NDInterpolatorBase__check_call_s;
    3822             :   PyObject *__pyx_n_s_NDInterpolatorBase__preprocess_x;
    3823             :   PyObject *__pyx_n_s_NDInterpolatorBase__scale_x;
    3824             :   PyObject *__pyx_n_s_NDInterpolatorBase__set_values;
    3825             :   PyObject *__pyx_kp_s_No_matching_signature_found;
    3826             :   PyObject *__pyx_n_b_O;
    3827             :   PyObject *__pyx_kp_u_Out_of_bounds_on_buffer_access_a;
    3828             :   PyObject *__pyx_n_s_PickleError;
    3829             :   PyObject *__pyx_kp_u_Rescaling_is_not_supported_when;
    3830             :   PyObject *__pyx_n_s_Sequence;
    3831             :   PyObject *__pyx_kp_s_Step_may_not_be_zero_axis_d;
    3832             :   PyObject *__pyx_n_s_T;
    3833             :   PyObject *__pyx_n_s_TypeError;
    3834             :   PyObject *__pyx_kp_s_Unable_to_convert_item_to_object;
    3835             :   PyObject *__pyx_n_s_ValueError;
    3836             :   PyObject *__pyx_n_s_View_MemoryView;
    3837             :   PyObject *__pyx_n_s_Warning;
    3838             :   PyObject *__pyx_kp_s__19;
    3839             :   PyObject *__pyx_kp_u__2;
    3840             :   PyObject *__pyx_kp_s__20;
    3841             :   PyObject *__pyx_kp_u__20;
    3842             :   PyObject *__pyx_n_s__3;
    3843             :   PyObject *__pyx_kp_u__6;
    3844             :   PyObject *__pyx_kp_u__7;
    3845             :   PyObject *__pyx_n_s__74;
    3846             :   PyObject *__pyx_n_s_abc;
    3847             :   PyObject *__pyx_n_s_allocate_buffer;
    3848             :   PyObject *__pyx_kp_u_and;
    3849             :   PyObject *__pyx_n_s_args;
    3850             :   PyObject *__pyx_n_s_asanyarray;
    3851             :   PyObject *__pyx_n_s_asarray;
    3852             :   PyObject *__pyx_n_s_ascontiguousarray;
    3853             :   PyObject *__pyx_n_s_asyncio_coroutines;
    3854             :   PyObject *__pyx_n_s_axis;
    3855             :   PyObject *__pyx_n_s_base;
    3856             :   PyObject *__pyx_n_s_broadcast_arrays;
    3857             :   PyObject *__pyx_n_s_c;
    3858             :   PyObject *__pyx_n_u_c;
    3859             :   PyObject *__pyx_n_s_calculate_triangulation;
    3860             :   PyObject *__pyx_n_s_call;
    3861             :   PyObject *__pyx_n_s_check_call_shape;
    3862             :   PyObject *__pyx_n_s_class;
    3863             :   PyObject *__pyx_n_s_class_getitem;
    3864             :   PyObject *__pyx_n_s_cline_in_traceback;
    3865             :   PyObject *__pyx_n_s_collections;
    3866             :   PyObject *__pyx_kp_s_collections_abc;
    3867             :   PyObject *__pyx_n_s_complex128;
    3868             :   PyObject *__pyx_n_s_complexfloating;
    3869             :   PyObject *__pyx_kp_s_contiguous_and_direct;
    3870             :   PyObject *__pyx_kp_s_contiguous_and_indirect;
    3871             :   PyObject *__pyx_kp_u_coordinate_arrays_do_not_have_th;
    3872             :   PyObject *__pyx_n_s_count;
    3873             :   PyObject *__pyx_n_s_defaults;
    3874             :   PyObject *__pyx_n_s_df;
    3875             :   PyObject *__pyx_n_s_dict;
    3876             :   PyObject *__pyx_kp_u_different_number_of_values_and_p;
    3877             :   PyObject *__pyx_kp_u_disable;
    3878             :   PyObject *__pyx_n_s_do_evaluate;
    3879             :   PyObject *__pyx_n_s_doc;
    3880             :   PyObject *__pyx_n_s_double;
    3881             :   PyObject *__pyx_kp_s_double_complex;
    3882             :   PyObject *__pyx_n_s_dtype;
    3883             :   PyObject *__pyx_n_s_dtype_is_object;
    3884             :   PyObject *__pyx_n_s_dummy;
    3885             :   PyObject *__pyx_n_s_empty;
    3886             :   PyObject *__pyx_kp_u_enable;
    3887             :   PyObject *__pyx_n_s_encode;
    3888             :   PyObject *__pyx_n_s_enumerate;
    3889             :   PyObject *__pyx_n_s_eps;
    3890             :   PyObject *__pyx_n_s_eps_broad;
    3891             :   PyObject *__pyx_n_s_error;
    3892             :   PyObject *__pyx_n_s_estimate_gradients_2d_global;
    3893             :   PyObject *__pyx_n_s_evaluate_complex;
    3894             :   PyObject *__pyx_n_s_evaluate_double;
    3895             :   PyObject *__pyx_n_s_f;
    3896             :   PyObject *__pyx_n_s_fill_value;
    3897             :   PyObject *__pyx_n_s_flags;
    3898             :   PyObject *__pyx_n_s_float64;
    3899             :   PyObject *__pyx_n_s_format;
    3900             :   PyObject *__pyx_n_s_fortran;
    3901             :   PyObject *__pyx_n_u_fortran;
    3902             :   PyObject *__pyx_n_s_fused_sigindex;
    3903             :   PyObject *__pyx_kp_u_gc;
    3904             :   PyObject *__pyx_n_s_get;
    3905             :   PyObject *__pyx_n_s_getstate;
    3906             :   PyObject *__pyx_kp_u_got;
    3907             :   PyObject *__pyx_kp_u_got_differing_extents_in_dimensi;
    3908             :   PyObject *__pyx_n_s_grad;
    3909             :   PyObject *__pyx_kp_s_home_czgdp18079_Quansight_scipy;
    3910             :   PyObject *__pyx_n_s_i;
    3911             :   PyObject *__pyx_n_s_id;
    3912             :   PyObject *__pyx_n_s_imag;
    3913             :   PyObject *__pyx_n_s_import;
    3914             :   PyObject *__pyx_n_s_index;
    3915             :   PyObject *__pyx_n_s_info;
    3916             :   PyObject *__pyx_n_s_init;
    3917             :   PyObject *__pyx_n_s_init_subclass;
    3918             :   PyObject *__pyx_n_s_initializing;
    3919             :   PyObject *__pyx_kp_u_input_data_must_be_at_least_2_D;
    3920             :   PyObject *__pyx_n_s_interpolation_points_shape;
    3921             :   PyObject *__pyx_kp_u_invalid_shape_for_input_data_poi;
    3922             :   PyObject *__pyx_n_s_is_complex;
    3923             :   PyObject *__pyx_n_s_is_coroutine;
    3924             :   PyObject *__pyx_kp_u_isenabled;
    3925             :   PyObject *__pyx_n_s_isimplex;
    3926             :   PyObject *__pyx_n_s_issubdtype;
    3927             :   PyObject *__pyx_n_s_itemsize;
    3928             :   PyObject *__pyx_kp_s_itemsize_0_for_cython_array;
    3929             :   PyObject *__pyx_n_s_j;
    3930             :   PyObject *__pyx_n_s_k;
    3931             :   PyObject *__pyx_n_s_kwargs;
    3932             :   PyObject *__pyx_n_s_m;
    3933             :   PyObject *__pyx_n_s_main;
    3934             :   PyObject *__pyx_n_s_maxiter;
    3935             :   PyObject *__pyx_n_s_maxiter_2;
    3936             :   PyObject *__pyx_n_s_mean;
    3937             :   PyObject *__pyx_n_s_memview;
    3938             :   PyObject *__pyx_n_s_metaclass;
    3939             :   PyObject *__pyx_n_s_mode;
    3940             :   PyObject *__pyx_n_s_module;
    3941             :   PyObject *__pyx_n_s_mro_entries;
    3942             :   PyObject *__pyx_n_s_name;
    3943             :   PyObject *__pyx_n_s_name_2;
    3944             :   PyObject *__pyx_n_s_nan;
    3945             :   PyObject *__pyx_n_s_ndim;
    3946             :   PyObject *__pyx_n_s_ndim_coords_from_arrays;
    3947             :   PyObject *__pyx_n_s_need_contiguous;
    3948             :   PyObject *__pyx_n_s_need_values;
    3949             :   PyObject *__pyx_n_s_new;
    3950             :   PyObject *__pyx_kp_s_no_default___reduce___due_to_non;
    3951             :   PyObject *__pyx_n_s_np;
    3952             :   PyObject *__pyx_n_s_npoints;
    3953             :   PyObject *__pyx_kp_u_number_of_dimensions_in_xi_does;
    3954             :   PyObject *__pyx_n_s_numpy;
    3955             :   PyObject *__pyx_n_s_nvalues;
    3956             :   PyObject *__pyx_n_s_obj;
    3957             :   PyObject *__pyx_n_s_offset;
    3958             :   PyObject *__pyx_n_s_out;
    3959             :   PyObject *__pyx_n_s_pack;
    3960             :   PyObject *__pyx_n_s_pickle;
    3961             :   PyObject *__pyx_n_s_points;
    3962             :   PyObject *__pyx_n_s_prepare;
    3963             :   PyObject *__pyx_n_s_preprocess_xi;
    3964             :   PyObject *__pyx_n_s_prod;
    3965             :   PyObject *__pyx_n_s_ptp;
    3966             :   PyObject *__pyx_n_s_pyx_PickleError;
    3967             :   PyObject *__pyx_n_s_pyx_checksum;
    3968             :   PyObject *__pyx_n_s_pyx_result;
    3969             :   PyObject *__pyx_n_s_pyx_state;
    3970             :   PyObject *__pyx_n_s_pyx_type;
    3971             :   PyObject *__pyx_n_s_pyx_unpickle_Enum;
    3972             :   PyObject *__pyx_n_s_pyx_vtable;
    3973             :   PyObject *__pyx_n_s_qhull;
    3974             :   PyObject *__pyx_n_s_qhull_2;
    3975             :   PyObject *__pyx_n_s_qualname;
    3976             :   PyObject *__pyx_n_s_r;
    3977             :   PyObject *__pyx_n_s_range;
    3978             :   PyObject *__pyx_n_s_real;
    3979             :   PyObject *__pyx_n_s_reduce;
    3980             :   PyObject *__pyx_n_s_reduce_cython;
    3981             :   PyObject *__pyx_n_s_reduce_ex;
    3982             :   PyObject *__pyx_n_s_register;
    3983             :   PyObject *__pyx_n_s_rescale;
    3984             :   PyObject *__pyx_n_s_reshape;
    3985             :   PyObject *__pyx_n_s_s;
    3986             :   PyObject *__pyx_n_s_scale;
    3987             :   PyObject *__pyx_n_s_scale_x;
    3988             :   PyObject *__pyx_n_s_scipy;
    3989             :   PyObject *__pyx_n_s_scipy_interpolate__interpnd;
    3990             :   PyObject *__pyx_n_s_scipy_spatial__qhull;
    3991             :   PyObject *__pyx_n_s_self;
    3992             :   PyObject *__pyx_n_s_set_name;
    3993             :   PyObject *__pyx_n_s_set_values;
    3994             :   PyObject *__pyx_n_s_setstate;
    3995             :   PyObject *__pyx_n_s_setstate_cython;
    3996             :   PyObject *__pyx_n_s_shape;
    3997             :   PyObject *__pyx_n_s_signatures;
    3998             :   PyObject *__pyx_n_s_simplices;
    3999             :   PyObject *__pyx_n_s_size;
    4000             :   PyObject *__pyx_n_s_spatial;
    4001             :   PyObject *__pyx_n_s_spec;
    4002             :   PyObject *__pyx_n_s_split;
    4003             :   PyObject *__pyx_n_s_start;
    4004             :   PyObject *__pyx_n_s_step;
    4005             :   PyObject *__pyx_n_s_stop;
    4006             :   PyObject *__pyx_kp_s_strided_and_direct;
    4007             :   PyObject *__pyx_kp_s_strided_and_direct_or_indirect;
    4008             :   PyObject *__pyx_kp_s_strided_and_indirect;
    4009             :   PyObject *__pyx_kp_s_stringsource;
    4010             :   PyObject *__pyx_n_s_strip;
    4011             :   PyObject *__pyx_n_s_struct;
    4012             :   PyObject *__pyx_n_s_super;
    4013             :   PyObject *__pyx_n_s_sys;
    4014             :   PyObject *__pyx_n_s_test;
    4015             :   PyObject *__pyx_kp_u_this_mode_of_interpolation_avail;
    4016             :   PyObject *__pyx_n_s_tol;
    4017             :   PyObject *__pyx_n_s_tol_2;
    4018             :   PyObject *__pyx_n_s_transpose;
    4019             :   PyObject *__pyx_n_s_tri;
    4020             :   PyObject *__pyx_kp_s_unable_to_allocate_array_data;
    4021             :   PyObject *__pyx_kp_s_unable_to_allocate_shape_and_str;
    4022             :   PyObject *__pyx_n_s_unpack;
    4023             :   PyObject *__pyx_n_s_update;
    4024             :   PyObject *__pyx_n_s_values;
    4025             :   PyObject *__pyx_n_s_values_shape;
    4026             :   PyObject *__pyx_n_s_version_info;
    4027             :   PyObject *__pyx_n_s_w;
    4028             :   PyObject *__pyx_n_s_warn;
    4029             :   PyObject *__pyx_n_s_warnings;
    4030             :   PyObject *__pyx_n_s_xi;
    4031             :   PyObject *__pyx_n_s_y;
    4032             :   PyObject *__pyx_kp_u_y_has_a_wrong_number_of_items;
    4033             :   PyObject *__pyx_n_s_zeros;
    4034             :   PyObject *__pyx_float_1_0;
    4035             :   PyObject *__pyx_float_1eneg_6;
    4036             :   PyObject *__pyx_int_0;
    4037             :   PyObject *__pyx_int_1;
    4038             :   PyObject *__pyx_int_2;
    4039             :   PyObject *__pyx_int_3;
    4040             :   PyObject *__pyx_int_400;
    4041             :   PyObject *__pyx_int_112105877;
    4042             :   PyObject *__pyx_int_136983863;
    4043             :   PyObject *__pyx_int_184977713;
    4044             :   PyObject *__pyx_int_neg_1;
    4045             :   PyObject *__pyx_slice__5;
    4046             :   PyObject *__pyx_tuple__4;
    4047             :   PyObject *__pyx_tuple__8;
    4048             :   PyObject *__pyx_tuple__9;
    4049             :   PyObject *__pyx_slice__10;
    4050             :   PyObject *__pyx_slice__13;
    4051             :   PyObject *__pyx_tuple__11;
    4052             :   PyObject *__pyx_tuple__12;
    4053             :   PyObject *__pyx_tuple__14;
    4054             :   PyObject *__pyx_tuple__15;
    4055             :   PyObject *__pyx_tuple__16;
    4056             :   PyObject *__pyx_tuple__17;
    4057             :   PyObject *__pyx_tuple__18;
    4058             :   PyObject *__pyx_tuple__21;
    4059             :   PyObject *__pyx_tuple__22;
    4060             :   PyObject *__pyx_tuple__23;
    4061             :   PyObject *__pyx_tuple__24;
    4062             :   PyObject *__pyx_tuple__25;
    4063             :   PyObject *__pyx_tuple__26;
    4064             :   PyObject *__pyx_tuple__27;
    4065             :   PyObject *__pyx_tuple__28;
    4066             :   PyObject *__pyx_tuple__29;
    4067             :   PyObject *__pyx_tuple__30;
    4068             :   PyObject *__pyx_tuple__31;
    4069             :   PyObject *__pyx_tuple__32;
    4070             :   PyObject *__pyx_tuple__33;
    4071             :   PyObject *__pyx_tuple__34;
    4072             :   PyObject *__pyx_tuple__35;
    4073             :   PyObject *__pyx_tuple__37;
    4074             :   PyObject *__pyx_tuple__38;
    4075             :   PyObject *__pyx_tuple__40;
    4076             :   PyObject *__pyx_tuple__42;
    4077             :   PyObject *__pyx_tuple__44;
    4078             :   PyObject *__pyx_tuple__47;
    4079             :   PyObject *__pyx_tuple__49;
    4080             :   PyObject *__pyx_tuple__51;
    4081             :   PyObject *__pyx_tuple__53;
    4082             :   PyObject *__pyx_tuple__54;
    4083             :   PyObject *__pyx_tuple__59;
    4084             :   PyObject *__pyx_tuple__61;
    4085             :   PyObject *__pyx_tuple__62;
    4086             :   PyObject *__pyx_tuple__63;
    4087             :   PyObject *__pyx_tuple__65;
    4088             :   PyObject *__pyx_tuple__66;
    4089             :   PyObject *__pyx_tuple__72;
    4090             :   PyObject *__pyx_codeobj__36;
    4091             :   PyObject *__pyx_codeobj__39;
    4092             :   PyObject *__pyx_codeobj__41;
    4093             :   PyObject *__pyx_codeobj__43;
    4094             :   PyObject *__pyx_codeobj__45;
    4095             :   PyObject *__pyx_codeobj__46;
    4096             :   PyObject *__pyx_codeobj__48;
    4097             :   PyObject *__pyx_codeobj__50;
    4098             :   PyObject *__pyx_codeobj__52;
    4099             :   PyObject *__pyx_codeobj__55;
    4100             :   PyObject *__pyx_codeobj__56;
    4101             :   PyObject *__pyx_codeobj__57;
    4102             :   PyObject *__pyx_codeobj__58;
    4103             :   PyObject *__pyx_codeobj__60;
    4104             :   PyObject *__pyx_codeobj__64;
    4105             :   PyObject *__pyx_codeobj__67;
    4106             :   PyObject *__pyx_codeobj__68;
    4107             :   PyObject *__pyx_codeobj__69;
    4108             :   PyObject *__pyx_codeobj__70;
    4109             :   PyObject *__pyx_codeobj__71;
    4110             :   PyObject *__pyx_codeobj__73;
    4111             : } __pyx_mstate;
    4112             : 
    4113             : #if CYTHON_USE_MODULE_STATE
    4114             : #ifdef __cplusplus
    4115             : namespace {
    4116             :   extern struct PyModuleDef __pyx_moduledef;
    4117             : } /* anonymous namespace */
    4118             : #else
    4119             : static struct PyModuleDef __pyx_moduledef;
    4120             : #endif
    4121             : 
    4122             : #define __pyx_mstate(o) ((__pyx_mstate *)__Pyx_PyModule_GetState(o))
    4123             : 
    4124             : #define __pyx_mstate_global (__pyx_mstate(PyState_FindModule(&__pyx_moduledef)))
    4125             : 
    4126             : #define __pyx_m (PyState_FindModule(&__pyx_moduledef))
    4127             : #else
    4128             : static __pyx_mstate __pyx_mstate_global_static =
    4129             : #ifdef __cplusplus
    4130             :     {};
    4131             : #else
    4132             :     {0};
    4133             : #endif
    4134             : static __pyx_mstate *__pyx_mstate_global = &__pyx_mstate_global_static;
    4135             : #endif
    4136             : /* #### Code section: module_state_clear ### */
    4137             : #if CYTHON_USE_MODULE_STATE
    4138             : static int __pyx_m_clear(PyObject *m) {
    4139             :   __pyx_mstate *clear_module_state = __pyx_mstate(m);
    4140             :   if (!clear_module_state) return 0;
    4141             :   Py_CLEAR(clear_module_state->__pyx_d);
    4142             :   Py_CLEAR(clear_module_state->__pyx_b);
    4143             :   Py_CLEAR(clear_module_state->__pyx_cython_runtime);
    4144             :   Py_CLEAR(clear_module_state->__pyx_empty_tuple);
    4145             :   Py_CLEAR(clear_module_state->__pyx_empty_bytes);
    4146             :   Py_CLEAR(clear_module_state->__pyx_empty_unicode);
    4147             :   #ifdef __Pyx_CyFunction_USED
    4148             :   Py_CLEAR(clear_module_state->__pyx_CyFunctionType);
    4149             :   #endif
    4150             :   #ifdef __Pyx_FusedFunction_USED
    4151             :   Py_CLEAR(clear_module_state->__pyx_FusedFunctionType);
    4152             :   #endif
    4153             :   Py_CLEAR(clear_module_state->__pyx_array_type);
    4154             :   Py_CLEAR(clear_module_state->__pyx_type___pyx_array);
    4155             :   Py_CLEAR(clear_module_state->__pyx_MemviewEnum_type);
    4156             :   Py_CLEAR(clear_module_state->__pyx_type___pyx_MemviewEnum);
    4157             :   Py_CLEAR(clear_module_state->__pyx_memoryview_type);
    4158             :   Py_CLEAR(clear_module_state->__pyx_type___pyx_memoryview);
    4159             :   Py_CLEAR(clear_module_state->__pyx_memoryviewslice_type);
    4160             :   Py_CLEAR(clear_module_state->__pyx_type___pyx_memoryviewslice);
    4161             :   Py_CLEAR(clear_module_state->__pyx_kp_u_);
    4162             :   Py_CLEAR(clear_module_state->__pyx_n_s_ASCII);
    4163             :   Py_CLEAR(clear_module_state->__pyx_kp_s_All_dimensions_preceding_dimensi);
    4164             :   Py_CLEAR(clear_module_state->__pyx_n_s_AssertionError);
    4165             :   Py_CLEAR(clear_module_state->__pyx_kp_s_Buffer_view_does_not_expose_stri);
    4166             :   Py_CLEAR(clear_module_state->__pyx_kp_s_Can_only_create_a_buffer_that_is);
    4167             :   Py_CLEAR(clear_module_state->__pyx_kp_s_Cannot_assign_to_read_only_memor);
    4168             :   Py_CLEAR(clear_module_state->__pyx_kp_s_Cannot_create_writable_memory_vi);
    4169             :   Py_CLEAR(clear_module_state->__pyx_kp_u_Cannot_index_with_type);
    4170             :   Py_CLEAR(clear_module_state->__pyx_kp_s_Cannot_transpose_memoryview_with);
    4171             :   Py_CLEAR(clear_module_state->__pyx_n_s_CloughTocher2DInterpolator);
    4172             :   Py_CLEAR(clear_module_state->__pyx_n_s_CloughTocher2DInterpolator___ini);
    4173             :   Py_CLEAR(clear_module_state->__pyx_n_s_CloughTocher2DInterpolator__calc);
    4174             :   Py_CLEAR(clear_module_state->__pyx_n_s_CloughTocher2DInterpolator__do_e);
    4175             :   Py_CLEAR(clear_module_state->__pyx_n_s_CloughTocher2DInterpolator__eval);
    4176             :   Py_CLEAR(clear_module_state->__pyx_n_s_CloughTocher2DInterpolator__eval_2);
    4177             :   Py_CLEAR(clear_module_state->__pyx_n_s_CloughTocher2DInterpolator__set);
    4178             :   Py_CLEAR(clear_module_state->__pyx_kp_s_CloughTocher2DInterpolator_point);
    4179             :   Py_CLEAR(clear_module_state->__pyx_kp_s_Common_routines_for_interpolato);
    4180             :   Py_CLEAR(clear_module_state->__pyx_n_s_Delaunay);
    4181             :   Py_CLEAR(clear_module_state->__pyx_kp_s_Dimension_d_is_not_direct);
    4182             :   Py_CLEAR(clear_module_state->__pyx_n_s_Ellipsis);
    4183             :   Py_CLEAR(clear_module_state->__pyx_kp_s_Empty_shape_tuple_for_cython_arr);
    4184             :   Py_CLEAR(clear_module_state->__pyx_kp_s_Expected_at_least_d_argument_s_g);
    4185             :   Py_CLEAR(clear_module_state->__pyx_kp_s_Function_call_with_ambiguous_arg);
    4186             :   Py_CLEAR(clear_module_state->__pyx_n_s_GradientEstimationWarning);
    4187             :   Py_CLEAR(clear_module_state->__pyx_kp_u_Gradient_estimation_did_not_conv);
    4188             :   Py_CLEAR(clear_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0);
    4189             :   Py_CLEAR(clear_module_state->__pyx_n_s_IndexError);
    4190             :   Py_CLEAR(clear_module_state->__pyx_kp_s_Index_out_of_bounds_axis_d);
    4191             :   Py_CLEAR(clear_module_state->__pyx_kp_s_Indirect_dimensions_not_supporte);
    4192             :   Py_CLEAR(clear_module_state->__pyx_kp_u_Invalid_mode_expected_c_or_fortr);
    4193             :   Py_CLEAR(clear_module_state->__pyx_kp_u_Invalid_shape_in_axis);
    4194             :   Py_CLEAR(clear_module_state->__pyx_n_s_LinearNDInterpolator);
    4195             :   Py_CLEAR(clear_module_state->__pyx_n_s_LinearNDInterpolator___init);
    4196             :   Py_CLEAR(clear_module_state->__pyx_n_s_LinearNDInterpolator__calculate);
    4197             :   Py_CLEAR(clear_module_state->__pyx_n_s_LinearNDInterpolator__do_evaluat);
    4198             :   Py_CLEAR(clear_module_state->__pyx_n_s_LinearNDInterpolator__evaluate_c);
    4199             :   Py_CLEAR(clear_module_state->__pyx_n_s_LinearNDInterpolator__evaluate_d);
    4200             :   Py_CLEAR(clear_module_state->__pyx_kp_s_LinearNDInterpolator_points_val);
    4201             :   Py_CLEAR(clear_module_state->__pyx_n_s_MemoryError);
    4202             :   Py_CLEAR(clear_module_state->__pyx_kp_s_MemoryView_of_r_at_0x_x);
    4203             :   Py_CLEAR(clear_module_state->__pyx_kp_s_MemoryView_of_r_object);
    4204             :   Py_CLEAR(clear_module_state->__pyx_n_s_NDInterpolatorBase);
    4205             :   Py_CLEAR(clear_module_state->__pyx_n_s_NDInterpolatorBase___call);
    4206             :   Py_CLEAR(clear_module_state->__pyx_n_s_NDInterpolatorBase___init);
    4207             :   Py_CLEAR(clear_module_state->__pyx_n_s_NDInterpolatorBase__calculate_tr);
    4208             :   Py_CLEAR(clear_module_state->__pyx_n_s_NDInterpolatorBase__check_call_s);
    4209             :   Py_CLEAR(clear_module_state->__pyx_n_s_NDInterpolatorBase__preprocess_x);
    4210             :   Py_CLEAR(clear_module_state->__pyx_n_s_NDInterpolatorBase__scale_x);
    4211             :   Py_CLEAR(clear_module_state->__pyx_n_s_NDInterpolatorBase__set_values);
    4212             :   Py_CLEAR(clear_module_state->__pyx_kp_s_No_matching_signature_found);
    4213             :   Py_CLEAR(clear_module_state->__pyx_n_b_O);
    4214             :   Py_CLEAR(clear_module_state->__pyx_kp_u_Out_of_bounds_on_buffer_access_a);
    4215             :   Py_CLEAR(clear_module_state->__pyx_n_s_PickleError);
    4216             :   Py_CLEAR(clear_module_state->__pyx_kp_u_Rescaling_is_not_supported_when);
    4217             :   Py_CLEAR(clear_module_state->__pyx_n_s_Sequence);
    4218             :   Py_CLEAR(clear_module_state->__pyx_kp_s_Step_may_not_be_zero_axis_d);
    4219             :   Py_CLEAR(clear_module_state->__pyx_n_s_T);
    4220             :   Py_CLEAR(clear_module_state->__pyx_n_s_TypeError);
    4221             :   Py_CLEAR(clear_module_state->__pyx_kp_s_Unable_to_convert_item_to_object);
    4222             :   Py_CLEAR(clear_module_state->__pyx_n_s_ValueError);
    4223             :   Py_CLEAR(clear_module_state->__pyx_n_s_View_MemoryView);
    4224             :   Py_CLEAR(clear_module_state->__pyx_n_s_Warning);
    4225             :   Py_CLEAR(clear_module_state->__pyx_kp_s__19);
    4226             :   Py_CLEAR(clear_module_state->__pyx_kp_u__2);
    4227             :   Py_CLEAR(clear_module_state->__pyx_kp_s__20);
    4228             :   Py_CLEAR(clear_module_state->__pyx_kp_u__20);
    4229             :   Py_CLEAR(clear_module_state->__pyx_n_s__3);
    4230             :   Py_CLEAR(clear_module_state->__pyx_kp_u__6);
    4231             :   Py_CLEAR(clear_module_state->__pyx_kp_u__7);
    4232             :   Py_CLEAR(clear_module_state->__pyx_n_s__74);
    4233             :   Py_CLEAR(clear_module_state->__pyx_n_s_abc);
    4234             :   Py_CLEAR(clear_module_state->__pyx_n_s_allocate_buffer);
    4235             :   Py_CLEAR(clear_module_state->__pyx_kp_u_and);
    4236             :   Py_CLEAR(clear_module_state->__pyx_n_s_args);
    4237             :   Py_CLEAR(clear_module_state->__pyx_n_s_asanyarray);
    4238             :   Py_CLEAR(clear_module_state->__pyx_n_s_asarray);
    4239             :   Py_CLEAR(clear_module_state->__pyx_n_s_ascontiguousarray);
    4240             :   Py_CLEAR(clear_module_state->__pyx_n_s_asyncio_coroutines);
    4241             :   Py_CLEAR(clear_module_state->__pyx_n_s_axis);
    4242             :   Py_CLEAR(clear_module_state->__pyx_n_s_base);
    4243             :   Py_CLEAR(clear_module_state->__pyx_n_s_broadcast_arrays);
    4244             :   Py_CLEAR(clear_module_state->__pyx_n_s_c);
    4245             :   Py_CLEAR(clear_module_state->__pyx_n_u_c);
    4246             :   Py_CLEAR(clear_module_state->__pyx_n_s_calculate_triangulation);
    4247             :   Py_CLEAR(clear_module_state->__pyx_n_s_call);
    4248             :   Py_CLEAR(clear_module_state->__pyx_n_s_check_call_shape);
    4249             :   Py_CLEAR(clear_module_state->__pyx_n_s_class);
    4250             :   Py_CLEAR(clear_module_state->__pyx_n_s_class_getitem);
    4251             :   Py_CLEAR(clear_module_state->__pyx_n_s_cline_in_traceback);
    4252             :   Py_CLEAR(clear_module_state->__pyx_n_s_collections);
    4253             :   Py_CLEAR(clear_module_state->__pyx_kp_s_collections_abc);
    4254             :   Py_CLEAR(clear_module_state->__pyx_n_s_complex128);
    4255             :   Py_CLEAR(clear_module_state->__pyx_n_s_complexfloating);
    4256             :   Py_CLEAR(clear_module_state->__pyx_kp_s_contiguous_and_direct);
    4257             :   Py_CLEAR(clear_module_state->__pyx_kp_s_contiguous_and_indirect);
    4258             :   Py_CLEAR(clear_module_state->__pyx_kp_u_coordinate_arrays_do_not_have_th);
    4259             :   Py_CLEAR(clear_module_state->__pyx_n_s_count);
    4260             :   Py_CLEAR(clear_module_state->__pyx_n_s_defaults);
    4261             :   Py_CLEAR(clear_module_state->__pyx_n_s_df);
    4262             :   Py_CLEAR(clear_module_state->__pyx_n_s_dict);
    4263             :   Py_CLEAR(clear_module_state->__pyx_kp_u_different_number_of_values_and_p);
    4264             :   Py_CLEAR(clear_module_state->__pyx_kp_u_disable);
    4265             :   Py_CLEAR(clear_module_state->__pyx_n_s_do_evaluate);
    4266             :   Py_CLEAR(clear_module_state->__pyx_n_s_doc);
    4267             :   Py_CLEAR(clear_module_state->__pyx_n_s_double);
    4268             :   Py_CLEAR(clear_module_state->__pyx_kp_s_double_complex);
    4269             :   Py_CLEAR(clear_module_state->__pyx_n_s_dtype);
    4270             :   Py_CLEAR(clear_module_state->__pyx_n_s_dtype_is_object);
    4271             :   Py_CLEAR(clear_module_state->__pyx_n_s_dummy);
    4272             :   Py_CLEAR(clear_module_state->__pyx_n_s_empty);
    4273             :   Py_CLEAR(clear_module_state->__pyx_kp_u_enable);
    4274             :   Py_CLEAR(clear_module_state->__pyx_n_s_encode);
    4275             :   Py_CLEAR(clear_module_state->__pyx_n_s_enumerate);
    4276             :   Py_CLEAR(clear_module_state->__pyx_n_s_eps);
    4277             :   Py_CLEAR(clear_module_state->__pyx_n_s_eps_broad);
    4278             :   Py_CLEAR(clear_module_state->__pyx_n_s_error);
    4279             :   Py_CLEAR(clear_module_state->__pyx_n_s_estimate_gradients_2d_global);
    4280             :   Py_CLEAR(clear_module_state->__pyx_n_s_evaluate_complex);
    4281             :   Py_CLEAR(clear_module_state->__pyx_n_s_evaluate_double);
    4282             :   Py_CLEAR(clear_module_state->__pyx_n_s_f);
    4283             :   Py_CLEAR(clear_module_state->__pyx_n_s_fill_value);
    4284             :   Py_CLEAR(clear_module_state->__pyx_n_s_flags);
    4285             :   Py_CLEAR(clear_module_state->__pyx_n_s_float64);
    4286             :   Py_CLEAR(clear_module_state->__pyx_n_s_format);
    4287             :   Py_CLEAR(clear_module_state->__pyx_n_s_fortran);
    4288             :   Py_CLEAR(clear_module_state->__pyx_n_u_fortran);
    4289             :   Py_CLEAR(clear_module_state->__pyx_n_s_fused_sigindex);
    4290             :   Py_CLEAR(clear_module_state->__pyx_kp_u_gc);
    4291             :   Py_CLEAR(clear_module_state->__pyx_n_s_get);
    4292             :   Py_CLEAR(clear_module_state->__pyx_n_s_getstate);
    4293             :   Py_CLEAR(clear_module_state->__pyx_kp_u_got);
    4294             :   Py_CLEAR(clear_module_state->__pyx_kp_u_got_differing_extents_in_dimensi);
    4295             :   Py_CLEAR(clear_module_state->__pyx_n_s_grad);
    4296             :   Py_CLEAR(clear_module_state->__pyx_kp_s_home_czgdp18079_Quansight_scipy);
    4297             :   Py_CLEAR(clear_module_state->__pyx_n_s_i);
    4298             :   Py_CLEAR(clear_module_state->__pyx_n_s_id);
    4299             :   Py_CLEAR(clear_module_state->__pyx_n_s_imag);
    4300             :   Py_CLEAR(clear_module_state->__pyx_n_s_import);
    4301             :   Py_CLEAR(clear_module_state->__pyx_n_s_index);
    4302             :   Py_CLEAR(clear_module_state->__pyx_n_s_info);
    4303             :   Py_CLEAR(clear_module_state->__pyx_n_s_init);
    4304             :   Py_CLEAR(clear_module_state->__pyx_n_s_init_subclass);
    4305             :   Py_CLEAR(clear_module_state->__pyx_n_s_initializing);
    4306             :   Py_CLEAR(clear_module_state->__pyx_kp_u_input_data_must_be_at_least_2_D);
    4307             :   Py_CLEAR(clear_module_state->__pyx_n_s_interpolation_points_shape);
    4308             :   Py_CLEAR(clear_module_state->__pyx_kp_u_invalid_shape_for_input_data_poi);
    4309             :   Py_CLEAR(clear_module_state->__pyx_n_s_is_complex);
    4310             :   Py_CLEAR(clear_module_state->__pyx_n_s_is_coroutine);
    4311             :   Py_CLEAR(clear_module_state->__pyx_kp_u_isenabled);
    4312             :   Py_CLEAR(clear_module_state->__pyx_n_s_isimplex);
    4313             :   Py_CLEAR(clear_module_state->__pyx_n_s_issubdtype);
    4314             :   Py_CLEAR(clear_module_state->__pyx_n_s_itemsize);
    4315             :   Py_CLEAR(clear_module_state->__pyx_kp_s_itemsize_0_for_cython_array);
    4316             :   Py_CLEAR(clear_module_state->__pyx_n_s_j);
    4317             :   Py_CLEAR(clear_module_state->__pyx_n_s_k);
    4318             :   Py_CLEAR(clear_module_state->__pyx_n_s_kwargs);
    4319             :   Py_CLEAR(clear_module_state->__pyx_n_s_m);
    4320             :   Py_CLEAR(clear_module_state->__pyx_n_s_main);
    4321             :   Py_CLEAR(clear_module_state->__pyx_n_s_maxiter);
    4322             :   Py_CLEAR(clear_module_state->__pyx_n_s_maxiter_2);
    4323             :   Py_CLEAR(clear_module_state->__pyx_n_s_mean);
    4324             :   Py_CLEAR(clear_module_state->__pyx_n_s_memview);
    4325             :   Py_CLEAR(clear_module_state->__pyx_n_s_metaclass);
    4326             :   Py_CLEAR(clear_module_state->__pyx_n_s_mode);
    4327             :   Py_CLEAR(clear_module_state->__pyx_n_s_module);
    4328             :   Py_CLEAR(clear_module_state->__pyx_n_s_mro_entries);
    4329             :   Py_CLEAR(clear_module_state->__pyx_n_s_name);
    4330             :   Py_CLEAR(clear_module_state->__pyx_n_s_name_2);
    4331             :   Py_CLEAR(clear_module_state->__pyx_n_s_nan);
    4332             :   Py_CLEAR(clear_module_state->__pyx_n_s_ndim);
    4333             :   Py_CLEAR(clear_module_state->__pyx_n_s_ndim_coords_from_arrays);
    4334             :   Py_CLEAR(clear_module_state->__pyx_n_s_need_contiguous);
    4335             :   Py_CLEAR(clear_module_state->__pyx_n_s_need_values);
    4336             :   Py_CLEAR(clear_module_state->__pyx_n_s_new);
    4337             :   Py_CLEAR(clear_module_state->__pyx_kp_s_no_default___reduce___due_to_non);
    4338             :   Py_CLEAR(clear_module_state->__pyx_n_s_np);
    4339             :   Py_CLEAR(clear_module_state->__pyx_n_s_npoints);
    4340             :   Py_CLEAR(clear_module_state->__pyx_kp_u_number_of_dimensions_in_xi_does);
    4341             :   Py_CLEAR(clear_module_state->__pyx_n_s_numpy);
    4342             :   Py_CLEAR(clear_module_state->__pyx_n_s_nvalues);
    4343             :   Py_CLEAR(clear_module_state->__pyx_n_s_obj);
    4344             :   Py_CLEAR(clear_module_state->__pyx_n_s_offset);
    4345             :   Py_CLEAR(clear_module_state->__pyx_n_s_out);
    4346             :   Py_CLEAR(clear_module_state->__pyx_n_s_pack);
    4347             :   Py_CLEAR(clear_module_state->__pyx_n_s_pickle);
    4348             :   Py_CLEAR(clear_module_state->__pyx_n_s_points);
    4349             :   Py_CLEAR(clear_module_state->__pyx_n_s_prepare);
    4350             :   Py_CLEAR(clear_module_state->__pyx_n_s_preprocess_xi);
    4351             :   Py_CLEAR(clear_module_state->__pyx_n_s_prod);
    4352             :   Py_CLEAR(clear_module_state->__pyx_n_s_ptp);
    4353             :   Py_CLEAR(clear_module_state->__pyx_n_s_pyx_PickleError);
    4354             :   Py_CLEAR(clear_module_state->__pyx_n_s_pyx_checksum);
    4355             :   Py_CLEAR(clear_module_state->__pyx_n_s_pyx_result);
    4356             :   Py_CLEAR(clear_module_state->__pyx_n_s_pyx_state);
    4357             :   Py_CLEAR(clear_module_state->__pyx_n_s_pyx_type);
    4358             :   Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_Enum);
    4359             :   Py_CLEAR(clear_module_state->__pyx_n_s_pyx_vtable);
    4360             :   Py_CLEAR(clear_module_state->__pyx_n_s_qhull);
    4361             :   Py_CLEAR(clear_module_state->__pyx_n_s_qhull_2);
    4362             :   Py_CLEAR(clear_module_state->__pyx_n_s_qualname);
    4363             :   Py_CLEAR(clear_module_state->__pyx_n_s_r);
    4364             :   Py_CLEAR(clear_module_state->__pyx_n_s_range);
    4365             :   Py_CLEAR(clear_module_state->__pyx_n_s_real);
    4366             :   Py_CLEAR(clear_module_state->__pyx_n_s_reduce);
    4367             :   Py_CLEAR(clear_module_state->__pyx_n_s_reduce_cython);
    4368             :   Py_CLEAR(clear_module_state->__pyx_n_s_reduce_ex);
    4369             :   Py_CLEAR(clear_module_state->__pyx_n_s_register);
    4370             :   Py_CLEAR(clear_module_state->__pyx_n_s_rescale);
    4371             :   Py_CLEAR(clear_module_state->__pyx_n_s_reshape);
    4372             :   Py_CLEAR(clear_module_state->__pyx_n_s_s);
    4373             :   Py_CLEAR(clear_module_state->__pyx_n_s_scale);
    4374             :   Py_CLEAR(clear_module_state->__pyx_n_s_scale_x);
    4375             :   Py_CLEAR(clear_module_state->__pyx_n_s_scipy);
    4376             :   Py_CLEAR(clear_module_state->__pyx_n_s_scipy_interpolate__interpnd);
    4377             :   Py_CLEAR(clear_module_state->__pyx_n_s_scipy_spatial__qhull);
    4378             :   Py_CLEAR(clear_module_state->__pyx_n_s_self);
    4379             :   Py_CLEAR(clear_module_state->__pyx_n_s_set_name);
    4380             :   Py_CLEAR(clear_module_state->__pyx_n_s_set_values);
    4381             :   Py_CLEAR(clear_module_state->__pyx_n_s_setstate);
    4382             :   Py_CLEAR(clear_module_state->__pyx_n_s_setstate_cython);
    4383             :   Py_CLEAR(clear_module_state->__pyx_n_s_shape);
    4384             :   Py_CLEAR(clear_module_state->__pyx_n_s_signatures);
    4385             :   Py_CLEAR(clear_module_state->__pyx_n_s_simplices);
    4386             :   Py_CLEAR(clear_module_state->__pyx_n_s_size);
    4387             :   Py_CLEAR(clear_module_state->__pyx_n_s_spatial);
    4388             :   Py_CLEAR(clear_module_state->__pyx_n_s_spec);
    4389             :   Py_CLEAR(clear_module_state->__pyx_n_s_split);
    4390             :   Py_CLEAR(clear_module_state->__pyx_n_s_start);
    4391             :   Py_CLEAR(clear_module_state->__pyx_n_s_step);
    4392             :   Py_CLEAR(clear_module_state->__pyx_n_s_stop);
    4393             :   Py_CLEAR(clear_module_state->__pyx_kp_s_strided_and_direct);
    4394             :   Py_CLEAR(clear_module_state->__pyx_kp_s_strided_and_direct_or_indirect);
    4395             :   Py_CLEAR(clear_module_state->__pyx_kp_s_strided_and_indirect);
    4396             :   Py_CLEAR(clear_module_state->__pyx_kp_s_stringsource);
    4397             :   Py_CLEAR(clear_module_state->__pyx_n_s_strip);
    4398             :   Py_CLEAR(clear_module_state->__pyx_n_s_struct);
    4399             :   Py_CLEAR(clear_module_state->__pyx_n_s_super);
    4400             :   Py_CLEAR(clear_module_state->__pyx_n_s_sys);
    4401             :   Py_CLEAR(clear_module_state->__pyx_n_s_test);
    4402             :   Py_CLEAR(clear_module_state->__pyx_kp_u_this_mode_of_interpolation_avail);
    4403             :   Py_CLEAR(clear_module_state->__pyx_n_s_tol);
    4404             :   Py_CLEAR(clear_module_state->__pyx_n_s_tol_2);
    4405             :   Py_CLEAR(clear_module_state->__pyx_n_s_transpose);
    4406             :   Py_CLEAR(clear_module_state->__pyx_n_s_tri);
    4407             :   Py_CLEAR(clear_module_state->__pyx_kp_s_unable_to_allocate_array_data);
    4408             :   Py_CLEAR(clear_module_state->__pyx_kp_s_unable_to_allocate_shape_and_str);
    4409             :   Py_CLEAR(clear_module_state->__pyx_n_s_unpack);
    4410             :   Py_CLEAR(clear_module_state->__pyx_n_s_update);
    4411             :   Py_CLEAR(clear_module_state->__pyx_n_s_values);
    4412             :   Py_CLEAR(clear_module_state->__pyx_n_s_values_shape);
    4413             :   Py_CLEAR(clear_module_state->__pyx_n_s_version_info);
    4414             :   Py_CLEAR(clear_module_state->__pyx_n_s_w);
    4415             :   Py_CLEAR(clear_module_state->__pyx_n_s_warn);
    4416             :   Py_CLEAR(clear_module_state->__pyx_n_s_warnings);
    4417             :   Py_CLEAR(clear_module_state->__pyx_n_s_xi);
    4418             :   Py_CLEAR(clear_module_state->__pyx_n_s_y);
    4419             :   Py_CLEAR(clear_module_state->__pyx_kp_u_y_has_a_wrong_number_of_items);
    4420             :   Py_CLEAR(clear_module_state->__pyx_n_s_zeros);
    4421             :   Py_CLEAR(clear_module_state->__pyx_float_1_0);
    4422             :   Py_CLEAR(clear_module_state->__pyx_float_1eneg_6);
    4423             :   Py_CLEAR(clear_module_state->__pyx_int_0);
    4424             :   Py_CLEAR(clear_module_state->__pyx_int_1);
    4425             :   Py_CLEAR(clear_module_state->__pyx_int_2);
    4426             :   Py_CLEAR(clear_module_state->__pyx_int_3);
    4427             :   Py_CLEAR(clear_module_state->__pyx_int_400);
    4428             :   Py_CLEAR(clear_module_state->__pyx_int_112105877);
    4429             :   Py_CLEAR(clear_module_state->__pyx_int_136983863);
    4430             :   Py_CLEAR(clear_module_state->__pyx_int_184977713);
    4431             :   Py_CLEAR(clear_module_state->__pyx_int_neg_1);
    4432             :   Py_CLEAR(clear_module_state->__pyx_slice__5);
    4433             :   Py_CLEAR(clear_module_state->__pyx_tuple__4);
    4434             :   Py_CLEAR(clear_module_state->__pyx_tuple__8);
    4435             :   Py_CLEAR(clear_module_state->__pyx_tuple__9);
    4436             :   Py_CLEAR(clear_module_state->__pyx_slice__10);
    4437             :   Py_CLEAR(clear_module_state->__pyx_slice__13);
    4438             :   Py_CLEAR(clear_module_state->__pyx_tuple__11);
    4439             :   Py_CLEAR(clear_module_state->__pyx_tuple__12);
    4440             :   Py_CLEAR(clear_module_state->__pyx_tuple__14);
    4441             :   Py_CLEAR(clear_module_state->__pyx_tuple__15);
    4442             :   Py_CLEAR(clear_module_state->__pyx_tuple__16);
    4443             :   Py_CLEAR(clear_module_state->__pyx_tuple__17);
    4444             :   Py_CLEAR(clear_module_state->__pyx_tuple__18);
    4445             :   Py_CLEAR(clear_module_state->__pyx_tuple__21);
    4446             :   Py_CLEAR(clear_module_state->__pyx_tuple__22);
    4447             :   Py_CLEAR(clear_module_state->__pyx_tuple__23);
    4448             :   Py_CLEAR(clear_module_state->__pyx_tuple__24);
    4449             :   Py_CLEAR(clear_module_state->__pyx_tuple__25);
    4450             :   Py_CLEAR(clear_module_state->__pyx_tuple__26);
    4451             :   Py_CLEAR(clear_module_state->__pyx_tuple__27);
    4452             :   Py_CLEAR(clear_module_state->__pyx_tuple__28);
    4453             :   Py_CLEAR(clear_module_state->__pyx_tuple__29);
    4454             :   Py_CLEAR(clear_module_state->__pyx_tuple__30);
    4455             :   Py_CLEAR(clear_module_state->__pyx_tuple__31);
    4456             :   Py_CLEAR(clear_module_state->__pyx_tuple__32);
    4457             :   Py_CLEAR(clear_module_state->__pyx_tuple__33);
    4458             :   Py_CLEAR(clear_module_state->__pyx_tuple__34);
    4459             :   Py_CLEAR(clear_module_state->__pyx_tuple__35);
    4460             :   Py_CLEAR(clear_module_state->__pyx_tuple__37);
    4461             :   Py_CLEAR(clear_module_state->__pyx_tuple__38);
    4462             :   Py_CLEAR(clear_module_state->__pyx_tuple__40);
    4463             :   Py_CLEAR(clear_module_state->__pyx_tuple__42);
    4464             :   Py_CLEAR(clear_module_state->__pyx_tuple__44);
    4465             :   Py_CLEAR(clear_module_state->__pyx_tuple__47);
    4466             :   Py_CLEAR(clear_module_state->__pyx_tuple__49);
    4467             :   Py_CLEAR(clear_module_state->__pyx_tuple__51);
    4468             :   Py_CLEAR(clear_module_state->__pyx_tuple__53);
    4469             :   Py_CLEAR(clear_module_state->__pyx_tuple__54);
    4470             :   Py_CLEAR(clear_module_state->__pyx_tuple__59);
    4471             :   Py_CLEAR(clear_module_state->__pyx_tuple__61);
    4472             :   Py_CLEAR(clear_module_state->__pyx_tuple__62);
    4473             :   Py_CLEAR(clear_module_state->__pyx_tuple__63);
    4474             :   Py_CLEAR(clear_module_state->__pyx_tuple__65);
    4475             :   Py_CLEAR(clear_module_state->__pyx_tuple__66);
    4476             :   Py_CLEAR(clear_module_state->__pyx_tuple__72);
    4477             :   Py_CLEAR(clear_module_state->__pyx_codeobj__36);
    4478             :   Py_CLEAR(clear_module_state->__pyx_codeobj__39);
    4479             :   Py_CLEAR(clear_module_state->__pyx_codeobj__41);
    4480             :   Py_CLEAR(clear_module_state->__pyx_codeobj__43);
    4481             :   Py_CLEAR(clear_module_state->__pyx_codeobj__45);
    4482             :   Py_CLEAR(clear_module_state->__pyx_codeobj__46);
    4483             :   Py_CLEAR(clear_module_state->__pyx_codeobj__48);
    4484             :   Py_CLEAR(clear_module_state->__pyx_codeobj__50);
    4485             :   Py_CLEAR(clear_module_state->__pyx_codeobj__52);
    4486             :   Py_CLEAR(clear_module_state->__pyx_codeobj__55);
    4487             :   Py_CLEAR(clear_module_state->__pyx_codeobj__56);
    4488             :   Py_CLEAR(clear_module_state->__pyx_codeobj__57);
    4489             :   Py_CLEAR(clear_module_state->__pyx_codeobj__58);
    4490             :   Py_CLEAR(clear_module_state->__pyx_codeobj__60);
    4491             :   Py_CLEAR(clear_module_state->__pyx_codeobj__64);
    4492             :   Py_CLEAR(clear_module_state->__pyx_codeobj__67);
    4493             :   Py_CLEAR(clear_module_state->__pyx_codeobj__68);
    4494             :   Py_CLEAR(clear_module_state->__pyx_codeobj__69);
    4495             :   Py_CLEAR(clear_module_state->__pyx_codeobj__70);
    4496             :   Py_CLEAR(clear_module_state->__pyx_codeobj__71);
    4497             :   Py_CLEAR(clear_module_state->__pyx_codeobj__73);
    4498             :   return 0;
    4499             : }
    4500             : #endif
    4501             : /* #### Code section: module_state_traverse ### */
    4502             : #if CYTHON_USE_MODULE_STATE
    4503             : static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
    4504             :   __pyx_mstate *traverse_module_state = __pyx_mstate(m);
    4505             :   if (!traverse_module_state) return 0;
    4506             :   Py_VISIT(traverse_module_state->__pyx_d);
    4507             :   Py_VISIT(traverse_module_state->__pyx_b);
    4508             :   Py_VISIT(traverse_module_state->__pyx_cython_runtime);
    4509             :   Py_VISIT(traverse_module_state->__pyx_empty_tuple);
    4510             :   Py_VISIT(traverse_module_state->__pyx_empty_bytes);
    4511             :   Py_VISIT(traverse_module_state->__pyx_empty_unicode);
    4512             :   #ifdef __Pyx_CyFunction_USED
    4513             :   Py_VISIT(traverse_module_state->__pyx_CyFunctionType);
    4514             :   #endif
    4515             :   #ifdef __Pyx_FusedFunction_USED
    4516             :   Py_VISIT(traverse_module_state->__pyx_FusedFunctionType);
    4517             :   #endif
    4518             :   Py_VISIT(traverse_module_state->__pyx_array_type);
    4519             :   Py_VISIT(traverse_module_state->__pyx_type___pyx_array);
    4520             :   Py_VISIT(traverse_module_state->__pyx_MemviewEnum_type);
    4521             :   Py_VISIT(traverse_module_state->__pyx_type___pyx_MemviewEnum);
    4522             :   Py_VISIT(traverse_module_state->__pyx_memoryview_type);
    4523             :   Py_VISIT(traverse_module_state->__pyx_type___pyx_memoryview);
    4524             :   Py_VISIT(traverse_module_state->__pyx_memoryviewslice_type);
    4525             :   Py_VISIT(traverse_module_state->__pyx_type___pyx_memoryviewslice);
    4526             :   Py_VISIT(traverse_module_state->__pyx_kp_u_);
    4527             :   Py_VISIT(traverse_module_state->__pyx_n_s_ASCII);
    4528             :   Py_VISIT(traverse_module_state->__pyx_kp_s_All_dimensions_preceding_dimensi);
    4529             :   Py_VISIT(traverse_module_state->__pyx_n_s_AssertionError);
    4530             :   Py_VISIT(traverse_module_state->__pyx_kp_s_Buffer_view_does_not_expose_stri);
    4531             :   Py_VISIT(traverse_module_state->__pyx_kp_s_Can_only_create_a_buffer_that_is);
    4532             :   Py_VISIT(traverse_module_state->__pyx_kp_s_Cannot_assign_to_read_only_memor);
    4533             :   Py_VISIT(traverse_module_state->__pyx_kp_s_Cannot_create_writable_memory_vi);
    4534             :   Py_VISIT(traverse_module_state->__pyx_kp_u_Cannot_index_with_type);
    4535             :   Py_VISIT(traverse_module_state->__pyx_kp_s_Cannot_transpose_memoryview_with);
    4536             :   Py_VISIT(traverse_module_state->__pyx_n_s_CloughTocher2DInterpolator);
    4537             :   Py_VISIT(traverse_module_state->__pyx_n_s_CloughTocher2DInterpolator___ini);
    4538             :   Py_VISIT(traverse_module_state->__pyx_n_s_CloughTocher2DInterpolator__calc);
    4539             :   Py_VISIT(traverse_module_state->__pyx_n_s_CloughTocher2DInterpolator__do_e);
    4540             :   Py_VISIT(traverse_module_state->__pyx_n_s_CloughTocher2DInterpolator__eval);
    4541             :   Py_VISIT(traverse_module_state->__pyx_n_s_CloughTocher2DInterpolator__eval_2);
    4542             :   Py_VISIT(traverse_module_state->__pyx_n_s_CloughTocher2DInterpolator__set);
    4543             :   Py_VISIT(traverse_module_state->__pyx_kp_s_CloughTocher2DInterpolator_point);
    4544             :   Py_VISIT(traverse_module_state->__pyx_kp_s_Common_routines_for_interpolato);
    4545             :   Py_VISIT(traverse_module_state->__pyx_n_s_Delaunay);
    4546             :   Py_VISIT(traverse_module_state->__pyx_kp_s_Dimension_d_is_not_direct);
    4547             :   Py_VISIT(traverse_module_state->__pyx_n_s_Ellipsis);
    4548             :   Py_VISIT(traverse_module_state->__pyx_kp_s_Empty_shape_tuple_for_cython_arr);
    4549             :   Py_VISIT(traverse_module_state->__pyx_kp_s_Expected_at_least_d_argument_s_g);
    4550             :   Py_VISIT(traverse_module_state->__pyx_kp_s_Function_call_with_ambiguous_arg);
    4551             :   Py_VISIT(traverse_module_state->__pyx_n_s_GradientEstimationWarning);
    4552             :   Py_VISIT(traverse_module_state->__pyx_kp_u_Gradient_estimation_did_not_conv);
    4553             :   Py_VISIT(traverse_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0);
    4554             :   Py_VISIT(traverse_module_state->__pyx_n_s_IndexError);
    4555             :   Py_VISIT(traverse_module_state->__pyx_kp_s_Index_out_of_bounds_axis_d);
    4556             :   Py_VISIT(traverse_module_state->__pyx_kp_s_Indirect_dimensions_not_supporte);
    4557             :   Py_VISIT(traverse_module_state->__pyx_kp_u_Invalid_mode_expected_c_or_fortr);
    4558             :   Py_VISIT(traverse_module_state->__pyx_kp_u_Invalid_shape_in_axis);
    4559             :   Py_VISIT(traverse_module_state->__pyx_n_s_LinearNDInterpolator);
    4560             :   Py_VISIT(traverse_module_state->__pyx_n_s_LinearNDInterpolator___init);
    4561             :   Py_VISIT(traverse_module_state->__pyx_n_s_LinearNDInterpolator__calculate);
    4562             :   Py_VISIT(traverse_module_state->__pyx_n_s_LinearNDInterpolator__do_evaluat);
    4563             :   Py_VISIT(traverse_module_state->__pyx_n_s_LinearNDInterpolator__evaluate_c);
    4564             :   Py_VISIT(traverse_module_state->__pyx_n_s_LinearNDInterpolator__evaluate_d);
    4565             :   Py_VISIT(traverse_module_state->__pyx_kp_s_LinearNDInterpolator_points_val);
    4566             :   Py_VISIT(traverse_module_state->__pyx_n_s_MemoryError);
    4567             :   Py_VISIT(traverse_module_state->__pyx_kp_s_MemoryView_of_r_at_0x_x);
    4568             :   Py_VISIT(traverse_module_state->__pyx_kp_s_MemoryView_of_r_object);
    4569             :   Py_VISIT(traverse_module_state->__pyx_n_s_NDInterpolatorBase);
    4570             :   Py_VISIT(traverse_module_state->__pyx_n_s_NDInterpolatorBase___call);
    4571             :   Py_VISIT(traverse_module_state->__pyx_n_s_NDInterpolatorBase___init);
    4572             :   Py_VISIT(traverse_module_state->__pyx_n_s_NDInterpolatorBase__calculate_tr);
    4573             :   Py_VISIT(traverse_module_state->__pyx_n_s_NDInterpolatorBase__check_call_s);
    4574             :   Py_VISIT(traverse_module_state->__pyx_n_s_NDInterpolatorBase__preprocess_x);
    4575             :   Py_VISIT(traverse_module_state->__pyx_n_s_NDInterpolatorBase__scale_x);
    4576             :   Py_VISIT(traverse_module_state->__pyx_n_s_NDInterpolatorBase__set_values);
    4577             :   Py_VISIT(traverse_module_state->__pyx_kp_s_No_matching_signature_found);
    4578             :   Py_VISIT(traverse_module_state->__pyx_n_b_O);
    4579             :   Py_VISIT(traverse_module_state->__pyx_kp_u_Out_of_bounds_on_buffer_access_a);
    4580             :   Py_VISIT(traverse_module_state->__pyx_n_s_PickleError);
    4581             :   Py_VISIT(traverse_module_state->__pyx_kp_u_Rescaling_is_not_supported_when);
    4582             :   Py_VISIT(traverse_module_state->__pyx_n_s_Sequence);
    4583             :   Py_VISIT(traverse_module_state->__pyx_kp_s_Step_may_not_be_zero_axis_d);
    4584             :   Py_VISIT(traverse_module_state->__pyx_n_s_T);
    4585             :   Py_VISIT(traverse_module_state->__pyx_n_s_TypeError);
    4586             :   Py_VISIT(traverse_module_state->__pyx_kp_s_Unable_to_convert_item_to_object);
    4587             :   Py_VISIT(traverse_module_state->__pyx_n_s_ValueError);
    4588             :   Py_VISIT(traverse_module_state->__pyx_n_s_View_MemoryView);
    4589             :   Py_VISIT(traverse_module_state->__pyx_n_s_Warning);
    4590             :   Py_VISIT(traverse_module_state->__pyx_kp_s__19);
    4591             :   Py_VISIT(traverse_module_state->__pyx_kp_u__2);
    4592             :   Py_VISIT(traverse_module_state->__pyx_kp_s__20);
    4593             :   Py_VISIT(traverse_module_state->__pyx_kp_u__20);
    4594             :   Py_VISIT(traverse_module_state->__pyx_n_s__3);
    4595             :   Py_VISIT(traverse_module_state->__pyx_kp_u__6);
    4596             :   Py_VISIT(traverse_module_state->__pyx_kp_u__7);
    4597             :   Py_VISIT(traverse_module_state->__pyx_n_s__74);
    4598             :   Py_VISIT(traverse_module_state->__pyx_n_s_abc);
    4599             :   Py_VISIT(traverse_module_state->__pyx_n_s_allocate_buffer);
    4600             :   Py_VISIT(traverse_module_state->__pyx_kp_u_and);
    4601             :   Py_VISIT(traverse_module_state->__pyx_n_s_args);
    4602             :   Py_VISIT(traverse_module_state->__pyx_n_s_asanyarray);
    4603             :   Py_VISIT(traverse_module_state->__pyx_n_s_asarray);
    4604             :   Py_VISIT(traverse_module_state->__pyx_n_s_ascontiguousarray);
    4605             :   Py_VISIT(traverse_module_state->__pyx_n_s_asyncio_coroutines);
    4606             :   Py_VISIT(traverse_module_state->__pyx_n_s_axis);
    4607             :   Py_VISIT(traverse_module_state->__pyx_n_s_base);
    4608             :   Py_VISIT(traverse_module_state->__pyx_n_s_broadcast_arrays);
    4609             :   Py_VISIT(traverse_module_state->__pyx_n_s_c);
    4610             :   Py_VISIT(traverse_module_state->__pyx_n_u_c);
    4611             :   Py_VISIT(traverse_module_state->__pyx_n_s_calculate_triangulation);
    4612             :   Py_VISIT(traverse_module_state->__pyx_n_s_call);
    4613             :   Py_VISIT(traverse_module_state->__pyx_n_s_check_call_shape);
    4614             :   Py_VISIT(traverse_module_state->__pyx_n_s_class);
    4615             :   Py_VISIT(traverse_module_state->__pyx_n_s_class_getitem);
    4616             :   Py_VISIT(traverse_module_state->__pyx_n_s_cline_in_traceback);
    4617             :   Py_VISIT(traverse_module_state->__pyx_n_s_collections);
    4618             :   Py_VISIT(traverse_module_state->__pyx_kp_s_collections_abc);
    4619             :   Py_VISIT(traverse_module_state->__pyx_n_s_complex128);
    4620             :   Py_VISIT(traverse_module_state->__pyx_n_s_complexfloating);
    4621             :   Py_VISIT(traverse_module_state->__pyx_kp_s_contiguous_and_direct);
    4622             :   Py_VISIT(traverse_module_state->__pyx_kp_s_contiguous_and_indirect);
    4623             :   Py_VISIT(traverse_module_state->__pyx_kp_u_coordinate_arrays_do_not_have_th);
    4624             :   Py_VISIT(traverse_module_state->__pyx_n_s_count);
    4625             :   Py_VISIT(traverse_module_state->__pyx_n_s_defaults);
    4626             :   Py_VISIT(traverse_module_state->__pyx_n_s_df);
    4627             :   Py_VISIT(traverse_module_state->__pyx_n_s_dict);
    4628             :   Py_VISIT(traverse_module_state->__pyx_kp_u_different_number_of_values_and_p);
    4629             :   Py_VISIT(traverse_module_state->__pyx_kp_u_disable);
    4630             :   Py_VISIT(traverse_module_state->__pyx_n_s_do_evaluate);
    4631             :   Py_VISIT(traverse_module_state->__pyx_n_s_doc);
    4632             :   Py_VISIT(traverse_module_state->__pyx_n_s_double);
    4633             :   Py_VISIT(traverse_module_state->__pyx_kp_s_double_complex);
    4634             :   Py_VISIT(traverse_module_state->__pyx_n_s_dtype);
    4635             :   Py_VISIT(traverse_module_state->__pyx_n_s_dtype_is_object);
    4636             :   Py_VISIT(traverse_module_state->__pyx_n_s_dummy);
    4637             :   Py_VISIT(traverse_module_state->__pyx_n_s_empty);
    4638             :   Py_VISIT(traverse_module_state->__pyx_kp_u_enable);
    4639             :   Py_VISIT(traverse_module_state->__pyx_n_s_encode);
    4640             :   Py_VISIT(traverse_module_state->__pyx_n_s_enumerate);
    4641             :   Py_VISIT(traverse_module_state->__pyx_n_s_eps);
    4642             :   Py_VISIT(traverse_module_state->__pyx_n_s_eps_broad);
    4643             :   Py_VISIT(traverse_module_state->__pyx_n_s_error);
    4644             :   Py_VISIT(traverse_module_state->__pyx_n_s_estimate_gradients_2d_global);
    4645             :   Py_VISIT(traverse_module_state->__pyx_n_s_evaluate_complex);
    4646             :   Py_VISIT(traverse_module_state->__pyx_n_s_evaluate_double);
    4647             :   Py_VISIT(traverse_module_state->__pyx_n_s_f);
    4648             :   Py_VISIT(traverse_module_state->__pyx_n_s_fill_value);
    4649             :   Py_VISIT(traverse_module_state->__pyx_n_s_flags);
    4650             :   Py_VISIT(traverse_module_state->__pyx_n_s_float64);
    4651             :   Py_VISIT(traverse_module_state->__pyx_n_s_format);
    4652             :   Py_VISIT(traverse_module_state->__pyx_n_s_fortran);
    4653             :   Py_VISIT(traverse_module_state->__pyx_n_u_fortran);
    4654             :   Py_VISIT(traverse_module_state->__pyx_n_s_fused_sigindex);
    4655             :   Py_VISIT(traverse_module_state->__pyx_kp_u_gc);
    4656             :   Py_VISIT(traverse_module_state->__pyx_n_s_get);
    4657             :   Py_VISIT(traverse_module_state->__pyx_n_s_getstate);
    4658             :   Py_VISIT(traverse_module_state->__pyx_kp_u_got);
    4659             :   Py_VISIT(traverse_module_state->__pyx_kp_u_got_differing_extents_in_dimensi);
    4660             :   Py_VISIT(traverse_module_state->__pyx_n_s_grad);
    4661             :   Py_VISIT(traverse_module_state->__pyx_kp_s_home_czgdp18079_Quansight_scipy);
    4662             :   Py_VISIT(traverse_module_state->__pyx_n_s_i);
    4663             :   Py_VISIT(traverse_module_state->__pyx_n_s_id);
    4664             :   Py_VISIT(traverse_module_state->__pyx_n_s_imag);
    4665             :   Py_VISIT(traverse_module_state->__pyx_n_s_import);
    4666             :   Py_VISIT(traverse_module_state->__pyx_n_s_index);
    4667             :   Py_VISIT(traverse_module_state->__pyx_n_s_info);
    4668             :   Py_VISIT(traverse_module_state->__pyx_n_s_init);
    4669             :   Py_VISIT(traverse_module_state->__pyx_n_s_init_subclass);
    4670             :   Py_VISIT(traverse_module_state->__pyx_n_s_initializing);
    4671             :   Py_VISIT(traverse_module_state->__pyx_kp_u_input_data_must_be_at_least_2_D);
    4672             :   Py_VISIT(traverse_module_state->__pyx_n_s_interpolation_points_shape);
    4673             :   Py_VISIT(traverse_module_state->__pyx_kp_u_invalid_shape_for_input_data_poi);
    4674             :   Py_VISIT(traverse_module_state->__pyx_n_s_is_complex);
    4675             :   Py_VISIT(traverse_module_state->__pyx_n_s_is_coroutine);
    4676             :   Py_VISIT(traverse_module_state->__pyx_kp_u_isenabled);
    4677             :   Py_VISIT(traverse_module_state->__pyx_n_s_isimplex);
    4678             :   Py_VISIT(traverse_module_state->__pyx_n_s_issubdtype);
    4679             :   Py_VISIT(traverse_module_state->__pyx_n_s_itemsize);
    4680             :   Py_VISIT(traverse_module_state->__pyx_kp_s_itemsize_0_for_cython_array);
    4681             :   Py_VISIT(traverse_module_state->__pyx_n_s_j);
    4682             :   Py_VISIT(traverse_module_state->__pyx_n_s_k);
    4683             :   Py_VISIT(traverse_module_state->__pyx_n_s_kwargs);
    4684             :   Py_VISIT(traverse_module_state->__pyx_n_s_m);
    4685             :   Py_VISIT(traverse_module_state->__pyx_n_s_main);
    4686             :   Py_VISIT(traverse_module_state->__pyx_n_s_maxiter);
    4687             :   Py_VISIT(traverse_module_state->__pyx_n_s_maxiter_2);
    4688             :   Py_VISIT(traverse_module_state->__pyx_n_s_mean);
    4689             :   Py_VISIT(traverse_module_state->__pyx_n_s_memview);
    4690             :   Py_VISIT(traverse_module_state->__pyx_n_s_metaclass);
    4691             :   Py_VISIT(traverse_module_state->__pyx_n_s_mode);
    4692             :   Py_VISIT(traverse_module_state->__pyx_n_s_module);
    4693             :   Py_VISIT(traverse_module_state->__pyx_n_s_mro_entries);
    4694             :   Py_VISIT(traverse_module_state->__pyx_n_s_name);
    4695             :   Py_VISIT(traverse_module_state->__pyx_n_s_name_2);
    4696             :   Py_VISIT(traverse_module_state->__pyx_n_s_nan);
    4697             :   Py_VISIT(traverse_module_state->__pyx_n_s_ndim);
    4698             :   Py_VISIT(traverse_module_state->__pyx_n_s_ndim_coords_from_arrays);
    4699             :   Py_VISIT(traverse_module_state->__pyx_n_s_need_contiguous);
    4700             :   Py_VISIT(traverse_module_state->__pyx_n_s_need_values);
    4701             :   Py_VISIT(traverse_module_state->__pyx_n_s_new);
    4702             :   Py_VISIT(traverse_module_state->__pyx_kp_s_no_default___reduce___due_to_non);
    4703             :   Py_VISIT(traverse_module_state->__pyx_n_s_np);
    4704             :   Py_VISIT(traverse_module_state->__pyx_n_s_npoints);
    4705             :   Py_VISIT(traverse_module_state->__pyx_kp_u_number_of_dimensions_in_xi_does);
    4706             :   Py_VISIT(traverse_module_state->__pyx_n_s_numpy);
    4707             :   Py_VISIT(traverse_module_state->__pyx_n_s_nvalues);
    4708             :   Py_VISIT(traverse_module_state->__pyx_n_s_obj);
    4709             :   Py_VISIT(traverse_module_state->__pyx_n_s_offset);
    4710             :   Py_VISIT(traverse_module_state->__pyx_n_s_out);
    4711             :   Py_VISIT(traverse_module_state->__pyx_n_s_pack);
    4712             :   Py_VISIT(traverse_module_state->__pyx_n_s_pickle);
    4713             :   Py_VISIT(traverse_module_state->__pyx_n_s_points);
    4714             :   Py_VISIT(traverse_module_state->__pyx_n_s_prepare);
    4715             :   Py_VISIT(traverse_module_state->__pyx_n_s_preprocess_xi);
    4716             :   Py_VISIT(traverse_module_state->__pyx_n_s_prod);
    4717             :   Py_VISIT(traverse_module_state->__pyx_n_s_ptp);
    4718             :   Py_VISIT(traverse_module_state->__pyx_n_s_pyx_PickleError);
    4719             :   Py_VISIT(traverse_module_state->__pyx_n_s_pyx_checksum);
    4720             :   Py_VISIT(traverse_module_state->__pyx_n_s_pyx_result);
    4721             :   Py_VISIT(traverse_module_state->__pyx_n_s_pyx_state);
    4722             :   Py_VISIT(traverse_module_state->__pyx_n_s_pyx_type);
    4723             :   Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_Enum);
    4724             :   Py_VISIT(traverse_module_state->__pyx_n_s_pyx_vtable);
    4725             :   Py_VISIT(traverse_module_state->__pyx_n_s_qhull);
    4726             :   Py_VISIT(traverse_module_state->__pyx_n_s_qhull_2);
    4727             :   Py_VISIT(traverse_module_state->__pyx_n_s_qualname);
    4728             :   Py_VISIT(traverse_module_state->__pyx_n_s_r);
    4729             :   Py_VISIT(traverse_module_state->__pyx_n_s_range);
    4730             :   Py_VISIT(traverse_module_state->__pyx_n_s_real);
    4731             :   Py_VISIT(traverse_module_state->__pyx_n_s_reduce);
    4732             :   Py_VISIT(traverse_module_state->__pyx_n_s_reduce_cython);
    4733             :   Py_VISIT(traverse_module_state->__pyx_n_s_reduce_ex);
    4734             :   Py_VISIT(traverse_module_state->__pyx_n_s_register);
    4735             :   Py_VISIT(traverse_module_state->__pyx_n_s_rescale);
    4736             :   Py_VISIT(traverse_module_state->__pyx_n_s_reshape);
    4737             :   Py_VISIT(traverse_module_state->__pyx_n_s_s);
    4738             :   Py_VISIT(traverse_module_state->__pyx_n_s_scale);
    4739             :   Py_VISIT(traverse_module_state->__pyx_n_s_scale_x);
    4740             :   Py_VISIT(traverse_module_state->__pyx_n_s_scipy);
    4741             :   Py_VISIT(traverse_module_state->__pyx_n_s_scipy_interpolate__interpnd);
    4742             :   Py_VISIT(traverse_module_state->__pyx_n_s_scipy_spatial__qhull);
    4743             :   Py_VISIT(traverse_module_state->__pyx_n_s_self);
    4744             :   Py_VISIT(traverse_module_state->__pyx_n_s_set_name);
    4745             :   Py_VISIT(traverse_module_state->__pyx_n_s_set_values);
    4746             :   Py_VISIT(traverse_module_state->__pyx_n_s_setstate);
    4747             :   Py_VISIT(traverse_module_state->__pyx_n_s_setstate_cython);
    4748             :   Py_VISIT(traverse_module_state->__pyx_n_s_shape);
    4749             :   Py_VISIT(traverse_module_state->__pyx_n_s_signatures);
    4750             :   Py_VISIT(traverse_module_state->__pyx_n_s_simplices);
    4751             :   Py_VISIT(traverse_module_state->__pyx_n_s_size);
    4752             :   Py_VISIT(traverse_module_state->__pyx_n_s_spatial);
    4753             :   Py_VISIT(traverse_module_state->__pyx_n_s_spec);
    4754             :   Py_VISIT(traverse_module_state->__pyx_n_s_split);
    4755             :   Py_VISIT(traverse_module_state->__pyx_n_s_start);
    4756             :   Py_VISIT(traverse_module_state->__pyx_n_s_step);
    4757             :   Py_VISIT(traverse_module_state->__pyx_n_s_stop);
    4758             :   Py_VISIT(traverse_module_state->__pyx_kp_s_strided_and_direct);
    4759             :   Py_VISIT(traverse_module_state->__pyx_kp_s_strided_and_direct_or_indirect);
    4760             :   Py_VISIT(traverse_module_state->__pyx_kp_s_strided_and_indirect);
    4761             :   Py_VISIT(traverse_module_state->__pyx_kp_s_stringsource);
    4762             :   Py_VISIT(traverse_module_state->__pyx_n_s_strip);
    4763             :   Py_VISIT(traverse_module_state->__pyx_n_s_struct);
    4764             :   Py_VISIT(traverse_module_state->__pyx_n_s_super);
    4765             :   Py_VISIT(traverse_module_state->__pyx_n_s_sys);
    4766             :   Py_VISIT(traverse_module_state->__pyx_n_s_test);
    4767             :   Py_VISIT(traverse_module_state->__pyx_kp_u_this_mode_of_interpolation_avail);
    4768             :   Py_VISIT(traverse_module_state->__pyx_n_s_tol);
    4769             :   Py_VISIT(traverse_module_state->__pyx_n_s_tol_2);
    4770             :   Py_VISIT(traverse_module_state->__pyx_n_s_transpose);
    4771             :   Py_VISIT(traverse_module_state->__pyx_n_s_tri);
    4772             :   Py_VISIT(traverse_module_state->__pyx_kp_s_unable_to_allocate_array_data);
    4773             :   Py_VISIT(traverse_module_state->__pyx_kp_s_unable_to_allocate_shape_and_str);
    4774             :   Py_VISIT(traverse_module_state->__pyx_n_s_unpack);
    4775             :   Py_VISIT(traverse_module_state->__pyx_n_s_update);
    4776             :   Py_VISIT(traverse_module_state->__pyx_n_s_values);
    4777             :   Py_VISIT(traverse_module_state->__pyx_n_s_values_shape);
    4778             :   Py_VISIT(traverse_module_state->__pyx_n_s_version_info);
    4779             :   Py_VISIT(traverse_module_state->__pyx_n_s_w);
    4780             :   Py_VISIT(traverse_module_state->__pyx_n_s_warn);
    4781             :   Py_VISIT(traverse_module_state->__pyx_n_s_warnings);
    4782             :   Py_VISIT(traverse_module_state->__pyx_n_s_xi);
    4783             :   Py_VISIT(traverse_module_state->__pyx_n_s_y);
    4784             :   Py_VISIT(traverse_module_state->__pyx_kp_u_y_has_a_wrong_number_of_items);
    4785             :   Py_VISIT(traverse_module_state->__pyx_n_s_zeros);
    4786             :   Py_VISIT(traverse_module_state->__pyx_float_1_0);
    4787             :   Py_VISIT(traverse_module_state->__pyx_float_1eneg_6);
    4788             :   Py_VISIT(traverse_module_state->__pyx_int_0);
    4789             :   Py_VISIT(traverse_module_state->__pyx_int_1);
    4790             :   Py_VISIT(traverse_module_state->__pyx_int_2);
    4791             :   Py_VISIT(traverse_module_state->__pyx_int_3);
    4792             :   Py_VISIT(traverse_module_state->__pyx_int_400);
    4793             :   Py_VISIT(traverse_module_state->__pyx_int_112105877);
    4794             :   Py_VISIT(traverse_module_state->__pyx_int_136983863);
    4795             :   Py_VISIT(traverse_module_state->__pyx_int_184977713);
    4796             :   Py_VISIT(traverse_module_state->__pyx_int_neg_1);
    4797             :   Py_VISIT(traverse_module_state->__pyx_slice__5);
    4798             :   Py_VISIT(traverse_module_state->__pyx_tuple__4);
    4799             :   Py_VISIT(traverse_module_state->__pyx_tuple__8);
    4800             :   Py_VISIT(traverse_module_state->__pyx_tuple__9);
    4801             :   Py_VISIT(traverse_module_state->__pyx_slice__10);
    4802             :   Py_VISIT(traverse_module_state->__pyx_slice__13);
    4803             :   Py_VISIT(traverse_module_state->__pyx_tuple__11);
    4804             :   Py_VISIT(traverse_module_state->__pyx_tuple__12);
    4805             :   Py_VISIT(traverse_module_state->__pyx_tuple__14);
    4806             :   Py_VISIT(traverse_module_state->__pyx_tuple__15);
    4807             :   Py_VISIT(traverse_module_state->__pyx_tuple__16);
    4808             :   Py_VISIT(traverse_module_state->__pyx_tuple__17);
    4809             :   Py_VISIT(traverse_module_state->__pyx_tuple__18);
    4810             :   Py_VISIT(traverse_module_state->__pyx_tuple__21);
    4811             :   Py_VISIT(traverse_module_state->__pyx_tuple__22);
    4812             :   Py_VISIT(traverse_module_state->__pyx_tuple__23);
    4813             :   Py_VISIT(traverse_module_state->__pyx_tuple__24);
    4814             :   Py_VISIT(traverse_module_state->__pyx_tuple__25);
    4815             :   Py_VISIT(traverse_module_state->__pyx_tuple__26);
    4816             :   Py_VISIT(traverse_module_state->__pyx_tuple__27);
    4817             :   Py_VISIT(traverse_module_state->__pyx_tuple__28);
    4818             :   Py_VISIT(traverse_module_state->__pyx_tuple__29);
    4819             :   Py_VISIT(traverse_module_state->__pyx_tuple__30);
    4820             :   Py_VISIT(traverse_module_state->__pyx_tuple__31);
    4821             :   Py_VISIT(traverse_module_state->__pyx_tuple__32);
    4822             :   Py_VISIT(traverse_module_state->__pyx_tuple__33);
    4823             :   Py_VISIT(traverse_module_state->__pyx_tuple__34);
    4824             :   Py_VISIT(traverse_module_state->__pyx_tuple__35);
    4825             :   Py_VISIT(traverse_module_state->__pyx_tuple__37);
    4826             :   Py_VISIT(traverse_module_state->__pyx_tuple__38);
    4827             :   Py_VISIT(traverse_module_state->__pyx_tuple__40);
    4828             :   Py_VISIT(traverse_module_state->__pyx_tuple__42);
    4829             :   Py_VISIT(traverse_module_state->__pyx_tuple__44);
    4830             :   Py_VISIT(traverse_module_state->__pyx_tuple__47);
    4831             :   Py_VISIT(traverse_module_state->__pyx_tuple__49);
    4832             :   Py_VISIT(traverse_module_state->__pyx_tuple__51);
    4833             :   Py_VISIT(traverse_module_state->__pyx_tuple__53);
    4834             :   Py_VISIT(traverse_module_state->__pyx_tuple__54);
    4835             :   Py_VISIT(traverse_module_state->__pyx_tuple__59);
    4836             :   Py_VISIT(traverse_module_state->__pyx_tuple__61);
    4837             :   Py_VISIT(traverse_module_state->__pyx_tuple__62);
    4838             :   Py_VISIT(traverse_module_state->__pyx_tuple__63);
    4839             :   Py_VISIT(traverse_module_state->__pyx_tuple__65);
    4840             :   Py_VISIT(traverse_module_state->__pyx_tuple__66);
    4841             :   Py_VISIT(traverse_module_state->__pyx_tuple__72);
    4842             :   Py_VISIT(traverse_module_state->__pyx_codeobj__36);
    4843             :   Py_VISIT(traverse_module_state->__pyx_codeobj__39);
    4844             :   Py_VISIT(traverse_module_state->__pyx_codeobj__41);
    4845             :   Py_VISIT(traverse_module_state->__pyx_codeobj__43);
    4846             :   Py_VISIT(traverse_module_state->__pyx_codeobj__45);
    4847             :   Py_VISIT(traverse_module_state->__pyx_codeobj__46);
    4848             :   Py_VISIT(traverse_module_state->__pyx_codeobj__48);
    4849             :   Py_VISIT(traverse_module_state->__pyx_codeobj__50);
    4850             :   Py_VISIT(traverse_module_state->__pyx_codeobj__52);
    4851             :   Py_VISIT(traverse_module_state->__pyx_codeobj__55);
    4852             :   Py_VISIT(traverse_module_state->__pyx_codeobj__56);
    4853             :   Py_VISIT(traverse_module_state->__pyx_codeobj__57);
    4854             :   Py_VISIT(traverse_module_state->__pyx_codeobj__58);
    4855             :   Py_VISIT(traverse_module_state->__pyx_codeobj__60);
    4856             :   Py_VISIT(traverse_module_state->__pyx_codeobj__64);
    4857             :   Py_VISIT(traverse_module_state->__pyx_codeobj__67);
    4858             :   Py_VISIT(traverse_module_state->__pyx_codeobj__68);
    4859             :   Py_VISIT(traverse_module_state->__pyx_codeobj__69);
    4860             :   Py_VISIT(traverse_module_state->__pyx_codeobj__70);
    4861             :   Py_VISIT(traverse_module_state->__pyx_codeobj__71);
    4862             :   Py_VISIT(traverse_module_state->__pyx_codeobj__73);
    4863             :   return 0;
    4864             : }
    4865             : #endif
    4866             : /* #### Code section: module_state_defines ### */
    4867             : #define __pyx_d __pyx_mstate_global->__pyx_d
    4868             : #define __pyx_b __pyx_mstate_global->__pyx_b
    4869             : #define __pyx_cython_runtime __pyx_mstate_global->__pyx_cython_runtime
    4870             : #define __pyx_empty_tuple __pyx_mstate_global->__pyx_empty_tuple
    4871             : #define __pyx_empty_bytes __pyx_mstate_global->__pyx_empty_bytes
    4872             : #define __pyx_empty_unicode __pyx_mstate_global->__pyx_empty_unicode
    4873             : #ifdef __Pyx_CyFunction_USED
    4874             : #define __pyx_CyFunctionType __pyx_mstate_global->__pyx_CyFunctionType
    4875             : #endif
    4876             : #ifdef __Pyx_FusedFunction_USED
    4877             : #define __pyx_FusedFunctionType __pyx_mstate_global->__pyx_FusedFunctionType
    4878             : #endif
    4879             : #ifdef __Pyx_Generator_USED
    4880             : #define __pyx_GeneratorType __pyx_mstate_global->__pyx_GeneratorType
    4881             : #endif
    4882             : #ifdef __Pyx_IterableCoroutine_USED
    4883             : #define __pyx_IterableCoroutineType __pyx_mstate_global->__pyx_IterableCoroutineType
    4884             : #endif
    4885             : #ifdef __Pyx_Coroutine_USED
    4886             : #define __pyx_CoroutineAwaitType __pyx_mstate_global->__pyx_CoroutineAwaitType
    4887             : #endif
    4888             : #ifdef __Pyx_Coroutine_USED
    4889             : #define __pyx_CoroutineType __pyx_mstate_global->__pyx_CoroutineType
    4890             : #endif
    4891             : #if CYTHON_USE_MODULE_STATE
    4892             : #endif
    4893             : #if CYTHON_USE_MODULE_STATE
    4894             : #endif
    4895             : #if CYTHON_USE_MODULE_STATE
    4896             : #endif
    4897             : #if CYTHON_USE_MODULE_STATE
    4898             : #endif
    4899             : #if CYTHON_USE_MODULE_STATE
    4900             : #endif
    4901             : #if CYTHON_USE_MODULE_STATE
    4902             : #endif
    4903             : #if CYTHON_USE_MODULE_STATE
    4904             : #define __pyx_type___pyx_array __pyx_mstate_global->__pyx_type___pyx_array
    4905             : #define __pyx_type___pyx_MemviewEnum __pyx_mstate_global->__pyx_type___pyx_MemviewEnum
    4906             : #define __pyx_type___pyx_memoryview __pyx_mstate_global->__pyx_type___pyx_memoryview
    4907             : #define __pyx_type___pyx_memoryviewslice __pyx_mstate_global->__pyx_type___pyx_memoryviewslice
    4908             : #endif
    4909             : #define __pyx_array_type __pyx_mstate_global->__pyx_array_type
    4910             : #define __pyx_MemviewEnum_type __pyx_mstate_global->__pyx_MemviewEnum_type
    4911             : #define __pyx_memoryview_type __pyx_mstate_global->__pyx_memoryview_type
    4912             : #define __pyx_memoryviewslice_type __pyx_mstate_global->__pyx_memoryviewslice_type
    4913             : #define __pyx_kp_u_ __pyx_mstate_global->__pyx_kp_u_
    4914             : #define __pyx_n_s_ASCII __pyx_mstate_global->__pyx_n_s_ASCII
    4915             : #define __pyx_kp_s_All_dimensions_preceding_dimensi __pyx_mstate_global->__pyx_kp_s_All_dimensions_preceding_dimensi
    4916             : #define __pyx_n_s_AssertionError __pyx_mstate_global->__pyx_n_s_AssertionError
    4917             : #define __pyx_kp_s_Buffer_view_does_not_expose_stri __pyx_mstate_global->__pyx_kp_s_Buffer_view_does_not_expose_stri
    4918             : #define __pyx_kp_s_Can_only_create_a_buffer_that_is __pyx_mstate_global->__pyx_kp_s_Can_only_create_a_buffer_that_is
    4919             : #define __pyx_kp_s_Cannot_assign_to_read_only_memor __pyx_mstate_global->__pyx_kp_s_Cannot_assign_to_read_only_memor
    4920             : #define __pyx_kp_s_Cannot_create_writable_memory_vi __pyx_mstate_global->__pyx_kp_s_Cannot_create_writable_memory_vi
    4921             : #define __pyx_kp_u_Cannot_index_with_type __pyx_mstate_global->__pyx_kp_u_Cannot_index_with_type
    4922             : #define __pyx_kp_s_Cannot_transpose_memoryview_with __pyx_mstate_global->__pyx_kp_s_Cannot_transpose_memoryview_with
    4923             : #define __pyx_n_s_CloughTocher2DInterpolator __pyx_mstate_global->__pyx_n_s_CloughTocher2DInterpolator
    4924             : #define __pyx_n_s_CloughTocher2DInterpolator___ini __pyx_mstate_global->__pyx_n_s_CloughTocher2DInterpolator___ini
    4925             : #define __pyx_n_s_CloughTocher2DInterpolator__calc __pyx_mstate_global->__pyx_n_s_CloughTocher2DInterpolator__calc
    4926             : #define __pyx_n_s_CloughTocher2DInterpolator__do_e __pyx_mstate_global->__pyx_n_s_CloughTocher2DInterpolator__do_e
    4927             : #define __pyx_n_s_CloughTocher2DInterpolator__eval __pyx_mstate_global->__pyx_n_s_CloughTocher2DInterpolator__eval
    4928             : #define __pyx_n_s_CloughTocher2DInterpolator__eval_2 __pyx_mstate_global->__pyx_n_s_CloughTocher2DInterpolator__eval_2
    4929             : #define __pyx_n_s_CloughTocher2DInterpolator__set __pyx_mstate_global->__pyx_n_s_CloughTocher2DInterpolator__set
    4930             : #define __pyx_kp_s_CloughTocher2DInterpolator_point __pyx_mstate_global->__pyx_kp_s_CloughTocher2DInterpolator_point
    4931             : #define __pyx_kp_s_Common_routines_for_interpolato __pyx_mstate_global->__pyx_kp_s_Common_routines_for_interpolato
    4932             : #define __pyx_n_s_Delaunay __pyx_mstate_global->__pyx_n_s_Delaunay
    4933             : #define __pyx_kp_s_Dimension_d_is_not_direct __pyx_mstate_global->__pyx_kp_s_Dimension_d_is_not_direct
    4934             : #define __pyx_n_s_Ellipsis __pyx_mstate_global->__pyx_n_s_Ellipsis
    4935             : #define __pyx_kp_s_Empty_shape_tuple_for_cython_arr __pyx_mstate_global->__pyx_kp_s_Empty_shape_tuple_for_cython_arr
    4936             : #define __pyx_kp_s_Expected_at_least_d_argument_s_g __pyx_mstate_global->__pyx_kp_s_Expected_at_least_d_argument_s_g
    4937             : #define __pyx_kp_s_Function_call_with_ambiguous_arg __pyx_mstate_global->__pyx_kp_s_Function_call_with_ambiguous_arg
    4938             : #define __pyx_n_s_GradientEstimationWarning __pyx_mstate_global->__pyx_n_s_GradientEstimationWarning
    4939             : #define __pyx_kp_u_Gradient_estimation_did_not_conv __pyx_mstate_global->__pyx_kp_u_Gradient_estimation_did_not_conv
    4940             : #define __pyx_kp_s_Incompatible_checksums_0x_x_vs_0 __pyx_mstate_global->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0
    4941             : #define __pyx_n_s_IndexError __pyx_mstate_global->__pyx_n_s_IndexError
    4942             : #define __pyx_kp_s_Index_out_of_bounds_axis_d __pyx_mstate_global->__pyx_kp_s_Index_out_of_bounds_axis_d
    4943             : #define __pyx_kp_s_Indirect_dimensions_not_supporte __pyx_mstate_global->__pyx_kp_s_Indirect_dimensions_not_supporte
    4944             : #define __pyx_kp_u_Invalid_mode_expected_c_or_fortr __pyx_mstate_global->__pyx_kp_u_Invalid_mode_expected_c_or_fortr
    4945             : #define __pyx_kp_u_Invalid_shape_in_axis __pyx_mstate_global->__pyx_kp_u_Invalid_shape_in_axis
    4946             : #define __pyx_n_s_LinearNDInterpolator __pyx_mstate_global->__pyx_n_s_LinearNDInterpolator
    4947             : #define __pyx_n_s_LinearNDInterpolator___init __pyx_mstate_global->__pyx_n_s_LinearNDInterpolator___init
    4948             : #define __pyx_n_s_LinearNDInterpolator__calculate __pyx_mstate_global->__pyx_n_s_LinearNDInterpolator__calculate
    4949             : #define __pyx_n_s_LinearNDInterpolator__do_evaluat __pyx_mstate_global->__pyx_n_s_LinearNDInterpolator__do_evaluat
    4950             : #define __pyx_n_s_LinearNDInterpolator__evaluate_c __pyx_mstate_global->__pyx_n_s_LinearNDInterpolator__evaluate_c
    4951             : #define __pyx_n_s_LinearNDInterpolator__evaluate_d __pyx_mstate_global->__pyx_n_s_LinearNDInterpolator__evaluate_d
    4952             : #define __pyx_kp_s_LinearNDInterpolator_points_val __pyx_mstate_global->__pyx_kp_s_LinearNDInterpolator_points_val
    4953             : #define __pyx_n_s_MemoryError __pyx_mstate_global->__pyx_n_s_MemoryError
    4954             : #define __pyx_kp_s_MemoryView_of_r_at_0x_x __pyx_mstate_global->__pyx_kp_s_MemoryView_of_r_at_0x_x
    4955             : #define __pyx_kp_s_MemoryView_of_r_object __pyx_mstate_global->__pyx_kp_s_MemoryView_of_r_object
    4956             : #define __pyx_n_s_NDInterpolatorBase __pyx_mstate_global->__pyx_n_s_NDInterpolatorBase
    4957             : #define __pyx_n_s_NDInterpolatorBase___call __pyx_mstate_global->__pyx_n_s_NDInterpolatorBase___call
    4958             : #define __pyx_n_s_NDInterpolatorBase___init __pyx_mstate_global->__pyx_n_s_NDInterpolatorBase___init
    4959             : #define __pyx_n_s_NDInterpolatorBase__calculate_tr __pyx_mstate_global->__pyx_n_s_NDInterpolatorBase__calculate_tr
    4960             : #define __pyx_n_s_NDInterpolatorBase__check_call_s __pyx_mstate_global->__pyx_n_s_NDInterpolatorBase__check_call_s
    4961             : #define __pyx_n_s_NDInterpolatorBase__preprocess_x __pyx_mstate_global->__pyx_n_s_NDInterpolatorBase__preprocess_x
    4962             : #define __pyx_n_s_NDInterpolatorBase__scale_x __pyx_mstate_global->__pyx_n_s_NDInterpolatorBase__scale_x
    4963             : #define __pyx_n_s_NDInterpolatorBase__set_values __pyx_mstate_global->__pyx_n_s_NDInterpolatorBase__set_values
    4964             : #define __pyx_kp_s_No_matching_signature_found __pyx_mstate_global->__pyx_kp_s_No_matching_signature_found
    4965             : #define __pyx_n_b_O __pyx_mstate_global->__pyx_n_b_O
    4966             : #define __pyx_kp_u_Out_of_bounds_on_buffer_access_a __pyx_mstate_global->__pyx_kp_u_Out_of_bounds_on_buffer_access_a
    4967             : #define __pyx_n_s_PickleError __pyx_mstate_global->__pyx_n_s_PickleError
    4968             : #define __pyx_kp_u_Rescaling_is_not_supported_when __pyx_mstate_global->__pyx_kp_u_Rescaling_is_not_supported_when
    4969             : #define __pyx_n_s_Sequence __pyx_mstate_global->__pyx_n_s_Sequence
    4970             : #define __pyx_kp_s_Step_may_not_be_zero_axis_d __pyx_mstate_global->__pyx_kp_s_Step_may_not_be_zero_axis_d
    4971             : #define __pyx_n_s_T __pyx_mstate_global->__pyx_n_s_T
    4972             : #define __pyx_n_s_TypeError __pyx_mstate_global->__pyx_n_s_TypeError
    4973             : #define __pyx_kp_s_Unable_to_convert_item_to_object __pyx_mstate_global->__pyx_kp_s_Unable_to_convert_item_to_object
    4974             : #define __pyx_n_s_ValueError __pyx_mstate_global->__pyx_n_s_ValueError
    4975             : #define __pyx_n_s_View_MemoryView __pyx_mstate_global->__pyx_n_s_View_MemoryView
    4976             : #define __pyx_n_s_Warning __pyx_mstate_global->__pyx_n_s_Warning
    4977             : #define __pyx_kp_s__19 __pyx_mstate_global->__pyx_kp_s__19
    4978             : #define __pyx_kp_u__2 __pyx_mstate_global->__pyx_kp_u__2
    4979             : #define __pyx_kp_s__20 __pyx_mstate_global->__pyx_kp_s__20
    4980             : #define __pyx_kp_u__20 __pyx_mstate_global->__pyx_kp_u__20
    4981             : #define __pyx_n_s__3 __pyx_mstate_global->__pyx_n_s__3
    4982             : #define __pyx_kp_u__6 __pyx_mstate_global->__pyx_kp_u__6
    4983             : #define __pyx_kp_u__7 __pyx_mstate_global->__pyx_kp_u__7
    4984             : #define __pyx_n_s__74 __pyx_mstate_global->__pyx_n_s__74
    4985             : #define __pyx_n_s_abc __pyx_mstate_global->__pyx_n_s_abc
    4986             : #define __pyx_n_s_allocate_buffer __pyx_mstate_global->__pyx_n_s_allocate_buffer
    4987             : #define __pyx_kp_u_and __pyx_mstate_global->__pyx_kp_u_and
    4988             : #define __pyx_n_s_args __pyx_mstate_global->__pyx_n_s_args
    4989             : #define __pyx_n_s_asanyarray __pyx_mstate_global->__pyx_n_s_asanyarray
    4990             : #define __pyx_n_s_asarray __pyx_mstate_global->__pyx_n_s_asarray
    4991             : #define __pyx_n_s_ascontiguousarray __pyx_mstate_global->__pyx_n_s_ascontiguousarray
    4992             : #define __pyx_n_s_asyncio_coroutines __pyx_mstate_global->__pyx_n_s_asyncio_coroutines
    4993             : #define __pyx_n_s_axis __pyx_mstate_global->__pyx_n_s_axis
    4994             : #define __pyx_n_s_base __pyx_mstate_global->__pyx_n_s_base
    4995             : #define __pyx_n_s_broadcast_arrays __pyx_mstate_global->__pyx_n_s_broadcast_arrays
    4996             : #define __pyx_n_s_c __pyx_mstate_global->__pyx_n_s_c
    4997             : #define __pyx_n_u_c __pyx_mstate_global->__pyx_n_u_c
    4998             : #define __pyx_n_s_calculate_triangulation __pyx_mstate_global->__pyx_n_s_calculate_triangulation
    4999             : #define __pyx_n_s_call __pyx_mstate_global->__pyx_n_s_call
    5000             : #define __pyx_n_s_check_call_shape __pyx_mstate_global->__pyx_n_s_check_call_shape
    5001             : #define __pyx_n_s_class __pyx_mstate_global->__pyx_n_s_class
    5002             : #define __pyx_n_s_class_getitem __pyx_mstate_global->__pyx_n_s_class_getitem
    5003             : #define __pyx_n_s_cline_in_traceback __pyx_mstate_global->__pyx_n_s_cline_in_traceback
    5004             : #define __pyx_n_s_collections __pyx_mstate_global->__pyx_n_s_collections
    5005             : #define __pyx_kp_s_collections_abc __pyx_mstate_global->__pyx_kp_s_collections_abc
    5006             : #define __pyx_n_s_complex128 __pyx_mstate_global->__pyx_n_s_complex128
    5007             : #define __pyx_n_s_complexfloating __pyx_mstate_global->__pyx_n_s_complexfloating
    5008             : #define __pyx_kp_s_contiguous_and_direct __pyx_mstate_global->__pyx_kp_s_contiguous_and_direct
    5009             : #define __pyx_kp_s_contiguous_and_indirect __pyx_mstate_global->__pyx_kp_s_contiguous_and_indirect
    5010             : #define __pyx_kp_u_coordinate_arrays_do_not_have_th __pyx_mstate_global->__pyx_kp_u_coordinate_arrays_do_not_have_th
    5011             : #define __pyx_n_s_count __pyx_mstate_global->__pyx_n_s_count
    5012             : #define __pyx_n_s_defaults __pyx_mstate_global->__pyx_n_s_defaults
    5013             : #define __pyx_n_s_df __pyx_mstate_global->__pyx_n_s_df
    5014             : #define __pyx_n_s_dict __pyx_mstate_global->__pyx_n_s_dict
    5015             : #define __pyx_kp_u_different_number_of_values_and_p __pyx_mstate_global->__pyx_kp_u_different_number_of_values_and_p
    5016             : #define __pyx_kp_u_disable __pyx_mstate_global->__pyx_kp_u_disable
    5017             : #define __pyx_n_s_do_evaluate __pyx_mstate_global->__pyx_n_s_do_evaluate
    5018             : #define __pyx_n_s_doc __pyx_mstate_global->__pyx_n_s_doc
    5019             : #define __pyx_n_s_double __pyx_mstate_global->__pyx_n_s_double
    5020             : #define __pyx_kp_s_double_complex __pyx_mstate_global->__pyx_kp_s_double_complex
    5021             : #define __pyx_n_s_dtype __pyx_mstate_global->__pyx_n_s_dtype
    5022             : #define __pyx_n_s_dtype_is_object __pyx_mstate_global->__pyx_n_s_dtype_is_object
    5023             : #define __pyx_n_s_dummy __pyx_mstate_global->__pyx_n_s_dummy
    5024             : #define __pyx_n_s_empty __pyx_mstate_global->__pyx_n_s_empty
    5025             : #define __pyx_kp_u_enable __pyx_mstate_global->__pyx_kp_u_enable
    5026             : #define __pyx_n_s_encode __pyx_mstate_global->__pyx_n_s_encode
    5027             : #define __pyx_n_s_enumerate __pyx_mstate_global->__pyx_n_s_enumerate
    5028             : #define __pyx_n_s_eps __pyx_mstate_global->__pyx_n_s_eps
    5029             : #define __pyx_n_s_eps_broad __pyx_mstate_global->__pyx_n_s_eps_broad
    5030             : #define __pyx_n_s_error __pyx_mstate_global->__pyx_n_s_error
    5031             : #define __pyx_n_s_estimate_gradients_2d_global __pyx_mstate_global->__pyx_n_s_estimate_gradients_2d_global
    5032             : #define __pyx_n_s_evaluate_complex __pyx_mstate_global->__pyx_n_s_evaluate_complex
    5033             : #define __pyx_n_s_evaluate_double __pyx_mstate_global->__pyx_n_s_evaluate_double
    5034             : #define __pyx_n_s_f __pyx_mstate_global->__pyx_n_s_f
    5035             : #define __pyx_n_s_fill_value __pyx_mstate_global->__pyx_n_s_fill_value
    5036             : #define __pyx_n_s_flags __pyx_mstate_global->__pyx_n_s_flags
    5037             : #define __pyx_n_s_float64 __pyx_mstate_global->__pyx_n_s_float64
    5038             : #define __pyx_n_s_format __pyx_mstate_global->__pyx_n_s_format
    5039             : #define __pyx_n_s_fortran __pyx_mstate_global->__pyx_n_s_fortran
    5040             : #define __pyx_n_u_fortran __pyx_mstate_global->__pyx_n_u_fortran
    5041             : #define __pyx_n_s_fused_sigindex __pyx_mstate_global->__pyx_n_s_fused_sigindex
    5042             : #define __pyx_kp_u_gc __pyx_mstate_global->__pyx_kp_u_gc
    5043             : #define __pyx_n_s_get __pyx_mstate_global->__pyx_n_s_get
    5044             : #define __pyx_n_s_getstate __pyx_mstate_global->__pyx_n_s_getstate
    5045             : #define __pyx_kp_u_got __pyx_mstate_global->__pyx_kp_u_got
    5046             : #define __pyx_kp_u_got_differing_extents_in_dimensi __pyx_mstate_global->__pyx_kp_u_got_differing_extents_in_dimensi
    5047             : #define __pyx_n_s_grad __pyx_mstate_global->__pyx_n_s_grad
    5048             : #define __pyx_kp_s_home_czgdp18079_Quansight_scipy __pyx_mstate_global->__pyx_kp_s_home_czgdp18079_Quansight_scipy
    5049             : #define __pyx_n_s_i __pyx_mstate_global->__pyx_n_s_i
    5050             : #define __pyx_n_s_id __pyx_mstate_global->__pyx_n_s_id
    5051             : #define __pyx_n_s_imag __pyx_mstate_global->__pyx_n_s_imag
    5052             : #define __pyx_n_s_import __pyx_mstate_global->__pyx_n_s_import
    5053             : #define __pyx_n_s_index __pyx_mstate_global->__pyx_n_s_index
    5054             : #define __pyx_n_s_info __pyx_mstate_global->__pyx_n_s_info
    5055             : #define __pyx_n_s_init __pyx_mstate_global->__pyx_n_s_init
    5056             : #define __pyx_n_s_init_subclass __pyx_mstate_global->__pyx_n_s_init_subclass
    5057             : #define __pyx_n_s_initializing __pyx_mstate_global->__pyx_n_s_initializing
    5058             : #define __pyx_kp_u_input_data_must_be_at_least_2_D __pyx_mstate_global->__pyx_kp_u_input_data_must_be_at_least_2_D
    5059             : #define __pyx_n_s_interpolation_points_shape __pyx_mstate_global->__pyx_n_s_interpolation_points_shape
    5060             : #define __pyx_kp_u_invalid_shape_for_input_data_poi __pyx_mstate_global->__pyx_kp_u_invalid_shape_for_input_data_poi
    5061             : #define __pyx_n_s_is_complex __pyx_mstate_global->__pyx_n_s_is_complex
    5062             : #define __pyx_n_s_is_coroutine __pyx_mstate_global->__pyx_n_s_is_coroutine
    5063             : #define __pyx_kp_u_isenabled __pyx_mstate_global->__pyx_kp_u_isenabled
    5064             : #define __pyx_n_s_isimplex __pyx_mstate_global->__pyx_n_s_isimplex
    5065             : #define __pyx_n_s_issubdtype __pyx_mstate_global->__pyx_n_s_issubdtype
    5066             : #define __pyx_n_s_itemsize __pyx_mstate_global->__pyx_n_s_itemsize
    5067             : #define __pyx_kp_s_itemsize_0_for_cython_array __pyx_mstate_global->__pyx_kp_s_itemsize_0_for_cython_array
    5068             : #define __pyx_n_s_j __pyx_mstate_global->__pyx_n_s_j
    5069             : #define __pyx_n_s_k __pyx_mstate_global->__pyx_n_s_k
    5070             : #define __pyx_n_s_kwargs __pyx_mstate_global->__pyx_n_s_kwargs
    5071             : #define __pyx_n_s_m __pyx_mstate_global->__pyx_n_s_m
    5072             : #define __pyx_n_s_main __pyx_mstate_global->__pyx_n_s_main
    5073             : #define __pyx_n_s_maxiter __pyx_mstate_global->__pyx_n_s_maxiter
    5074             : #define __pyx_n_s_maxiter_2 __pyx_mstate_global->__pyx_n_s_maxiter_2
    5075             : #define __pyx_n_s_mean __pyx_mstate_global->__pyx_n_s_mean
    5076             : #define __pyx_n_s_memview __pyx_mstate_global->__pyx_n_s_memview
    5077             : #define __pyx_n_s_metaclass __pyx_mstate_global->__pyx_n_s_metaclass
    5078             : #define __pyx_n_s_mode __pyx_mstate_global->__pyx_n_s_mode
    5079             : #define __pyx_n_s_module __pyx_mstate_global->__pyx_n_s_module
    5080             : #define __pyx_n_s_mro_entries __pyx_mstate_global->__pyx_n_s_mro_entries
    5081             : #define __pyx_n_s_name __pyx_mstate_global->__pyx_n_s_name
    5082             : #define __pyx_n_s_name_2 __pyx_mstate_global->__pyx_n_s_name_2
    5083             : #define __pyx_n_s_nan __pyx_mstate_global->__pyx_n_s_nan
    5084             : #define __pyx_n_s_ndim __pyx_mstate_global->__pyx_n_s_ndim
    5085             : #define __pyx_n_s_ndim_coords_from_arrays __pyx_mstate_global->__pyx_n_s_ndim_coords_from_arrays
    5086             : #define __pyx_n_s_need_contiguous __pyx_mstate_global->__pyx_n_s_need_contiguous
    5087             : #define __pyx_n_s_need_values __pyx_mstate_global->__pyx_n_s_need_values
    5088             : #define __pyx_n_s_new __pyx_mstate_global->__pyx_n_s_new
    5089             : #define __pyx_kp_s_no_default___reduce___due_to_non __pyx_mstate_global->__pyx_kp_s_no_default___reduce___due_to_non
    5090             : #define __pyx_n_s_np __pyx_mstate_global->__pyx_n_s_np
    5091             : #define __pyx_n_s_npoints __pyx_mstate_global->__pyx_n_s_npoints
    5092             : #define __pyx_kp_u_number_of_dimensions_in_xi_does __pyx_mstate_global->__pyx_kp_u_number_of_dimensions_in_xi_does
    5093             : #define __pyx_n_s_numpy __pyx_mstate_global->__pyx_n_s_numpy
    5094             : #define __pyx_n_s_nvalues __pyx_mstate_global->__pyx_n_s_nvalues
    5095             : #define __pyx_n_s_obj __pyx_mstate_global->__pyx_n_s_obj
    5096             : #define __pyx_n_s_offset __pyx_mstate_global->__pyx_n_s_offset
    5097             : #define __pyx_n_s_out __pyx_mstate_global->__pyx_n_s_out
    5098             : #define __pyx_n_s_pack __pyx_mstate_global->__pyx_n_s_pack
    5099             : #define __pyx_n_s_pickle __pyx_mstate_global->__pyx_n_s_pickle
    5100             : #define __pyx_n_s_points __pyx_mstate_global->__pyx_n_s_points
    5101             : #define __pyx_n_s_prepare __pyx_mstate_global->__pyx_n_s_prepare
    5102             : #define __pyx_n_s_preprocess_xi __pyx_mstate_global->__pyx_n_s_preprocess_xi
    5103             : #define __pyx_n_s_prod __pyx_mstate_global->__pyx_n_s_prod
    5104             : #define __pyx_n_s_ptp __pyx_mstate_global->__pyx_n_s_ptp
    5105             : #define __pyx_n_s_pyx_PickleError __pyx_mstate_global->__pyx_n_s_pyx_PickleError
    5106             : #define __pyx_n_s_pyx_checksum __pyx_mstate_global->__pyx_n_s_pyx_checksum
    5107             : #define __pyx_n_s_pyx_result __pyx_mstate_global->__pyx_n_s_pyx_result
    5108             : #define __pyx_n_s_pyx_state __pyx_mstate_global->__pyx_n_s_pyx_state
    5109             : #define __pyx_n_s_pyx_type __pyx_mstate_global->__pyx_n_s_pyx_type
    5110             : #define __pyx_n_s_pyx_unpickle_Enum __pyx_mstate_global->__pyx_n_s_pyx_unpickle_Enum
    5111             : #define __pyx_n_s_pyx_vtable __pyx_mstate_global->__pyx_n_s_pyx_vtable
    5112             : #define __pyx_n_s_qhull __pyx_mstate_global->__pyx_n_s_qhull
    5113             : #define __pyx_n_s_qhull_2 __pyx_mstate_global->__pyx_n_s_qhull_2
    5114             : #define __pyx_n_s_qualname __pyx_mstate_global->__pyx_n_s_qualname
    5115             : #define __pyx_n_s_r __pyx_mstate_global->__pyx_n_s_r
    5116             : #define __pyx_n_s_range __pyx_mstate_global->__pyx_n_s_range
    5117             : #define __pyx_n_s_real __pyx_mstate_global->__pyx_n_s_real
    5118             : #define __pyx_n_s_reduce __pyx_mstate_global->__pyx_n_s_reduce
    5119             : #define __pyx_n_s_reduce_cython __pyx_mstate_global->__pyx_n_s_reduce_cython
    5120             : #define __pyx_n_s_reduce_ex __pyx_mstate_global->__pyx_n_s_reduce_ex
    5121             : #define __pyx_n_s_register __pyx_mstate_global->__pyx_n_s_register
    5122             : #define __pyx_n_s_rescale __pyx_mstate_global->__pyx_n_s_rescale
    5123             : #define __pyx_n_s_reshape __pyx_mstate_global->__pyx_n_s_reshape
    5124             : #define __pyx_n_s_s __pyx_mstate_global->__pyx_n_s_s
    5125             : #define __pyx_n_s_scale __pyx_mstate_global->__pyx_n_s_scale
    5126             : #define __pyx_n_s_scale_x __pyx_mstate_global->__pyx_n_s_scale_x
    5127             : #define __pyx_n_s_scipy __pyx_mstate_global->__pyx_n_s_scipy
    5128             : #define __pyx_n_s_scipy_interpolate__interpnd __pyx_mstate_global->__pyx_n_s_scipy_interpolate__interpnd
    5129             : #define __pyx_n_s_scipy_spatial__qhull __pyx_mstate_global->__pyx_n_s_scipy_spatial__qhull
    5130             : #define __pyx_n_s_self __pyx_mstate_global->__pyx_n_s_self
    5131             : #define __pyx_n_s_set_name __pyx_mstate_global->__pyx_n_s_set_name
    5132             : #define __pyx_n_s_set_values __pyx_mstate_global->__pyx_n_s_set_values
    5133             : #define __pyx_n_s_setstate __pyx_mstate_global->__pyx_n_s_setstate
    5134             : #define __pyx_n_s_setstate_cython __pyx_mstate_global->__pyx_n_s_setstate_cython
    5135             : #define __pyx_n_s_shape __pyx_mstate_global->__pyx_n_s_shape
    5136             : #define __pyx_n_s_signatures __pyx_mstate_global->__pyx_n_s_signatures
    5137             : #define __pyx_n_s_simplices __pyx_mstate_global->__pyx_n_s_simplices
    5138             : #define __pyx_n_s_size __pyx_mstate_global->__pyx_n_s_size
    5139             : #define __pyx_n_s_spatial __pyx_mstate_global->__pyx_n_s_spatial
    5140             : #define __pyx_n_s_spec __pyx_mstate_global->__pyx_n_s_spec
    5141             : #define __pyx_n_s_split __pyx_mstate_global->__pyx_n_s_split
    5142             : #define __pyx_n_s_start __pyx_mstate_global->__pyx_n_s_start
    5143             : #define __pyx_n_s_step __pyx_mstate_global->__pyx_n_s_step
    5144             : #define __pyx_n_s_stop __pyx_mstate_global->__pyx_n_s_stop
    5145             : #define __pyx_kp_s_strided_and_direct __pyx_mstate_global->__pyx_kp_s_strided_and_direct
    5146             : #define __pyx_kp_s_strided_and_direct_or_indirect __pyx_mstate_global->__pyx_kp_s_strided_and_direct_or_indirect
    5147             : #define __pyx_kp_s_strided_and_indirect __pyx_mstate_global->__pyx_kp_s_strided_and_indirect
    5148             : #define __pyx_kp_s_stringsource __pyx_mstate_global->__pyx_kp_s_stringsource
    5149             : #define __pyx_n_s_strip __pyx_mstate_global->__pyx_n_s_strip
    5150             : #define __pyx_n_s_struct __pyx_mstate_global->__pyx_n_s_struct
    5151             : #define __pyx_n_s_super __pyx_mstate_global->__pyx_n_s_super
    5152             : #define __pyx_n_s_sys __pyx_mstate_global->__pyx_n_s_sys
    5153             : #define __pyx_n_s_test __pyx_mstate_global->__pyx_n_s_test
    5154             : #define __pyx_kp_u_this_mode_of_interpolation_avail __pyx_mstate_global->__pyx_kp_u_this_mode_of_interpolation_avail
    5155             : #define __pyx_n_s_tol __pyx_mstate_global->__pyx_n_s_tol
    5156             : #define __pyx_n_s_tol_2 __pyx_mstate_global->__pyx_n_s_tol_2
    5157             : #define __pyx_n_s_transpose __pyx_mstate_global->__pyx_n_s_transpose
    5158             : #define __pyx_n_s_tri __pyx_mstate_global->__pyx_n_s_tri
    5159             : #define __pyx_kp_s_unable_to_allocate_array_data __pyx_mstate_global->__pyx_kp_s_unable_to_allocate_array_data
    5160             : #define __pyx_kp_s_unable_to_allocate_shape_and_str __pyx_mstate_global->__pyx_kp_s_unable_to_allocate_shape_and_str
    5161             : #define __pyx_n_s_unpack __pyx_mstate_global->__pyx_n_s_unpack
    5162             : #define __pyx_n_s_update __pyx_mstate_global->__pyx_n_s_update
    5163             : #define __pyx_n_s_values __pyx_mstate_global->__pyx_n_s_values
    5164             : #define __pyx_n_s_values_shape __pyx_mstate_global->__pyx_n_s_values_shape
    5165             : #define __pyx_n_s_version_info __pyx_mstate_global->__pyx_n_s_version_info
    5166             : #define __pyx_n_s_w __pyx_mstate_global->__pyx_n_s_w
    5167             : #define __pyx_n_s_warn __pyx_mstate_global->__pyx_n_s_warn
    5168             : #define __pyx_n_s_warnings __pyx_mstate_global->__pyx_n_s_warnings
    5169             : #define __pyx_n_s_xi __pyx_mstate_global->__pyx_n_s_xi
    5170             : #define __pyx_n_s_y __pyx_mstate_global->__pyx_n_s_y
    5171             : #define __pyx_kp_u_y_has_a_wrong_number_of_items __pyx_mstate_global->__pyx_kp_u_y_has_a_wrong_number_of_items
    5172             : #define __pyx_n_s_zeros __pyx_mstate_global->__pyx_n_s_zeros
    5173             : #define __pyx_float_1_0 __pyx_mstate_global->__pyx_float_1_0
    5174             : #define __pyx_float_1eneg_6 __pyx_mstate_global->__pyx_float_1eneg_6
    5175             : #define __pyx_int_0 __pyx_mstate_global->__pyx_int_0
    5176             : #define __pyx_int_1 __pyx_mstate_global->__pyx_int_1
    5177             : #define __pyx_int_2 __pyx_mstate_global->__pyx_int_2
    5178             : #define __pyx_int_3 __pyx_mstate_global->__pyx_int_3
    5179             : #define __pyx_int_400 __pyx_mstate_global->__pyx_int_400
    5180             : #define __pyx_int_112105877 __pyx_mstate_global->__pyx_int_112105877
    5181             : #define __pyx_int_136983863 __pyx_mstate_global->__pyx_int_136983863
    5182             : #define __pyx_int_184977713 __pyx_mstate_global->__pyx_int_184977713
    5183             : #define __pyx_int_neg_1 __pyx_mstate_global->__pyx_int_neg_1
    5184             : #define __pyx_slice__5 __pyx_mstate_global->__pyx_slice__5
    5185             : #define __pyx_tuple__4 __pyx_mstate_global->__pyx_tuple__4
    5186             : #define __pyx_tuple__8 __pyx_mstate_global->__pyx_tuple__8
    5187             : #define __pyx_tuple__9 __pyx_mstate_global->__pyx_tuple__9
    5188             : #define __pyx_slice__10 __pyx_mstate_global->__pyx_slice__10
    5189             : #define __pyx_slice__13 __pyx_mstate_global->__pyx_slice__13
    5190             : #define __pyx_tuple__11 __pyx_mstate_global->__pyx_tuple__11
    5191             : #define __pyx_tuple__12 __pyx_mstate_global->__pyx_tuple__12
    5192             : #define __pyx_tuple__14 __pyx_mstate_global->__pyx_tuple__14
    5193             : #define __pyx_tuple__15 __pyx_mstate_global->__pyx_tuple__15
    5194             : #define __pyx_tuple__16 __pyx_mstate_global->__pyx_tuple__16
    5195             : #define __pyx_tuple__17 __pyx_mstate_global->__pyx_tuple__17
    5196             : #define __pyx_tuple__18 __pyx_mstate_global->__pyx_tuple__18
    5197             : #define __pyx_tuple__21 __pyx_mstate_global->__pyx_tuple__21
    5198             : #define __pyx_tuple__22 __pyx_mstate_global->__pyx_tuple__22
    5199             : #define __pyx_tuple__23 __pyx_mstate_global->__pyx_tuple__23
    5200             : #define __pyx_tuple__24 __pyx_mstate_global->__pyx_tuple__24
    5201             : #define __pyx_tuple__25 __pyx_mstate_global->__pyx_tuple__25
    5202             : #define __pyx_tuple__26 __pyx_mstate_global->__pyx_tuple__26
    5203             : #define __pyx_tuple__27 __pyx_mstate_global->__pyx_tuple__27
    5204             : #define __pyx_tuple__28 __pyx_mstate_global->__pyx_tuple__28
    5205             : #define __pyx_tuple__29 __pyx_mstate_global->__pyx_tuple__29
    5206             : #define __pyx_tuple__30 __pyx_mstate_global->__pyx_tuple__30
    5207             : #define __pyx_tuple__31 __pyx_mstate_global->__pyx_tuple__31
    5208             : #define __pyx_tuple__32 __pyx_mstate_global->__pyx_tuple__32
    5209             : #define __pyx_tuple__33 __pyx_mstate_global->__pyx_tuple__33
    5210             : #define __pyx_tuple__34 __pyx_mstate_global->__pyx_tuple__34
    5211             : #define __pyx_tuple__35 __pyx_mstate_global->__pyx_tuple__35
    5212             : #define __pyx_tuple__37 __pyx_mstate_global->__pyx_tuple__37
    5213             : #define __pyx_tuple__38 __pyx_mstate_global->__pyx_tuple__38
    5214             : #define __pyx_tuple__40 __pyx_mstate_global->__pyx_tuple__40
    5215             : #define __pyx_tuple__42 __pyx_mstate_global->__pyx_tuple__42
    5216             : #define __pyx_tuple__44 __pyx_mstate_global->__pyx_tuple__44
    5217             : #define __pyx_tuple__47 __pyx_mstate_global->__pyx_tuple__47
    5218             : #define __pyx_tuple__49 __pyx_mstate_global->__pyx_tuple__49
    5219             : #define __pyx_tuple__51 __pyx_mstate_global->__pyx_tuple__51
    5220             : #define __pyx_tuple__53 __pyx_mstate_global->__pyx_tuple__53
    5221             : #define __pyx_tuple__54 __pyx_mstate_global->__pyx_tuple__54
    5222             : #define __pyx_tuple__59 __pyx_mstate_global->__pyx_tuple__59
    5223             : #define __pyx_tuple__61 __pyx_mstate_global->__pyx_tuple__61
    5224             : #define __pyx_tuple__62 __pyx_mstate_global->__pyx_tuple__62
    5225             : #define __pyx_tuple__63 __pyx_mstate_global->__pyx_tuple__63
    5226             : #define __pyx_tuple__65 __pyx_mstate_global->__pyx_tuple__65
    5227             : #define __pyx_tuple__66 __pyx_mstate_global->__pyx_tuple__66
    5228             : #define __pyx_tuple__72 __pyx_mstate_global->__pyx_tuple__72
    5229             : #define __pyx_codeobj__36 __pyx_mstate_global->__pyx_codeobj__36
    5230             : #define __pyx_codeobj__39 __pyx_mstate_global->__pyx_codeobj__39
    5231             : #define __pyx_codeobj__41 __pyx_mstate_global->__pyx_codeobj__41
    5232             : #define __pyx_codeobj__43 __pyx_mstate_global->__pyx_codeobj__43
    5233             : #define __pyx_codeobj__45 __pyx_mstate_global->__pyx_codeobj__45
    5234             : #define __pyx_codeobj__46 __pyx_mstate_global->__pyx_codeobj__46
    5235             : #define __pyx_codeobj__48 __pyx_mstate_global->__pyx_codeobj__48
    5236             : #define __pyx_codeobj__50 __pyx_mstate_global->__pyx_codeobj__50
    5237             : #define __pyx_codeobj__52 __pyx_mstate_global->__pyx_codeobj__52
    5238             : #define __pyx_codeobj__55 __pyx_mstate_global->__pyx_codeobj__55
    5239             : #define __pyx_codeobj__56 __pyx_mstate_global->__pyx_codeobj__56
    5240             : #define __pyx_codeobj__57 __pyx_mstate_global->__pyx_codeobj__57
    5241             : #define __pyx_codeobj__58 __pyx_mstate_global->__pyx_codeobj__58
    5242             : #define __pyx_codeobj__60 __pyx_mstate_global->__pyx_codeobj__60
    5243             : #define __pyx_codeobj__64 __pyx_mstate_global->__pyx_codeobj__64
    5244             : #define __pyx_codeobj__67 __pyx_mstate_global->__pyx_codeobj__67
    5245             : #define __pyx_codeobj__68 __pyx_mstate_global->__pyx_codeobj__68
    5246             : #define __pyx_codeobj__69 __pyx_mstate_global->__pyx_codeobj__69
    5247             : #define __pyx_codeobj__70 __pyx_mstate_global->__pyx_codeobj__70
    5248             : #define __pyx_codeobj__71 __pyx_mstate_global->__pyx_codeobj__71
    5249             : #define __pyx_codeobj__73 __pyx_mstate_global->__pyx_codeobj__73
    5250             : /* #### Code section: module_code ### */
    5251             : 
    5252             : /* "View.MemoryView":131
    5253             :  *         cdef bint dtype_is_object
    5254             :  * 
    5255             :  *     def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None,             # <<<<<<<<<<<<<<
    5256             :  *                   mode="c", bint allocate_buffer=True):
    5257             :  * 
    5258             :  */
    5259             : 
    5260             : /* Python wrapper */
    5261             : static int __pyx_array___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    5262           0 : static int __pyx_array___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
    5263           0 :   PyObject *__pyx_v_shape = 0;
    5264           0 :   Py_ssize_t __pyx_v_itemsize;
    5265           0 :   PyObject *__pyx_v_format = 0;
    5266           0 :   PyObject *__pyx_v_mode = 0;
    5267           0 :   int __pyx_v_allocate_buffer;
    5268           0 :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
    5269           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    5270           0 :   PyObject* values[5] = {0,0,0,0,0};
    5271           0 :   int __pyx_lineno = 0;
    5272           0 :   const char *__pyx_filename = NULL;
    5273           0 :   int __pyx_clineno = 0;
    5274           0 :   int __pyx_r;
    5275             :   __Pyx_RefNannyDeclarations
    5276           0 :   __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
    5277             :   #if CYTHON_ASSUME_SAFE_MACROS
    5278           0 :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
    5279             :   #else
    5280             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
    5281             :   #endif
    5282           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
    5283             :   {
    5284           0 :     PyObject **__pyx_pyargnames[] = {&__pyx_n_s_shape,&__pyx_n_s_itemsize,&__pyx_n_s_format,&__pyx_n_s_mode,&__pyx_n_s_allocate_buffer,0};
    5285           0 :     values[3] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)__pyx_n_s_c));
    5286           0 :     if (__pyx_kwds) {
    5287           0 :       Py_ssize_t kw_args;
    5288           0 :       switch (__pyx_nargs) {
    5289           0 :         case  5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
    5290           0 :         CYTHON_FALLTHROUGH;
    5291           0 :         case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
    5292           0 :         CYTHON_FALLTHROUGH;
    5293           0 :         case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
    5294           0 :         CYTHON_FALLTHROUGH;
    5295           0 :         case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
    5296           0 :         CYTHON_FALLTHROUGH;
    5297           0 :         case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
    5298           0 :         CYTHON_FALLTHROUGH;
    5299           0 :         case  0: break;
    5300           0 :         default: goto __pyx_L5_argtuple_error;
    5301             :       }
    5302           0 :       kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
    5303           0 :       switch (__pyx_nargs) {
    5304           0 :         case  0:
    5305           0 :         if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_shape)) != 0)) {
    5306           0 :           (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
    5307           0 :           kw_args--;
    5308             :         }
    5309           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 131, __pyx_L3_error)
    5310           0 :         else goto __pyx_L5_argtuple_error;
    5311           0 :         CYTHON_FALLTHROUGH;
    5312             :         case  1:
    5313           0 :         if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_itemsize)) != 0)) {
    5314           0 :           (void)__Pyx_Arg_NewRef_VARARGS(values[1]);
    5315           0 :           kw_args--;
    5316             :         }
    5317           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 131, __pyx_L3_error)
    5318             :         else {
    5319           0 :           __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 1); __PYX_ERR(1, 131, __pyx_L3_error)
    5320             :         }
    5321           0 :         CYTHON_FALLTHROUGH;
    5322             :         case  2:
    5323           0 :         if (likely((values[2] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_format)) != 0)) {
    5324           0 :           (void)__Pyx_Arg_NewRef_VARARGS(values[2]);
    5325           0 :           kw_args--;
    5326             :         }
    5327           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 131, __pyx_L3_error)
    5328             :         else {
    5329           0 :           __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 2); __PYX_ERR(1, 131, __pyx_L3_error)
    5330             :         }
    5331           0 :         CYTHON_FALLTHROUGH;
    5332             :         case  3:
    5333           0 :         if (kw_args > 0) {
    5334           0 :           PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_mode);
    5335           0 :           if (value) { values[3] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
    5336           0 :           else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 131, __pyx_L3_error)
    5337             :         }
    5338           0 :         CYTHON_FALLTHROUGH;
    5339             :         case  4:
    5340           0 :         if (kw_args > 0) {
    5341           0 :           PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_allocate_buffer);
    5342           0 :           if (value) { values[4] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
    5343           0 :           else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 131, __pyx_L3_error)
    5344             :         }
    5345             :       }
    5346           0 :       if (unlikely(kw_args > 0)) {
    5347           0 :         const Py_ssize_t kwd_pos_args = __pyx_nargs;
    5348           0 :         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__cinit__") < 0)) __PYX_ERR(1, 131, __pyx_L3_error)
    5349             :       }
    5350             :     } else {
    5351           0 :       switch (__pyx_nargs) {
    5352           0 :         case  5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
    5353           0 :         CYTHON_FALLTHROUGH;
    5354           0 :         case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
    5355           0 :         CYTHON_FALLTHROUGH;
    5356           0 :         case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
    5357           0 :         values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
    5358           0 :         values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
    5359           0 :         break;
    5360           0 :         default: goto __pyx_L5_argtuple_error;
    5361             :       }
    5362             :     }
    5363           0 :     __pyx_v_shape = ((PyObject*)values[0]);
    5364           0 :     __pyx_v_itemsize = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_itemsize == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 131, __pyx_L3_error)
    5365           0 :     __pyx_v_format = values[2];
    5366           0 :     __pyx_v_mode = values[3];
    5367           0 :     if (values[4]) {
    5368           0 :       __pyx_v_allocate_buffer = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_allocate_buffer == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 132, __pyx_L3_error)
    5369             :     } else {
    5370             : 
    5371             :       /* "View.MemoryView":132
    5372             :  * 
    5373             :  *     def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None,
    5374             :  *                   mode="c", bint allocate_buffer=True):             # <<<<<<<<<<<<<<
    5375             :  * 
    5376             :  *         cdef int idx
    5377             :  */
    5378             :       __pyx_v_allocate_buffer = ((int)1);
    5379             :     }
    5380             :   }
    5381           0 :   goto __pyx_L6_skip;
    5382           0 :   __pyx_L5_argtuple_error:;
    5383           0 :   __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, __pyx_nargs); __PYX_ERR(1, 131, __pyx_L3_error)
    5384           0 :   __pyx_L6_skip:;
    5385           0 :   goto __pyx_L4_argument_unpacking_done;
    5386           0 :   __pyx_L3_error:;
    5387             :   {
    5388           0 :     Py_ssize_t __pyx_temp;
    5389           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    5390             :       __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
    5391             :     }
    5392             :   }
    5393           0 :   __Pyx_AddTraceback("View.MemoryView.array.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
    5394           0 :   __Pyx_RefNannyFinishContext();
    5395           0 :   return -1;
    5396           0 :   __pyx_L4_argument_unpacking_done:;
    5397           0 :   if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_shape), (&PyTuple_Type), 1, "shape", 1))) __PYX_ERR(1, 131, __pyx_L1_error)
    5398           0 :   if (unlikely(((PyObject *)__pyx_v_format) == Py_None)) {
    5399           0 :     PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "format"); __PYX_ERR(1, 131, __pyx_L1_error)
    5400             :   }
    5401           0 :   __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(((struct __pyx_array_obj *)__pyx_v_self), __pyx_v_shape, __pyx_v_itemsize, __pyx_v_format, __pyx_v_mode, __pyx_v_allocate_buffer);
    5402             : 
    5403             :   /* "View.MemoryView":131
    5404             :  *         cdef bint dtype_is_object
    5405             :  * 
    5406             :  *     def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None,             # <<<<<<<<<<<<<<
    5407             :  *                   mode="c", bint allocate_buffer=True):
    5408             :  * 
    5409             :  */
    5410             : 
    5411             :   /* function exit code */
    5412           0 :   goto __pyx_L0;
    5413             :   __pyx_L1_error:;
    5414             :   __pyx_r = -1;
    5415           0 :   __pyx_L0:;
    5416             :   {
    5417           0 :     Py_ssize_t __pyx_temp;
    5418           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    5419             :       __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
    5420             :     }
    5421             :   }
    5422             :   __Pyx_RefNannyFinishContext();
    5423             :   return __pyx_r;
    5424             : }
    5425             : 
    5426           0 : static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, PyObject *__pyx_v_format, PyObject *__pyx_v_mode, int __pyx_v_allocate_buffer) {
    5427           0 :   int __pyx_v_idx;
    5428           0 :   Py_ssize_t __pyx_v_dim;
    5429           0 :   char __pyx_v_order;
    5430           0 :   int __pyx_r;
    5431             :   __Pyx_RefNannyDeclarations
    5432           0 :   Py_ssize_t __pyx_t_1;
    5433           0 :   int __pyx_t_2;
    5434           0 :   int __pyx_t_3;
    5435           0 :   PyObject *__pyx_t_4 = NULL;
    5436           0 :   PyObject *__pyx_t_5 = NULL;
    5437           0 :   PyObject *__pyx_t_6 = NULL;
    5438           0 :   unsigned int __pyx_t_7;
    5439           0 :   char *__pyx_t_8;
    5440           0 :   int __pyx_t_9;
    5441           0 :   Py_ssize_t __pyx_t_10;
    5442           0 :   Py_UCS4 __pyx_t_11;
    5443           0 :   int __pyx_lineno = 0;
    5444           0 :   const char *__pyx_filename = NULL;
    5445           0 :   int __pyx_clineno = 0;
    5446           0 :   __Pyx_RefNannySetupContext("__cinit__", 0);
    5447           0 :   __Pyx_INCREF(__pyx_v_format);
    5448             : 
    5449             :   /* "View.MemoryView":137
    5450             :  *         cdef Py_ssize_t dim
    5451             :  * 
    5452             :  *         self.ndim = <int> len(shape)             # <<<<<<<<<<<<<<
    5453             :  *         self.itemsize = itemsize
    5454             :  * 
    5455             :  */
    5456           0 :   if (unlikely(__pyx_v_shape == Py_None)) {
    5457           0 :     PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    5458           0 :     __PYX_ERR(1, 137, __pyx_L1_error)
    5459             :   }
    5460           0 :   __pyx_t_1 = __Pyx_PyTuple_GET_SIZE(__pyx_v_shape); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(1, 137, __pyx_L1_error)
    5461           0 :   __pyx_v_self->ndim = ((int)__pyx_t_1);
    5462             : 
    5463             :   /* "View.MemoryView":138
    5464             :  * 
    5465             :  *         self.ndim = <int> len(shape)
    5466             :  *         self.itemsize = itemsize             # <<<<<<<<<<<<<<
    5467             :  * 
    5468             :  *         if not self.ndim:
    5469             :  */
    5470           0 :   __pyx_v_self->itemsize = __pyx_v_itemsize;
    5471             : 
    5472             :   /* "View.MemoryView":140
    5473             :  *         self.itemsize = itemsize
    5474             :  * 
    5475             :  *         if not self.ndim:             # <<<<<<<<<<<<<<
    5476             :  *             raise ValueError, "Empty shape tuple for cython.array"
    5477             :  * 
    5478             :  */
    5479           0 :   __pyx_t_2 = (!(__pyx_v_self->ndim != 0));
    5480           0 :   if (unlikely(__pyx_t_2)) {
    5481             : 
    5482             :     /* "View.MemoryView":141
    5483             :  * 
    5484             :  *         if not self.ndim:
    5485             :  *             raise ValueError, "Empty shape tuple for cython.array"             # <<<<<<<<<<<<<<
    5486             :  * 
    5487             :  *         if itemsize <= 0:
    5488             :  */
    5489           0 :     __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_Empty_shape_tuple_for_cython_arr, 0, 0);
    5490           0 :     __PYX_ERR(1, 141, __pyx_L1_error)
    5491             : 
    5492             :     /* "View.MemoryView":140
    5493             :  *         self.itemsize = itemsize
    5494             :  * 
    5495             :  *         if not self.ndim:             # <<<<<<<<<<<<<<
    5496             :  *             raise ValueError, "Empty shape tuple for cython.array"
    5497             :  * 
    5498             :  */
    5499             :   }
    5500             : 
    5501             :   /* "View.MemoryView":143
    5502             :  *             raise ValueError, "Empty shape tuple for cython.array"
    5503             :  * 
    5504             :  *         if itemsize <= 0:             # <<<<<<<<<<<<<<
    5505             :  *             raise ValueError, "itemsize <= 0 for cython.array"
    5506             :  * 
    5507             :  */
    5508           0 :   __pyx_t_2 = (__pyx_v_itemsize <= 0);
    5509           0 :   if (unlikely(__pyx_t_2)) {
    5510             : 
    5511             :     /* "View.MemoryView":144
    5512             :  * 
    5513             :  *         if itemsize <= 0:
    5514             :  *             raise ValueError, "itemsize <= 0 for cython.array"             # <<<<<<<<<<<<<<
    5515             :  * 
    5516             :  *         if not isinstance(format, bytes):
    5517             :  */
    5518           0 :     __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_itemsize_0_for_cython_array, 0, 0);
    5519           0 :     __PYX_ERR(1, 144, __pyx_L1_error)
    5520             : 
    5521             :     /* "View.MemoryView":143
    5522             :  *             raise ValueError, "Empty shape tuple for cython.array"
    5523             :  * 
    5524             :  *         if itemsize <= 0:             # <<<<<<<<<<<<<<
    5525             :  *             raise ValueError, "itemsize <= 0 for cython.array"
    5526             :  * 
    5527             :  */
    5528             :   }
    5529             : 
    5530             :   /* "View.MemoryView":146
    5531             :  *             raise ValueError, "itemsize <= 0 for cython.array"
    5532             :  * 
    5533             :  *         if not isinstance(format, bytes):             # <<<<<<<<<<<<<<
    5534             :  *             format = format.encode('ASCII')
    5535             :  *         self._format = format  # keep a reference to the byte string
    5536             :  */
    5537           0 :   __pyx_t_2 = PyBytes_Check(__pyx_v_format); 
    5538           0 :   __pyx_t_3 = (!__pyx_t_2);
    5539           0 :   if (__pyx_t_3) {
    5540             : 
    5541             :     /* "View.MemoryView":147
    5542             :  * 
    5543             :  *         if not isinstance(format, bytes):
    5544             :  *             format = format.encode('ASCII')             # <<<<<<<<<<<<<<
    5545             :  *         self._format = format  # keep a reference to the byte string
    5546             :  *         self.format = self._format
    5547             :  */
    5548           0 :     __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_encode); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 147, __pyx_L1_error)
    5549           0 :     __Pyx_GOTREF(__pyx_t_5);
    5550           0 :     __pyx_t_6 = NULL;
    5551           0 :     __pyx_t_7 = 0;
    5552             :     #if CYTHON_UNPACK_METHODS
    5553           0 :     if (likely(PyMethod_Check(__pyx_t_5))) {
    5554           0 :       __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    5555           0 :       if (likely(__pyx_t_6)) {
    5556           0 :         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
    5557           0 :         __Pyx_INCREF(__pyx_t_6);
    5558           0 :         __Pyx_INCREF(function);
    5559           0 :         __Pyx_DECREF_SET(__pyx_t_5, function);
    5560             :         __pyx_t_7 = 1;
    5561             :       }
    5562             :     }
    5563             :     #endif
    5564             :     {
    5565           0 :       PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_n_s_ASCII};
    5566           0 :       __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    5567           0 :       __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    5568           0 :       if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 147, __pyx_L1_error)
    5569           0 :       __Pyx_GOTREF(__pyx_t_4);
    5570           0 :       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    5571             :     }
    5572           0 :     __Pyx_DECREF_SET(__pyx_v_format, __pyx_t_4);
    5573             :     __pyx_t_4 = 0;
    5574             : 
    5575             :     /* "View.MemoryView":146
    5576             :  *             raise ValueError, "itemsize <= 0 for cython.array"
    5577             :  * 
    5578             :  *         if not isinstance(format, bytes):             # <<<<<<<<<<<<<<
    5579             :  *             format = format.encode('ASCII')
    5580             :  *         self._format = format  # keep a reference to the byte string
    5581             :  */
    5582             :   }
    5583             : 
    5584             :   /* "View.MemoryView":148
    5585             :  *         if not isinstance(format, bytes):
    5586             :  *             format = format.encode('ASCII')
    5587             :  *         self._format = format  # keep a reference to the byte string             # <<<<<<<<<<<<<<
    5588             :  *         self.format = self._format
    5589             :  * 
    5590             :  */
    5591           0 :   if (!(likely(PyBytes_CheckExact(__pyx_v_format))||((__pyx_v_format) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_v_format))) __PYX_ERR(1, 148, __pyx_L1_error)
    5592           0 :   __pyx_t_4 = __pyx_v_format;
    5593           0 :   __Pyx_INCREF(__pyx_t_4);
    5594           0 :   __Pyx_GIVEREF(__pyx_t_4);
    5595           0 :   __Pyx_GOTREF(__pyx_v_self->_format);
    5596           0 :   __Pyx_DECREF(__pyx_v_self->_format);
    5597           0 :   __pyx_v_self->_format = ((PyObject*)__pyx_t_4);
    5598           0 :   __pyx_t_4 = 0;
    5599             : 
    5600             :   /* "View.MemoryView":149
    5601             :  *             format = format.encode('ASCII')
    5602             :  *         self._format = format  # keep a reference to the byte string
    5603             :  *         self.format = self._format             # <<<<<<<<<<<<<<
    5604             :  * 
    5605             :  * 
    5606             :  */
    5607           0 :   if (unlikely(__pyx_v_self->_format == Py_None)) {
    5608           0 :     PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    5609           0 :     __PYX_ERR(1, 149, __pyx_L1_error)
    5610             :   }
    5611           0 :   __pyx_t_8 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->_format); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(1, 149, __pyx_L1_error)
    5612           0 :   __pyx_v_self->format = __pyx_t_8;
    5613             : 
    5614             :   /* "View.MemoryView":152
    5615             :  * 
    5616             :  * 
    5617             :  *         self._shape = <Py_ssize_t *> PyObject_Malloc(sizeof(Py_ssize_t)*self.ndim*2)             # <<<<<<<<<<<<<<
    5618             :  *         self._strides = self._shape + self.ndim
    5619             :  * 
    5620             :  */
    5621           0 :   __pyx_v_self->_shape = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * __pyx_v_self->ndim) * 2)));
    5622             : 
    5623             :   /* "View.MemoryView":153
    5624             :  * 
    5625             :  *         self._shape = <Py_ssize_t *> PyObject_Malloc(sizeof(Py_ssize_t)*self.ndim*2)
    5626             :  *         self._strides = self._shape + self.ndim             # <<<<<<<<<<<<<<
    5627             :  * 
    5628             :  *         if not self._shape:
    5629             :  */
    5630           0 :   __pyx_v_self->_strides = (__pyx_v_self->_shape + __pyx_v_self->ndim);
    5631             : 
    5632             :   /* "View.MemoryView":155
    5633             :  *         self._strides = self._shape + self.ndim
    5634             :  * 
    5635             :  *         if not self._shape:             # <<<<<<<<<<<<<<
    5636             :  *             raise MemoryError, "unable to allocate shape and strides."
    5637             :  * 
    5638             :  */
    5639           0 :   __pyx_t_3 = (!(__pyx_v_self->_shape != 0));
    5640           0 :   if (unlikely(__pyx_t_3)) {
    5641             : 
    5642             :     /* "View.MemoryView":156
    5643             :  * 
    5644             :  *         if not self._shape:
    5645             :  *             raise MemoryError, "unable to allocate shape and strides."             # <<<<<<<<<<<<<<
    5646             :  * 
    5647             :  * 
    5648             :  */
    5649           0 :     __Pyx_Raise(__pyx_builtin_MemoryError, __pyx_kp_s_unable_to_allocate_shape_and_str, 0, 0);
    5650           0 :     __PYX_ERR(1, 156, __pyx_L1_error)
    5651             : 
    5652             :     /* "View.MemoryView":155
    5653             :  *         self._strides = self._shape + self.ndim
    5654             :  * 
    5655             :  *         if not self._shape:             # <<<<<<<<<<<<<<
    5656             :  *             raise MemoryError, "unable to allocate shape and strides."
    5657             :  * 
    5658             :  */
    5659             :   }
    5660             : 
    5661             :   /* "View.MemoryView":159
    5662             :  * 
    5663             :  * 
    5664             :  *         for idx, dim in enumerate(shape):             # <<<<<<<<<<<<<<
    5665             :  *             if dim <= 0:
    5666             :  *                 raise ValueError, f"Invalid shape in axis {idx}: {dim}."
    5667             :  */
    5668           0 :   __pyx_t_9 = 0;
    5669           0 :   __pyx_t_4 = __pyx_v_shape; __Pyx_INCREF(__pyx_t_4);
    5670             :   __pyx_t_1 = 0;
    5671           0 :   for (;;) {
    5672           0 :     {
    5673           0 :       Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4);
    5674             :       #if !CYTHON_ASSUME_SAFE_MACROS
    5675             :       if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 159, __pyx_L1_error)
    5676             :       #endif
    5677           0 :       if (__pyx_t_1 >= __pyx_temp) break;
    5678             :     }
    5679             :     #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    5680           0 :     __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_1); __Pyx_INCREF(__pyx_t_5); __pyx_t_1++; if (unlikely((0 < 0))) __PYX_ERR(1, 159, __pyx_L1_error)
    5681             :     #else
    5682             :     __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 159, __pyx_L1_error)
    5683             :     __Pyx_GOTREF(__pyx_t_5);
    5684             :     #endif
    5685           0 :     __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 159, __pyx_L1_error)
    5686           0 :     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    5687           0 :     __pyx_v_dim = __pyx_t_10;
    5688           0 :     __pyx_v_idx = __pyx_t_9;
    5689           0 :     __pyx_t_9 = (__pyx_t_9 + 1);
    5690             : 
    5691             :     /* "View.MemoryView":160
    5692             :  * 
    5693             :  *         for idx, dim in enumerate(shape):
    5694             :  *             if dim <= 0:             # <<<<<<<<<<<<<<
    5695             :  *                 raise ValueError, f"Invalid shape in axis {idx}: {dim}."
    5696             :  *             self._shape[idx] = dim
    5697             :  */
    5698           0 :     __pyx_t_3 = (__pyx_v_dim <= 0);
    5699           0 :     if (unlikely(__pyx_t_3)) {
    5700             : 
    5701             :       /* "View.MemoryView":161
    5702             :  *         for idx, dim in enumerate(shape):
    5703             :  *             if dim <= 0:
    5704             :  *                 raise ValueError, f"Invalid shape in axis {idx}: {dim}."             # <<<<<<<<<<<<<<
    5705             :  *             self._shape[idx] = dim
    5706             :  * 
    5707             :  */
    5708           0 :       __pyx_t_5 = PyTuple_New(5); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 161, __pyx_L1_error)
    5709           0 :       __Pyx_GOTREF(__pyx_t_5);
    5710           0 :       __pyx_t_10 = 0;
    5711           0 :       __pyx_t_11 = 127;
    5712           0 :       __Pyx_INCREF(__pyx_kp_u_Invalid_shape_in_axis);
    5713           0 :       __pyx_t_10 += 22;
    5714           0 :       __Pyx_GIVEREF(__pyx_kp_u_Invalid_shape_in_axis);
    5715           0 :       PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_Invalid_shape_in_axis);
    5716           0 :       __pyx_t_6 = __Pyx_PyUnicode_From_int(__pyx_v_idx, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 161, __pyx_L1_error)
    5717           0 :       __Pyx_GOTREF(__pyx_t_6);
    5718           0 :       __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
    5719           0 :       __Pyx_GIVEREF(__pyx_t_6);
    5720           0 :       PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_6);
    5721           0 :       __pyx_t_6 = 0;
    5722           0 :       __Pyx_INCREF(__pyx_kp_u_);
    5723           0 :       __pyx_t_10 += 2;
    5724           0 :       __Pyx_GIVEREF(__pyx_kp_u_);
    5725           0 :       PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u_);
    5726           0 :       __pyx_t_6 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_dim, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 161, __pyx_L1_error)
    5727           0 :       __Pyx_GOTREF(__pyx_t_6);
    5728           0 :       __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
    5729           0 :       __Pyx_GIVEREF(__pyx_t_6);
    5730           0 :       PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_6);
    5731           0 :       __pyx_t_6 = 0;
    5732           0 :       __Pyx_INCREF(__pyx_kp_u__2);
    5733           0 :       __pyx_t_10 += 1;
    5734           0 :       __Pyx_GIVEREF(__pyx_kp_u__2);
    5735           0 :       PyTuple_SET_ITEM(__pyx_t_5, 4, __pyx_kp_u__2);
    5736           0 :       __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_5, 5, __pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 161, __pyx_L1_error)
    5737           0 :       __Pyx_GOTREF(__pyx_t_6);
    5738           0 :       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    5739           0 :       __Pyx_Raise(__pyx_builtin_ValueError, __pyx_t_6, 0, 0);
    5740           0 :       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    5741           0 :       __PYX_ERR(1, 161, __pyx_L1_error)
    5742             : 
    5743             :       /* "View.MemoryView":160
    5744             :  * 
    5745             :  *         for idx, dim in enumerate(shape):
    5746             :  *             if dim <= 0:             # <<<<<<<<<<<<<<
    5747             :  *                 raise ValueError, f"Invalid shape in axis {idx}: {dim}."
    5748             :  *             self._shape[idx] = dim
    5749             :  */
    5750             :     }
    5751             : 
    5752             :     /* "View.MemoryView":162
    5753             :  *             if dim <= 0:
    5754             :  *                 raise ValueError, f"Invalid shape in axis {idx}: {dim}."
    5755             :  *             self._shape[idx] = dim             # <<<<<<<<<<<<<<
    5756             :  * 
    5757             :  *         cdef char order
    5758             :  */
    5759           0 :     (__pyx_v_self->_shape[__pyx_v_idx]) = __pyx_v_dim;
    5760             : 
    5761             :     /* "View.MemoryView":159
    5762             :  * 
    5763             :  * 
    5764             :  *         for idx, dim in enumerate(shape):             # <<<<<<<<<<<<<<
    5765             :  *             if dim <= 0:
    5766             :  *                 raise ValueError, f"Invalid shape in axis {idx}: {dim}."
    5767             :  */
    5768             :   }
    5769           0 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    5770             : 
    5771             :   /* "View.MemoryView":165
    5772             :  * 
    5773             :  *         cdef char order
    5774             :  *         if mode == 'c':             # <<<<<<<<<<<<<<
    5775             :  *             order = b'C'
    5776             :  *             self.mode = u'c'
    5777             :  */
    5778           0 :   __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_c, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 165, __pyx_L1_error)
    5779           0 :   if (__pyx_t_3) {
    5780             : 
    5781             :     /* "View.MemoryView":166
    5782             :  *         cdef char order
    5783             :  *         if mode == 'c':
    5784             :  *             order = b'C'             # <<<<<<<<<<<<<<
    5785             :  *             self.mode = u'c'
    5786             :  *         elif mode == 'fortran':
    5787             :  */
    5788           0 :     __pyx_v_order = 'C';
    5789             : 
    5790             :     /* "View.MemoryView":167
    5791             :  *         if mode == 'c':
    5792             :  *             order = b'C'
    5793             :  *             self.mode = u'c'             # <<<<<<<<<<<<<<
    5794             :  *         elif mode == 'fortran':
    5795             :  *             order = b'F'
    5796             :  */
    5797           0 :     __Pyx_INCREF(__pyx_n_u_c);
    5798           0 :     __Pyx_GIVEREF(__pyx_n_u_c);
    5799           0 :     __Pyx_GOTREF(__pyx_v_self->mode);
    5800           0 :     __Pyx_DECREF(__pyx_v_self->mode);
    5801           0 :     __pyx_v_self->mode = __pyx_n_u_c;
    5802             : 
    5803             :     /* "View.MemoryView":165
    5804             :  * 
    5805             :  *         cdef char order
    5806             :  *         if mode == 'c':             # <<<<<<<<<<<<<<
    5807             :  *             order = b'C'
    5808             :  *             self.mode = u'c'
    5809             :  */
    5810           0 :     goto __pyx_L11;
    5811             :   }
    5812             : 
    5813             :   /* "View.MemoryView":168
    5814             :  *             order = b'C'
    5815             :  *             self.mode = u'c'
    5816             :  *         elif mode == 'fortran':             # <<<<<<<<<<<<<<
    5817             :  *             order = b'F'
    5818             :  *             self.mode = u'fortran'
    5819             :  */
    5820           0 :   __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_fortran, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 168, __pyx_L1_error)
    5821           0 :   if (likely(__pyx_t_3)) {
    5822             : 
    5823             :     /* "View.MemoryView":169
    5824             :  *             self.mode = u'c'
    5825             :  *         elif mode == 'fortran':
    5826             :  *             order = b'F'             # <<<<<<<<<<<<<<
    5827             :  *             self.mode = u'fortran'
    5828             :  *         else:
    5829             :  */
    5830           0 :     __pyx_v_order = 'F';
    5831             : 
    5832             :     /* "View.MemoryView":170
    5833             :  *         elif mode == 'fortran':
    5834             :  *             order = b'F'
    5835             :  *             self.mode = u'fortran'             # <<<<<<<<<<<<<<
    5836             :  *         else:
    5837             :  *             raise ValueError, f"Invalid mode, expected 'c' or 'fortran', got {mode}"
    5838             :  */
    5839           0 :     __Pyx_INCREF(__pyx_n_u_fortran);
    5840           0 :     __Pyx_GIVEREF(__pyx_n_u_fortran);
    5841           0 :     __Pyx_GOTREF(__pyx_v_self->mode);
    5842           0 :     __Pyx_DECREF(__pyx_v_self->mode);
    5843           0 :     __pyx_v_self->mode = __pyx_n_u_fortran;
    5844             : 
    5845             :     /* "View.MemoryView":168
    5846             :  *             order = b'C'
    5847             :  *             self.mode = u'c'
    5848             :  *         elif mode == 'fortran':             # <<<<<<<<<<<<<<
    5849             :  *             order = b'F'
    5850             :  *             self.mode = u'fortran'
    5851             :  */
    5852           0 :     goto __pyx_L11;
    5853             :   }
    5854             : 
    5855             :   /* "View.MemoryView":172
    5856             :  *             self.mode = u'fortran'
    5857             :  *         else:
    5858             :  *             raise ValueError, f"Invalid mode, expected 'c' or 'fortran', got {mode}"             # <<<<<<<<<<<<<<
    5859             :  * 
    5860             :  *         self.len = fill_contig_strides_array(self._shape, self._strides, itemsize, self.ndim, order)
    5861             :  */
    5862             :   /*else*/ {
    5863           0 :     __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_v_mode, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 172, __pyx_L1_error)
    5864           0 :     __Pyx_GOTREF(__pyx_t_4);
    5865           0 :     __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Invalid_mode_expected_c_or_fortr, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 172, __pyx_L1_error)
    5866           0 :     __Pyx_GOTREF(__pyx_t_6);
    5867           0 :     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    5868           0 :     __Pyx_Raise(__pyx_builtin_ValueError, __pyx_t_6, 0, 0);
    5869           0 :     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    5870           0 :     __PYX_ERR(1, 172, __pyx_L1_error)
    5871             :   }
    5872           0 :   __pyx_L11:;
    5873             : 
    5874             :   /* "View.MemoryView":174
    5875             :  *             raise ValueError, f"Invalid mode, expected 'c' or 'fortran', got {mode}"
    5876             :  * 
    5877             :  *         self.len = fill_contig_strides_array(self._shape, self._strides, itemsize, self.ndim, order)             # <<<<<<<<<<<<<<
    5878             :  * 
    5879             :  *         self.free_data = allocate_buffer
    5880             :  */
    5881           0 :   __pyx_v_self->len = __pyx_fill_contig_strides_array(__pyx_v_self->_shape, __pyx_v_self->_strides, __pyx_v_itemsize, __pyx_v_self->ndim, __pyx_v_order);
    5882             : 
    5883             :   /* "View.MemoryView":176
    5884             :  *         self.len = fill_contig_strides_array(self._shape, self._strides, itemsize, self.ndim, order)
    5885             :  * 
    5886             :  *         self.free_data = allocate_buffer             # <<<<<<<<<<<<<<
    5887             :  *         self.dtype_is_object = format == b'O'
    5888             :  * 
    5889             :  */
    5890           0 :   __pyx_v_self->free_data = __pyx_v_allocate_buffer;
    5891             : 
    5892             :   /* "View.MemoryView":177
    5893             :  * 
    5894             :  *         self.free_data = allocate_buffer
    5895             :  *         self.dtype_is_object = format == b'O'             # <<<<<<<<<<<<<<
    5896             :  * 
    5897             :  *         if allocate_buffer:
    5898             :  */
    5899           0 :   __pyx_t_6 = PyObject_RichCompare(__pyx_v_format, __pyx_n_b_O, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 177, __pyx_L1_error)
    5900           0 :   __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 177, __pyx_L1_error)
    5901           0 :   __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    5902           0 :   __pyx_v_self->dtype_is_object = __pyx_t_3;
    5903             : 
    5904             :   /* "View.MemoryView":179
    5905             :  *         self.dtype_is_object = format == b'O'
    5906             :  * 
    5907             :  *         if allocate_buffer:             # <<<<<<<<<<<<<<
    5908             :  *             _allocate_buffer(self)
    5909             :  * 
    5910             :  */
    5911           0 :   if (__pyx_v_allocate_buffer) {
    5912             : 
    5913             :     /* "View.MemoryView":180
    5914             :  * 
    5915             :  *         if allocate_buffer:
    5916             :  *             _allocate_buffer(self)             # <<<<<<<<<<<<<<
    5917             :  * 
    5918             :  *     @cname('getbuffer')
    5919             :  */
    5920           0 :     __pyx_t_9 = __pyx_array_allocate_buffer(__pyx_v_self); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 180, __pyx_L1_error)
    5921             : 
    5922             :     /* "View.MemoryView":179
    5923             :  *         self.dtype_is_object = format == b'O'
    5924             :  * 
    5925             :  *         if allocate_buffer:             # <<<<<<<<<<<<<<
    5926             :  *             _allocate_buffer(self)
    5927             :  * 
    5928             :  */
    5929             :   }
    5930             : 
    5931             :   /* "View.MemoryView":131
    5932             :  *         cdef bint dtype_is_object
    5933             :  * 
    5934             :  *     def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None,             # <<<<<<<<<<<<<<
    5935             :  *                   mode="c", bint allocate_buffer=True):
    5936             :  * 
    5937             :  */
    5938             : 
    5939             :   /* function exit code */
    5940           0 :   __pyx_r = 0;
    5941           0 :   goto __pyx_L0;
    5942           0 :   __pyx_L1_error:;
    5943           0 :   __Pyx_XDECREF(__pyx_t_4);
    5944           0 :   __Pyx_XDECREF(__pyx_t_5);
    5945           0 :   __Pyx_XDECREF(__pyx_t_6);
    5946           0 :   __Pyx_AddTraceback("View.MemoryView.array.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
    5947           0 :   __pyx_r = -1;
    5948           0 :   __pyx_L0:;
    5949           0 :   __Pyx_XDECREF(__pyx_v_format);
    5950           0 :   __Pyx_RefNannyFinishContext();
    5951           0 :   return __pyx_r;
    5952             : }
    5953             : 
    5954             : /* "View.MemoryView":182
    5955             :  *             _allocate_buffer(self)
    5956             :  * 
    5957             :  *     @cname('getbuffer')             # <<<<<<<<<<<<<<
    5958             :  *     def __getbuffer__(self, Py_buffer *info, int flags):
    5959             :  *         cdef int bufmode = -1
    5960             :  */
    5961             : 
    5962             : /* Python wrapper */
    5963             : CYTHON_UNUSED static int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
    5964           0 : CYTHON_UNUSED static int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
    5965           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    5966           0 :   int __pyx_r;
    5967             :   __Pyx_RefNannyDeclarations
    5968           0 :   __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
    5969           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
    5970           0 :   __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(((struct __pyx_array_obj *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));
    5971             : 
    5972             :   /* function exit code */
    5973           0 :   __Pyx_RefNannyFinishContext();
    5974           0 :   return __pyx_r;
    5975             : }
    5976             : 
    5977           0 : static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(struct __pyx_array_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
    5978           0 :   int __pyx_v_bufmode;
    5979           0 :   int __pyx_r;
    5980             :   __Pyx_RefNannyDeclarations
    5981           0 :   int __pyx_t_1;
    5982           0 :   char *__pyx_t_2;
    5983           0 :   Py_ssize_t __pyx_t_3;
    5984           0 :   int __pyx_t_4;
    5985           0 :   Py_ssize_t *__pyx_t_5;
    5986           0 :   int __pyx_lineno = 0;
    5987           0 :   const char *__pyx_filename = NULL;
    5988           0 :   int __pyx_clineno = 0;
    5989           0 :   if (unlikely(__pyx_v_info == NULL)) {
    5990           0 :     PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
    5991           0 :     return -1;
    5992             :   }
    5993           0 :   __Pyx_RefNannySetupContext("__getbuffer__", 0);
    5994           0 :   __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
    5995           0 :   __Pyx_GIVEREF(__pyx_v_info->obj);
    5996             : 
    5997             :   /* "View.MemoryView":184
    5998             :  *     @cname('getbuffer')
    5999             :  *     def __getbuffer__(self, Py_buffer *info, int flags):
    6000             :  *         cdef int bufmode = -1             # <<<<<<<<<<<<<<
    6001             :  *         if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS):
    6002             :  *             if self.mode == u"c":
    6003             :  */
    6004           0 :   __pyx_v_bufmode = -1;
    6005             : 
    6006             :   /* "View.MemoryView":185
    6007             :  *     def __getbuffer__(self, Py_buffer *info, int flags):
    6008             :  *         cdef int bufmode = -1
    6009             :  *         if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS):             # <<<<<<<<<<<<<<
    6010             :  *             if self.mode == u"c":
    6011             :  *                 bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
    6012             :  */
    6013           0 :   __pyx_t_1 = ((__pyx_v_flags & ((PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS) | PyBUF_ANY_CONTIGUOUS)) != 0);
    6014           0 :   if (__pyx_t_1) {
    6015             : 
    6016             :     /* "View.MemoryView":186
    6017             :  *         cdef int bufmode = -1
    6018             :  *         if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS):
    6019             :  *             if self.mode == u"c":             # <<<<<<<<<<<<<<
    6020             :  *                 bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
    6021             :  *             elif self.mode == u"fortran":
    6022             :  */
    6023           0 :     __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_self->mode, __pyx_n_u_c, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 186, __pyx_L1_error)
    6024           0 :     if (__pyx_t_1) {
    6025             : 
    6026             :       /* "View.MemoryView":187
    6027             :  *         if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS):
    6028             :  *             if self.mode == u"c":
    6029             :  *                 bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS             # <<<<<<<<<<<<<<
    6030             :  *             elif self.mode == u"fortran":
    6031             :  *                 bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
    6032             :  */
    6033           0 :       __pyx_v_bufmode = (PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS);
    6034             : 
    6035             :       /* "View.MemoryView":186
    6036             :  *         cdef int bufmode = -1
    6037             :  *         if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS):
    6038             :  *             if self.mode == u"c":             # <<<<<<<<<<<<<<
    6039             :  *                 bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
    6040             :  *             elif self.mode == u"fortran":
    6041             :  */
    6042           0 :       goto __pyx_L4;
    6043             :     }
    6044             : 
    6045             :     /* "View.MemoryView":188
    6046             :  *             if self.mode == u"c":
    6047             :  *                 bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
    6048             :  *             elif self.mode == u"fortran":             # <<<<<<<<<<<<<<
    6049             :  *                 bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
    6050             :  *             if not (flags & bufmode):
    6051             :  */
    6052           0 :     __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_self->mode, __pyx_n_u_fortran, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 188, __pyx_L1_error)
    6053           0 :     if (__pyx_t_1) {
    6054             : 
    6055             :       /* "View.MemoryView":189
    6056             :  *                 bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
    6057             :  *             elif self.mode == u"fortran":
    6058             :  *                 bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS             # <<<<<<<<<<<<<<
    6059             :  *             if not (flags & bufmode):
    6060             :  *                 raise ValueError, "Can only create a buffer that is contiguous in memory."
    6061             :  */
    6062           0 :       __pyx_v_bufmode = (PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS);
    6063             : 
    6064             :       /* "View.MemoryView":188
    6065             :  *             if self.mode == u"c":
    6066             :  *                 bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
    6067             :  *             elif self.mode == u"fortran":             # <<<<<<<<<<<<<<
    6068             :  *                 bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
    6069             :  *             if not (flags & bufmode):
    6070             :  */
    6071             :     }
    6072           0 :     __pyx_L4:;
    6073             : 
    6074             :     /* "View.MemoryView":190
    6075             :  *             elif self.mode == u"fortran":
    6076             :  *                 bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
    6077             :  *             if not (flags & bufmode):             # <<<<<<<<<<<<<<
    6078             :  *                 raise ValueError, "Can only create a buffer that is contiguous in memory."
    6079             :  *         info.buf = self.data
    6080             :  */
    6081           0 :     __pyx_t_1 = (!((__pyx_v_flags & __pyx_v_bufmode) != 0));
    6082           0 :     if (unlikely(__pyx_t_1)) {
    6083             : 
    6084             :       /* "View.MemoryView":191
    6085             :  *                 bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
    6086             :  *             if not (flags & bufmode):
    6087             :  *                 raise ValueError, "Can only create a buffer that is contiguous in memory."             # <<<<<<<<<<<<<<
    6088             :  *         info.buf = self.data
    6089             :  *         info.len = self.len
    6090             :  */
    6091           0 :       __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_Can_only_create_a_buffer_that_is, 0, 0);
    6092           0 :       __PYX_ERR(1, 191, __pyx_L1_error)
    6093             : 
    6094             :       /* "View.MemoryView":190
    6095             :  *             elif self.mode == u"fortran":
    6096             :  *                 bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
    6097             :  *             if not (flags & bufmode):             # <<<<<<<<<<<<<<
    6098             :  *                 raise ValueError, "Can only create a buffer that is contiguous in memory."
    6099             :  *         info.buf = self.data
    6100             :  */
    6101             :     }
    6102             : 
    6103             :     /* "View.MemoryView":185
    6104             :  *     def __getbuffer__(self, Py_buffer *info, int flags):
    6105             :  *         cdef int bufmode = -1
    6106             :  *         if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS):             # <<<<<<<<<<<<<<
    6107             :  *             if self.mode == u"c":
    6108             :  *                 bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
    6109             :  */
    6110             :   }
    6111             : 
    6112             :   /* "View.MemoryView":192
    6113             :  *             if not (flags & bufmode):
    6114             :  *                 raise ValueError, "Can only create a buffer that is contiguous in memory."
    6115             :  *         info.buf = self.data             # <<<<<<<<<<<<<<
    6116             :  *         info.len = self.len
    6117             :  * 
    6118             :  */
    6119           0 :   __pyx_t_2 = __pyx_v_self->data;
    6120           0 :   __pyx_v_info->buf = __pyx_t_2;
    6121             : 
    6122             :   /* "View.MemoryView":193
    6123             :  *                 raise ValueError, "Can only create a buffer that is contiguous in memory."
    6124             :  *         info.buf = self.data
    6125             :  *         info.len = self.len             # <<<<<<<<<<<<<<
    6126             :  * 
    6127             :  *         if flags & PyBUF_STRIDES:
    6128             :  */
    6129           0 :   __pyx_t_3 = __pyx_v_self->len;
    6130           0 :   __pyx_v_info->len = __pyx_t_3;
    6131             : 
    6132             :   /* "View.MemoryView":195
    6133             :  *         info.len = self.len
    6134             :  * 
    6135             :  *         if flags & PyBUF_STRIDES:             # <<<<<<<<<<<<<<
    6136             :  *             info.ndim = self.ndim
    6137             :  *             info.shape = self._shape
    6138             :  */
    6139           0 :   __pyx_t_1 = ((__pyx_v_flags & PyBUF_STRIDES) != 0);
    6140           0 :   if (__pyx_t_1) {
    6141             : 
    6142             :     /* "View.MemoryView":196
    6143             :  * 
    6144             :  *         if flags & PyBUF_STRIDES:
    6145             :  *             info.ndim = self.ndim             # <<<<<<<<<<<<<<
    6146             :  *             info.shape = self._shape
    6147             :  *             info.strides = self._strides
    6148             :  */
    6149           0 :     __pyx_t_4 = __pyx_v_self->ndim;
    6150           0 :     __pyx_v_info->ndim = __pyx_t_4;
    6151             : 
    6152             :     /* "View.MemoryView":197
    6153             :  *         if flags & PyBUF_STRIDES:
    6154             :  *             info.ndim = self.ndim
    6155             :  *             info.shape = self._shape             # <<<<<<<<<<<<<<
    6156             :  *             info.strides = self._strides
    6157             :  *         else:
    6158             :  */
    6159           0 :     __pyx_t_5 = __pyx_v_self->_shape;
    6160           0 :     __pyx_v_info->shape = __pyx_t_5;
    6161             : 
    6162             :     /* "View.MemoryView":198
    6163             :  *             info.ndim = self.ndim
    6164             :  *             info.shape = self._shape
    6165             :  *             info.strides = self._strides             # <<<<<<<<<<<<<<
    6166             :  *         else:
    6167             :  *             info.ndim = 1
    6168             :  */
    6169           0 :     __pyx_t_5 = __pyx_v_self->_strides;
    6170           0 :     __pyx_v_info->strides = __pyx_t_5;
    6171             : 
    6172             :     /* "View.MemoryView":195
    6173             :  *         info.len = self.len
    6174             :  * 
    6175             :  *         if flags & PyBUF_STRIDES:             # <<<<<<<<<<<<<<
    6176             :  *             info.ndim = self.ndim
    6177             :  *             info.shape = self._shape
    6178             :  */
    6179           0 :     goto __pyx_L6;
    6180             :   }
    6181             : 
    6182             :   /* "View.MemoryView":200
    6183             :  *             info.strides = self._strides
    6184             :  *         else:
    6185             :  *             info.ndim = 1             # <<<<<<<<<<<<<<
    6186             :  *             info.shape = &self.len if flags & PyBUF_ND else NULL
    6187             :  *             info.strides = NULL
    6188             :  */
    6189             :   /*else*/ {
    6190           0 :     __pyx_v_info->ndim = 1;
    6191             : 
    6192             :     /* "View.MemoryView":201
    6193             :  *         else:
    6194             :  *             info.ndim = 1
    6195             :  *             info.shape = &self.len if flags & PyBUF_ND else NULL             # <<<<<<<<<<<<<<
    6196             :  *             info.strides = NULL
    6197             :  * 
    6198             :  */
    6199           0 :     __pyx_t_1 = ((__pyx_v_flags & PyBUF_ND) != 0);
    6200           0 :     if (__pyx_t_1) {
    6201             :       __pyx_t_5 = (&__pyx_v_self->len);
    6202             :     } else {
    6203             :       __pyx_t_5 = NULL;
    6204             :     }
    6205           0 :     __pyx_v_info->shape = __pyx_t_5;
    6206             : 
    6207             :     /* "View.MemoryView":202
    6208             :  *             info.ndim = 1
    6209             :  *             info.shape = &self.len if flags & PyBUF_ND else NULL
    6210             :  *             info.strides = NULL             # <<<<<<<<<<<<<<
    6211             :  * 
    6212             :  *         info.suboffsets = NULL
    6213             :  */
    6214           0 :     __pyx_v_info->strides = NULL;
    6215             :   }
    6216           0 :   __pyx_L6:;
    6217             : 
    6218             :   /* "View.MemoryView":204
    6219             :  *             info.strides = NULL
    6220             :  * 
    6221             :  *         info.suboffsets = NULL             # <<<<<<<<<<<<<<
    6222             :  *         info.itemsize = self.itemsize
    6223             :  *         info.readonly = 0
    6224             :  */
    6225           0 :   __pyx_v_info->suboffsets = NULL;
    6226             : 
    6227             :   /* "View.MemoryView":205
    6228             :  * 
    6229             :  *         info.suboffsets = NULL
    6230             :  *         info.itemsize = self.itemsize             # <<<<<<<<<<<<<<
    6231             :  *         info.readonly = 0
    6232             :  *         info.format = self.format if flags & PyBUF_FORMAT else NULL
    6233             :  */
    6234           0 :   __pyx_t_3 = __pyx_v_self->itemsize;
    6235           0 :   __pyx_v_info->itemsize = __pyx_t_3;
    6236             : 
    6237             :   /* "View.MemoryView":206
    6238             :  *         info.suboffsets = NULL
    6239             :  *         info.itemsize = self.itemsize
    6240             :  *         info.readonly = 0             # <<<<<<<<<<<<<<
    6241             :  *         info.format = self.format if flags & PyBUF_FORMAT else NULL
    6242             :  *         info.obj = self
    6243             :  */
    6244           0 :   __pyx_v_info->readonly = 0;
    6245             : 
    6246             :   /* "View.MemoryView":207
    6247             :  *         info.itemsize = self.itemsize
    6248             :  *         info.readonly = 0
    6249             :  *         info.format = self.format if flags & PyBUF_FORMAT else NULL             # <<<<<<<<<<<<<<
    6250             :  *         info.obj = self
    6251             :  * 
    6252             :  */
    6253           0 :   __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
    6254           0 :   if (__pyx_t_1) {
    6255           0 :     __pyx_t_2 = __pyx_v_self->format;
    6256             :   } else {
    6257             :     __pyx_t_2 = NULL;
    6258             :   }
    6259           0 :   __pyx_v_info->format = __pyx_t_2;
    6260             : 
    6261             :   /* "View.MemoryView":208
    6262             :  *         info.readonly = 0
    6263             :  *         info.format = self.format if flags & PyBUF_FORMAT else NULL
    6264             :  *         info.obj = self             # <<<<<<<<<<<<<<
    6265             :  * 
    6266             :  *     def __dealloc__(array self):
    6267             :  */
    6268           0 :   __Pyx_INCREF((PyObject *)__pyx_v_self);
    6269           0 :   __Pyx_GIVEREF((PyObject *)__pyx_v_self);
    6270           0 :   __Pyx_GOTREF(__pyx_v_info->obj);
    6271           0 :   __Pyx_DECREF(__pyx_v_info->obj);
    6272           0 :   __pyx_v_info->obj = ((PyObject *)__pyx_v_self);
    6273             : 
    6274             :   /* "View.MemoryView":182
    6275             :  *             _allocate_buffer(self)
    6276             :  * 
    6277             :  *     @cname('getbuffer')             # <<<<<<<<<<<<<<
    6278             :  *     def __getbuffer__(self, Py_buffer *info, int flags):
    6279             :  *         cdef int bufmode = -1
    6280             :  */
    6281             : 
    6282             :   /* function exit code */
    6283           0 :   __pyx_r = 0;
    6284           0 :   goto __pyx_L0;
    6285           0 :   __pyx_L1_error:;
    6286           0 :   __Pyx_AddTraceback("View.MemoryView.array.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
    6287           0 :   __pyx_r = -1;
    6288           0 :   if (__pyx_v_info->obj != NULL) {
    6289           0 :     __Pyx_GOTREF(__pyx_v_info->obj);
    6290           0 :     __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
    6291             :   }
    6292           0 :   goto __pyx_L2;
    6293           0 :   __pyx_L0:;
    6294           0 :   if (__pyx_v_info->obj == Py_None) {
    6295           0 :     __Pyx_GOTREF(__pyx_v_info->obj);
    6296           0 :     __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
    6297             :   }
    6298           0 :   __pyx_L2:;
    6299             :   __Pyx_RefNannyFinishContext();
    6300             :   return __pyx_r;
    6301             : }
    6302             : 
    6303             : /* "View.MemoryView":210
    6304             :  *         info.obj = self
    6305             :  * 
    6306             :  *     def __dealloc__(array self):             # <<<<<<<<<<<<<<
    6307             :  *         if self.callback_free_data != NULL:
    6308             :  *             self.callback_free_data(self.data)
    6309             :  */
    6310             : 
    6311             : /* Python wrapper */
    6312             : static void __pyx_array___dealloc__(PyObject *__pyx_v_self); /*proto*/
    6313           0 : static void __pyx_array___dealloc__(PyObject *__pyx_v_self) {
    6314           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    6315             :   __Pyx_RefNannyDeclarations
    6316           0 :   __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
    6317           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
    6318           0 :   __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(((struct __pyx_array_obj *)__pyx_v_self));
    6319             : 
    6320             :   /* function exit code */
    6321           0 :   __Pyx_RefNannyFinishContext();
    6322             : }
    6323             : 
    6324           0 : static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struct __pyx_array_obj *__pyx_v_self) {
    6325           0 :   int __pyx_t_1;
    6326           0 :   int __pyx_t_2;
    6327             : 
    6328             :   /* "View.MemoryView":211
    6329             :  * 
    6330             :  *     def __dealloc__(array self):
    6331             :  *         if self.callback_free_data != NULL:             # <<<<<<<<<<<<<<
    6332             :  *             self.callback_free_data(self.data)
    6333             :  *         elif self.free_data and self.data is not NULL:
    6334             :  */
    6335           0 :   __pyx_t_1 = (__pyx_v_self->callback_free_data != NULL);
    6336           0 :   if (__pyx_t_1) {
    6337             : 
    6338             :     /* "View.MemoryView":212
    6339             :  *     def __dealloc__(array self):
    6340             :  *         if self.callback_free_data != NULL:
    6341             :  *             self.callback_free_data(self.data)             # <<<<<<<<<<<<<<
    6342             :  *         elif self.free_data and self.data is not NULL:
    6343             :  *             if self.dtype_is_object:
    6344             :  */
    6345           0 :     __pyx_v_self->callback_free_data(__pyx_v_self->data);
    6346             : 
    6347             :     /* "View.MemoryView":211
    6348             :  * 
    6349             :  *     def __dealloc__(array self):
    6350             :  *         if self.callback_free_data != NULL:             # <<<<<<<<<<<<<<
    6351             :  *             self.callback_free_data(self.data)
    6352             :  *         elif self.free_data and self.data is not NULL:
    6353             :  */
    6354           0 :     goto __pyx_L3;
    6355             :   }
    6356             : 
    6357             :   /* "View.MemoryView":213
    6358             :  *         if self.callback_free_data != NULL:
    6359             :  *             self.callback_free_data(self.data)
    6360             :  *         elif self.free_data and self.data is not NULL:             # <<<<<<<<<<<<<<
    6361             :  *             if self.dtype_is_object:
    6362             :  *                 refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False)
    6363             :  */
    6364           0 :   if (__pyx_v_self->free_data) {
    6365           0 :   } else {
    6366           0 :     __pyx_t_1 = __pyx_v_self->free_data;
    6367           0 :     goto __pyx_L4_bool_binop_done;
    6368             :   }
    6369           0 :   __pyx_t_2 = (__pyx_v_self->data != NULL);
    6370           0 :   __pyx_t_1 = __pyx_t_2;
    6371           0 :   __pyx_L4_bool_binop_done:;
    6372           0 :   if (__pyx_t_1) {
    6373             : 
    6374             :     /* "View.MemoryView":214
    6375             :  *             self.callback_free_data(self.data)
    6376             :  *         elif self.free_data and self.data is not NULL:
    6377             :  *             if self.dtype_is_object:             # <<<<<<<<<<<<<<
    6378             :  *                 refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False)
    6379             :  *             free(self.data)
    6380             :  */
    6381           0 :     if (__pyx_v_self->dtype_is_object) {
    6382             : 
    6383             :       /* "View.MemoryView":215
    6384             :  *         elif self.free_data and self.data is not NULL:
    6385             :  *             if self.dtype_is_object:
    6386             :  *                 refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False)             # <<<<<<<<<<<<<<
    6387             :  *             free(self.data)
    6388             :  *         PyObject_Free(self._shape)
    6389             :  */
    6390           0 :       __pyx_memoryview_refcount_objects_in_slice(__pyx_v_self->data, __pyx_v_self->_shape, __pyx_v_self->_strides, __pyx_v_self->ndim, 0);
    6391             : 
    6392             :       /* "View.MemoryView":214
    6393             :  *             self.callback_free_data(self.data)
    6394             :  *         elif self.free_data and self.data is not NULL:
    6395             :  *             if self.dtype_is_object:             # <<<<<<<<<<<<<<
    6396             :  *                 refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False)
    6397             :  *             free(self.data)
    6398             :  */
    6399             :     }
    6400             : 
    6401             :     /* "View.MemoryView":216
    6402             :  *             if self.dtype_is_object:
    6403             :  *                 refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False)
    6404             :  *             free(self.data)             # <<<<<<<<<<<<<<
    6405             :  *         PyObject_Free(self._shape)
    6406             :  * 
    6407             :  */
    6408           0 :     free(__pyx_v_self->data);
    6409             : 
    6410             :     /* "View.MemoryView":213
    6411             :  *         if self.callback_free_data != NULL:
    6412             :  *             self.callback_free_data(self.data)
    6413             :  *         elif self.free_data and self.data is not NULL:             # <<<<<<<<<<<<<<
    6414             :  *             if self.dtype_is_object:
    6415             :  *                 refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False)
    6416             :  */
    6417             :   }
    6418           0 :   __pyx_L3:;
    6419             : 
    6420             :   /* "View.MemoryView":217
    6421             :  *                 refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False)
    6422             :  *             free(self.data)
    6423             :  *         PyObject_Free(self._shape)             # <<<<<<<<<<<<<<
    6424             :  * 
    6425             :  *     @property
    6426             :  */
    6427           0 :   PyObject_Free(__pyx_v_self->_shape);
    6428             : 
    6429             :   /* "View.MemoryView":210
    6430             :  *         info.obj = self
    6431             :  * 
    6432             :  *     def __dealloc__(array self):             # <<<<<<<<<<<<<<
    6433             :  *         if self.callback_free_data != NULL:
    6434             :  *             self.callback_free_data(self.data)
    6435             :  */
    6436             : 
    6437             :   /* function exit code */
    6438           0 : }
    6439             : 
    6440             : /* "View.MemoryView":219
    6441             :  *         PyObject_Free(self._shape)
    6442             :  * 
    6443             :  *     @property             # <<<<<<<<<<<<<<
    6444             :  *     def memview(self):
    6445             :  *         return self.get_memview()
    6446             :  */
    6447             : 
    6448             : /* Python wrapper */
    6449             : static PyObject *__pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(PyObject *__pyx_v_self); /*proto*/
    6450           0 : static PyObject *__pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(PyObject *__pyx_v_self) {
    6451           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    6452           0 :   PyObject *__pyx_r = 0;
    6453             :   __Pyx_RefNannyDeclarations
    6454           0 :   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
    6455           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
    6456           0 :   __pyx_r = __pyx_pf_15View_dot_MemoryView_5array_7memview___get__(((struct __pyx_array_obj *)__pyx_v_self));
    6457             : 
    6458             :   /* function exit code */
    6459           0 :   __Pyx_RefNannyFinishContext();
    6460           0 :   return __pyx_r;
    6461             : }
    6462             : 
    6463           0 : static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct __pyx_array_obj *__pyx_v_self) {
    6464           0 :   PyObject *__pyx_r = NULL;
    6465             :   __Pyx_RefNannyDeclarations
    6466           0 :   PyObject *__pyx_t_1 = NULL;
    6467           0 :   int __pyx_lineno = 0;
    6468           0 :   const char *__pyx_filename = NULL;
    6469           0 :   int __pyx_clineno = 0;
    6470           0 :   __Pyx_RefNannySetupContext("__get__", 1);
    6471             : 
    6472             :   /* "View.MemoryView":221
    6473             :  *     @property
    6474             :  *     def memview(self):
    6475             :  *         return self.get_memview()             # <<<<<<<<<<<<<<
    6476             :  * 
    6477             :  *     @cname('get_memview')
    6478             :  */
    6479           0 :   __Pyx_XDECREF(__pyx_r);
    6480           0 :   __pyx_t_1 = ((struct __pyx_vtabstruct_array *)__pyx_v_self->__pyx_vtab)->get_memview(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 221, __pyx_L1_error)
    6481           0 :   __Pyx_GOTREF(__pyx_t_1);
    6482           0 :   __pyx_r = __pyx_t_1;
    6483           0 :   __pyx_t_1 = 0;
    6484           0 :   goto __pyx_L0;
    6485             : 
    6486             :   /* "View.MemoryView":219
    6487             :  *         PyObject_Free(self._shape)
    6488             :  * 
    6489             :  *     @property             # <<<<<<<<<<<<<<
    6490             :  *     def memview(self):
    6491             :  *         return self.get_memview()
    6492             :  */
    6493             : 
    6494             :   /* function exit code */
    6495           0 :   __pyx_L1_error:;
    6496           0 :   __Pyx_XDECREF(__pyx_t_1);
    6497           0 :   __Pyx_AddTraceback("View.MemoryView.array.memview.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
    6498           0 :   __pyx_r = NULL;
    6499           0 :   __pyx_L0:;
    6500           0 :   __Pyx_XGIVEREF(__pyx_r);
    6501           0 :   __Pyx_RefNannyFinishContext();
    6502           0 :   return __pyx_r;
    6503             : }
    6504             : 
    6505             : /* "View.MemoryView":224
    6506             :  * 
    6507             :  *     @cname('get_memview')
    6508             :  *     cdef get_memview(self):             # <<<<<<<<<<<<<<
    6509             :  *         flags =  PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
    6510             :  *         return  memoryview(self, flags, self.dtype_is_object)
    6511             :  */
    6512             : 
    6513           0 : static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self) {
    6514           0 :   int __pyx_v_flags;
    6515           0 :   PyObject *__pyx_r = NULL;
    6516             :   __Pyx_RefNannyDeclarations
    6517           0 :   PyObject *__pyx_t_1 = NULL;
    6518           0 :   PyObject *__pyx_t_2 = NULL;
    6519           0 :   PyObject *__pyx_t_3 = NULL;
    6520           0 :   int __pyx_lineno = 0;
    6521           0 :   const char *__pyx_filename = NULL;
    6522           0 :   int __pyx_clineno = 0;
    6523           0 :   __Pyx_RefNannySetupContext("get_memview", 1);
    6524             : 
    6525             :   /* "View.MemoryView":225
    6526             :  *     @cname('get_memview')
    6527             :  *     cdef get_memview(self):
    6528             :  *         flags =  PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE             # <<<<<<<<<<<<<<
    6529             :  *         return  memoryview(self, flags, self.dtype_is_object)
    6530             :  * 
    6531             :  */
    6532           0 :   __pyx_v_flags = ((PyBUF_ANY_CONTIGUOUS | PyBUF_FORMAT) | PyBUF_WRITABLE);
    6533             : 
    6534             :   /* "View.MemoryView":226
    6535             :  *     cdef get_memview(self):
    6536             :  *         flags =  PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
    6537             :  *         return  memoryview(self, flags, self.dtype_is_object)             # <<<<<<<<<<<<<<
    6538             :  * 
    6539             :  *     def __len__(self):
    6540             :  */
    6541           0 :   __Pyx_XDECREF(__pyx_r);
    6542           0 :   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 226, __pyx_L1_error)
    6543           0 :   __Pyx_GOTREF(__pyx_t_1);
    6544           0 :   __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 226, __pyx_L1_error)
    6545           0 :   __Pyx_GOTREF(__pyx_t_2);
    6546           0 :   __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 226, __pyx_L1_error)
    6547           0 :   __Pyx_GOTREF(__pyx_t_3);
    6548           0 :   __Pyx_INCREF((PyObject *)__pyx_v_self);
    6549           0 :   __Pyx_GIVEREF((PyObject *)__pyx_v_self);
    6550           0 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self))) __PYX_ERR(1, 226, __pyx_L1_error);
    6551           0 :   __Pyx_GIVEREF(__pyx_t_1);
    6552           0 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1)) __PYX_ERR(1, 226, __pyx_L1_error);
    6553           0 :   __Pyx_GIVEREF(__pyx_t_2);
    6554           0 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2)) __PYX_ERR(1, 226, __pyx_L1_error);
    6555           0 :   __pyx_t_1 = 0;
    6556           0 :   __pyx_t_2 = 0;
    6557           0 :   __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 226, __pyx_L1_error)
    6558           0 :   __Pyx_GOTREF(__pyx_t_2);
    6559           0 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    6560           0 :   __pyx_r = __pyx_t_2;
    6561           0 :   __pyx_t_2 = 0;
    6562           0 :   goto __pyx_L0;
    6563             : 
    6564             :   /* "View.MemoryView":224
    6565             :  * 
    6566             :  *     @cname('get_memview')
    6567             :  *     cdef get_memview(self):             # <<<<<<<<<<<<<<
    6568             :  *         flags =  PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
    6569             :  *         return  memoryview(self, flags, self.dtype_is_object)
    6570             :  */
    6571             : 
    6572             :   /* function exit code */
    6573           0 :   __pyx_L1_error:;
    6574           0 :   __Pyx_XDECREF(__pyx_t_1);
    6575           0 :   __Pyx_XDECREF(__pyx_t_2);
    6576           0 :   __Pyx_XDECREF(__pyx_t_3);
    6577           0 :   __Pyx_AddTraceback("View.MemoryView.array.get_memview", __pyx_clineno, __pyx_lineno, __pyx_filename);
    6578           0 :   __pyx_r = 0;
    6579           0 :   __pyx_L0:;
    6580           0 :   __Pyx_XGIVEREF(__pyx_r);
    6581           0 :   __Pyx_RefNannyFinishContext();
    6582           0 :   return __pyx_r;
    6583             : }
    6584             : 
    6585             : /* "View.MemoryView":228
    6586             :  *         return  memoryview(self, flags, self.dtype_is_object)
    6587             :  * 
    6588             :  *     def __len__(self):             # <<<<<<<<<<<<<<
    6589             :  *         return self._shape[0]
    6590             :  * 
    6591             :  */
    6592             : 
    6593             : /* Python wrapper */
    6594             : static Py_ssize_t __pyx_array___len__(PyObject *__pyx_v_self); /*proto*/
    6595           0 : static Py_ssize_t __pyx_array___len__(PyObject *__pyx_v_self) {
    6596           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    6597           0 :   Py_ssize_t __pyx_r;
    6598             :   __Pyx_RefNannyDeclarations
    6599           0 :   __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
    6600           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
    6601           0 :   __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(((struct __pyx_array_obj *)__pyx_v_self));
    6602             : 
    6603             :   /* function exit code */
    6604           0 :   __Pyx_RefNannyFinishContext();
    6605           0 :   return __pyx_r;
    6606             : }
    6607             : 
    6608           0 : static Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(struct __pyx_array_obj *__pyx_v_self) {
    6609           0 :   Py_ssize_t __pyx_r;
    6610             : 
    6611             :   /* "View.MemoryView":229
    6612             :  * 
    6613             :  *     def __len__(self):
    6614             :  *         return self._shape[0]             # <<<<<<<<<<<<<<
    6615             :  * 
    6616             :  *     def __getattr__(self, attr):
    6617             :  */
    6618           0 :   __pyx_r = (__pyx_v_self->_shape[0]);
    6619           0 :   goto __pyx_L0;
    6620             : 
    6621             :   /* "View.MemoryView":228
    6622             :  *         return  memoryview(self, flags, self.dtype_is_object)
    6623             :  * 
    6624             :  *     def __len__(self):             # <<<<<<<<<<<<<<
    6625             :  *         return self._shape[0]
    6626             :  * 
    6627             :  */
    6628             : 
    6629             :   /* function exit code */
    6630           0 :   __pyx_L0:;
    6631           0 :   return __pyx_r;
    6632             : }
    6633             : 
    6634             : /* "View.MemoryView":231
    6635             :  *         return self._shape[0]
    6636             :  * 
    6637             :  *     def __getattr__(self, attr):             # <<<<<<<<<<<<<<
    6638             :  *         return getattr(self.memview, attr)
    6639             :  * 
    6640             :  */
    6641             : 
    6642             : /* Python wrapper */
    6643             : static PyObject *__pyx_array___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_attr); /*proto*/
    6644           0 : static PyObject *__pyx_array___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_attr) {
    6645           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    6646           0 :   PyObject *__pyx_r = 0;
    6647             :   __Pyx_RefNannyDeclarations
    6648           0 :   __Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0);
    6649           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
    6650           0 :   __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_attr));
    6651             : 
    6652             :   /* function exit code */
    6653           0 :   __Pyx_RefNannyFinishContext();
    6654           0 :   return __pyx_r;
    6655             : }
    6656             : 
    6657           0 : static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr) {
    6658           0 :   PyObject *__pyx_r = NULL;
    6659             :   __Pyx_RefNannyDeclarations
    6660           0 :   PyObject *__pyx_t_1 = NULL;
    6661           0 :   PyObject *__pyx_t_2 = NULL;
    6662           0 :   int __pyx_lineno = 0;
    6663           0 :   const char *__pyx_filename = NULL;
    6664           0 :   int __pyx_clineno = 0;
    6665           0 :   __Pyx_RefNannySetupContext("__getattr__", 1);
    6666             : 
    6667             :   /* "View.MemoryView":232
    6668             :  * 
    6669             :  *     def __getattr__(self, attr):
    6670             :  *         return getattr(self.memview, attr)             # <<<<<<<<<<<<<<
    6671             :  * 
    6672             :  *     def __getitem__(self, item):
    6673             :  */
    6674           0 :   __Pyx_XDECREF(__pyx_r);
    6675           0 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 232, __pyx_L1_error)
    6676           0 :   __Pyx_GOTREF(__pyx_t_1);
    6677           0 :   __pyx_t_2 = __Pyx_GetAttr(__pyx_t_1, __pyx_v_attr); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 232, __pyx_L1_error)
    6678           0 :   __Pyx_GOTREF(__pyx_t_2);
    6679           0 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    6680           0 :   __pyx_r = __pyx_t_2;
    6681           0 :   __pyx_t_2 = 0;
    6682           0 :   goto __pyx_L0;
    6683             : 
    6684             :   /* "View.MemoryView":231
    6685             :  *         return self._shape[0]
    6686             :  * 
    6687             :  *     def __getattr__(self, attr):             # <<<<<<<<<<<<<<
    6688             :  *         return getattr(self.memview, attr)
    6689             :  * 
    6690             :  */
    6691             : 
    6692             :   /* function exit code */
    6693           0 :   __pyx_L1_error:;
    6694           0 :   __Pyx_XDECREF(__pyx_t_1);
    6695           0 :   __Pyx_XDECREF(__pyx_t_2);
    6696           0 :   __Pyx_AddTraceback("View.MemoryView.array.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
    6697           0 :   __pyx_r = NULL;
    6698           0 :   __pyx_L0:;
    6699           0 :   __Pyx_XGIVEREF(__pyx_r);
    6700           0 :   __Pyx_RefNannyFinishContext();
    6701           0 :   return __pyx_r;
    6702             : }
    6703             : 
    6704             : /* "View.MemoryView":234
    6705             :  *         return getattr(self.memview, attr)
    6706             :  * 
    6707             :  *     def __getitem__(self, item):             # <<<<<<<<<<<<<<
    6708             :  *         return self.memview[item]
    6709             :  * 
    6710             :  */
    6711             : 
    6712             : /* Python wrapper */
    6713             : static PyObject *__pyx_array___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/
    6714           0 : static PyObject *__pyx_array___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item) {
    6715           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    6716           0 :   PyObject *__pyx_r = 0;
    6717             :   __Pyx_RefNannyDeclarations
    6718           0 :   __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
    6719           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
    6720           0 :   __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_item));
    6721             : 
    6722             :   /* function exit code */
    6723           0 :   __Pyx_RefNannyFinishContext();
    6724           0 :   return __pyx_r;
    6725             : }
    6726             : 
    6727           0 : static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item) {
    6728           0 :   PyObject *__pyx_r = NULL;
    6729             :   __Pyx_RefNannyDeclarations
    6730           0 :   PyObject *__pyx_t_1 = NULL;
    6731           0 :   PyObject *__pyx_t_2 = NULL;
    6732           0 :   int __pyx_lineno = 0;
    6733           0 :   const char *__pyx_filename = NULL;
    6734           0 :   int __pyx_clineno = 0;
    6735           0 :   __Pyx_RefNannySetupContext("__getitem__", 1);
    6736             : 
    6737             :   /* "View.MemoryView":235
    6738             :  * 
    6739             :  *     def __getitem__(self, item):
    6740             :  *         return self.memview[item]             # <<<<<<<<<<<<<<
    6741             :  * 
    6742             :  *     def __setitem__(self, item, value):
    6743             :  */
    6744           0 :   __Pyx_XDECREF(__pyx_r);
    6745           0 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 235, __pyx_L1_error)
    6746           0 :   __Pyx_GOTREF(__pyx_t_1);
    6747           0 :   __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_item); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 235, __pyx_L1_error)
    6748           0 :   __Pyx_GOTREF(__pyx_t_2);
    6749           0 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    6750           0 :   __pyx_r = __pyx_t_2;
    6751           0 :   __pyx_t_2 = 0;
    6752           0 :   goto __pyx_L0;
    6753             : 
    6754             :   /* "View.MemoryView":234
    6755             :  *         return getattr(self.memview, attr)
    6756             :  * 
    6757             :  *     def __getitem__(self, item):             # <<<<<<<<<<<<<<
    6758             :  *         return self.memview[item]
    6759             :  * 
    6760             :  */
    6761             : 
    6762             :   /* function exit code */
    6763           0 :   __pyx_L1_error:;
    6764           0 :   __Pyx_XDECREF(__pyx_t_1);
    6765           0 :   __Pyx_XDECREF(__pyx_t_2);
    6766           0 :   __Pyx_AddTraceback("View.MemoryView.array.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
    6767           0 :   __pyx_r = NULL;
    6768           0 :   __pyx_L0:;
    6769           0 :   __Pyx_XGIVEREF(__pyx_r);
    6770           0 :   __Pyx_RefNannyFinishContext();
    6771           0 :   return __pyx_r;
    6772             : }
    6773             : 
    6774             : /* "View.MemoryView":237
    6775             :  *         return self.memview[item]
    6776             :  * 
    6777             :  *     def __setitem__(self, item, value):             # <<<<<<<<<<<<<<
    6778             :  *         self.memview[item] = value
    6779             :  * 
    6780             :  */
    6781             : 
    6782             : /* Python wrapper */
    6783             : static int __pyx_array___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value); /*proto*/
    6784           0 : static int __pyx_array___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value) {
    6785           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    6786           0 :   int __pyx_r;
    6787             :   __Pyx_RefNannyDeclarations
    6788           0 :   __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
    6789           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
    6790           0 :   __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_item), ((PyObject *)__pyx_v_value));
    6791             : 
    6792             :   /* function exit code */
    6793           0 :   __Pyx_RefNannyFinishContext();
    6794           0 :   return __pyx_r;
    6795             : }
    6796             : 
    6797           0 : static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value) {
    6798           0 :   int __pyx_r;
    6799             :   __Pyx_RefNannyDeclarations
    6800           0 :   PyObject *__pyx_t_1 = NULL;
    6801           0 :   int __pyx_lineno = 0;
    6802           0 :   const char *__pyx_filename = NULL;
    6803           0 :   int __pyx_clineno = 0;
    6804           0 :   __Pyx_RefNannySetupContext("__setitem__", 1);
    6805             : 
    6806             :   /* "View.MemoryView":238
    6807             :  * 
    6808             :  *     def __setitem__(self, item, value):
    6809             :  *         self.memview[item] = value             # <<<<<<<<<<<<<<
    6810             :  * 
    6811             :  * 
    6812             :  */
    6813           0 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 238, __pyx_L1_error)
    6814           0 :   __Pyx_GOTREF(__pyx_t_1);
    6815           0 :   if (unlikely((PyObject_SetItem(__pyx_t_1, __pyx_v_item, __pyx_v_value) < 0))) __PYX_ERR(1, 238, __pyx_L1_error)
    6816           0 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    6817             : 
    6818             :   /* "View.MemoryView":237
    6819             :  *         return self.memview[item]
    6820             :  * 
    6821             :  *     def __setitem__(self, item, value):             # <<<<<<<<<<<<<<
    6822             :  *         self.memview[item] = value
    6823             :  * 
    6824             :  */
    6825             : 
    6826             :   /* function exit code */
    6827           0 :   __pyx_r = 0;
    6828           0 :   goto __pyx_L0;
    6829           0 :   __pyx_L1_error:;
    6830           0 :   __Pyx_XDECREF(__pyx_t_1);
    6831           0 :   __Pyx_AddTraceback("View.MemoryView.array.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
    6832           0 :   __pyx_r = -1;
    6833           0 :   __pyx_L0:;
    6834           0 :   __Pyx_RefNannyFinishContext();
    6835           0 :   return __pyx_r;
    6836             : }
    6837             : 
    6838             : /* "(tree fragment)":1
    6839             :  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
    6840             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
    6841             :  * def __setstate_cython__(self, __pyx_state):
    6842             :  */
    6843             : 
    6844             : /* Python wrapper */
    6845             : static PyObject *__pyx_pw___pyx_array_1__reduce_cython__(PyObject *__pyx_v_self, 
    6846             : #if CYTHON_METH_FASTCALL
    6847             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    6848             : #else
    6849             : PyObject *__pyx_args, PyObject *__pyx_kwds
    6850             : #endif
    6851             : ); /*proto*/
    6852           0 : static PyObject *__pyx_pw___pyx_array_1__reduce_cython__(PyObject *__pyx_v_self, 
    6853             : #if CYTHON_METH_FASTCALL
    6854             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    6855             : #else
    6856             : PyObject *__pyx_args, PyObject *__pyx_kwds
    6857             : #endif
    6858             : ) {
    6859             :   #if !CYTHON_METH_FASTCALL
    6860             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
    6861             :   #endif
    6862           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    6863           0 :   PyObject *__pyx_r = 0;
    6864             :   __Pyx_RefNannyDeclarations
    6865           0 :   __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
    6866             :   #if !CYTHON_METH_FASTCALL
    6867             :   #if CYTHON_ASSUME_SAFE_MACROS
    6868             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
    6869             :   #else
    6870             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
    6871             :   #endif
    6872             :   #endif
    6873           0 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
    6874           0 :   if (unlikely(__pyx_nargs > 0)) {
    6875           0 :     __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
    6876           0 :   if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
    6877           0 :   __pyx_r = __pyx_pf___pyx_array___reduce_cython__(((struct __pyx_array_obj *)__pyx_v_self));
    6878             : 
    6879             :   /* function exit code */
    6880           0 :   __Pyx_RefNannyFinishContext();
    6881           0 :   return __pyx_r;
    6882             : }
    6883             : 
    6884           0 : static PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self) {
    6885           0 :   PyObject *__pyx_r = NULL;
    6886             :   __Pyx_RefNannyDeclarations
    6887           0 :   int __pyx_lineno = 0;
    6888           0 :   const char *__pyx_filename = NULL;
    6889           0 :   int __pyx_clineno = 0;
    6890           0 :   __Pyx_RefNannySetupContext("__reduce_cython__", 1);
    6891             : 
    6892             :   /* "(tree fragment)":2
    6893             :  * def __reduce_cython__(self):
    6894             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
    6895             :  * def __setstate_cython__(self, __pyx_state):
    6896             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
    6897             :  */
    6898           0 :   __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
    6899           0 :   __PYX_ERR(1, 2, __pyx_L1_error)
    6900             : 
    6901             :   /* "(tree fragment)":1
    6902             :  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
    6903             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
    6904             :  * def __setstate_cython__(self, __pyx_state):
    6905             :  */
    6906             : 
    6907             :   /* function exit code */
    6908           0 :   __pyx_L1_error:;
    6909           0 :   __Pyx_AddTraceback("View.MemoryView.array.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
    6910           0 :   __pyx_r = NULL;
    6911           0 :   __Pyx_XGIVEREF(__pyx_r);
    6912           0 :   __Pyx_RefNannyFinishContext();
    6913           0 :   return __pyx_r;
    6914             : }
    6915             : 
    6916             : /* "(tree fragment)":3
    6917             :  * def __reduce_cython__(self):
    6918             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
    6919             :  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
    6920             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
    6921             :  */
    6922             : 
    6923             : /* Python wrapper */
    6924             : static PyObject *__pyx_pw___pyx_array_3__setstate_cython__(PyObject *__pyx_v_self, 
    6925             : #if CYTHON_METH_FASTCALL
    6926             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    6927             : #else
    6928             : PyObject *__pyx_args, PyObject *__pyx_kwds
    6929             : #endif
    6930             : ); /*proto*/
    6931           0 : static PyObject *__pyx_pw___pyx_array_3__setstate_cython__(PyObject *__pyx_v_self, 
    6932             : #if CYTHON_METH_FASTCALL
    6933             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    6934             : #else
    6935             : PyObject *__pyx_args, PyObject *__pyx_kwds
    6936             : #endif
    6937             : ) {
    6938           0 :   CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
    6939             :   #if !CYTHON_METH_FASTCALL
    6940             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
    6941             :   #endif
    6942           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    6943           0 :   PyObject* values[1] = {0};
    6944           0 :   int __pyx_lineno = 0;
    6945           0 :   const char *__pyx_filename = NULL;
    6946           0 :   int __pyx_clineno = 0;
    6947           0 :   PyObject *__pyx_r = 0;
    6948             :   __Pyx_RefNannyDeclarations
    6949           0 :   __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
    6950             :   #if !CYTHON_METH_FASTCALL
    6951             :   #if CYTHON_ASSUME_SAFE_MACROS
    6952             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
    6953             :   #else
    6954             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
    6955             :   #endif
    6956             :   #endif
    6957           0 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
    6958             :   {
    6959           0 :     PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    6960           0 :     if (__pyx_kwds) {
    6961           0 :       Py_ssize_t kw_args;
    6962           0 :       switch (__pyx_nargs) {
    6963           0 :         case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    6964           0 :         CYTHON_FALLTHROUGH;
    6965           0 :         case  0: break;
    6966           0 :         default: goto __pyx_L5_argtuple_error;
    6967             :       }
    6968           0 :       kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
    6969           0 :       switch (__pyx_nargs) {
    6970             :         case  0:
    6971           0 :         if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
    6972           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
    6973           0 :           kw_args--;
    6974             :         }
    6975           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
    6976           0 :         else goto __pyx_L5_argtuple_error;
    6977             :       }
    6978           0 :       if (unlikely(kw_args > 0)) {
    6979           0 :         const Py_ssize_t kwd_pos_args = __pyx_nargs;
    6980           0 :         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
    6981             :       }
    6982           0 :     } else if (unlikely(__pyx_nargs != 1)) {
    6983           0 :       goto __pyx_L5_argtuple_error;
    6984             :     } else {
    6985           0 :       values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    6986             :     }
    6987           0 :     __pyx_v___pyx_state = values[0];
    6988             :   }
    6989           0 :   goto __pyx_L6_skip;
    6990           0 :   __pyx_L5_argtuple_error:;
    6991           0 :   __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
    6992           0 :   __pyx_L6_skip:;
    6993           0 :   goto __pyx_L4_argument_unpacking_done;
    6994           0 :   __pyx_L3_error:;
    6995             :   {
    6996           0 :     Py_ssize_t __pyx_temp;
    6997           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    6998             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    6999             :     }
    7000             :   }
    7001           0 :   __Pyx_AddTraceback("View.MemoryView.array.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
    7002           0 :   __Pyx_RefNannyFinishContext();
    7003           0 :   return NULL;
    7004           0 :   __pyx_L4_argument_unpacking_done:;
    7005           0 :   __pyx_r = __pyx_pf___pyx_array_2__setstate_cython__(((struct __pyx_array_obj *)__pyx_v_self), __pyx_v___pyx_state);
    7006             : 
    7007             :   /* function exit code */
    7008             :   {
    7009           0 :     Py_ssize_t __pyx_temp;
    7010           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    7011             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    7012             :     }
    7013             :   }
    7014             :   __Pyx_RefNannyFinishContext();
    7015             :   return __pyx_r;
    7016             : }
    7017             : 
    7018           0 : static PyObject *__pyx_pf___pyx_array_2__setstate_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
    7019           0 :   PyObject *__pyx_r = NULL;
    7020             :   __Pyx_RefNannyDeclarations
    7021           0 :   int __pyx_lineno = 0;
    7022           0 :   const char *__pyx_filename = NULL;
    7023           0 :   int __pyx_clineno = 0;
    7024           0 :   __Pyx_RefNannySetupContext("__setstate_cython__", 1);
    7025             : 
    7026             :   /* "(tree fragment)":4
    7027             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
    7028             :  * def __setstate_cython__(self, __pyx_state):
    7029             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
    7030             :  */
    7031           0 :   __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
    7032           0 :   __PYX_ERR(1, 4, __pyx_L1_error)
    7033             : 
    7034             :   /* "(tree fragment)":3
    7035             :  * def __reduce_cython__(self):
    7036             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
    7037             :  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
    7038             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
    7039             :  */
    7040             : 
    7041             :   /* function exit code */
    7042           0 :   __pyx_L1_error:;
    7043           0 :   __Pyx_AddTraceback("View.MemoryView.array.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
    7044           0 :   __pyx_r = NULL;
    7045           0 :   __Pyx_XGIVEREF(__pyx_r);
    7046           0 :   __Pyx_RefNannyFinishContext();
    7047           0 :   return __pyx_r;
    7048             : }
    7049             : 
    7050             : /* "View.MemoryView":248
    7051             :  * 
    7052             :  * @cname("__pyx_array_allocate_buffer")
    7053             :  * cdef int _allocate_buffer(array self) except -1:             # <<<<<<<<<<<<<<
    7054             :  * 
    7055             :  * 
    7056             :  */
    7057             : 
    7058           0 : static int __pyx_array_allocate_buffer(struct __pyx_array_obj *__pyx_v_self) {
    7059           0 :   Py_ssize_t __pyx_v_i;
    7060           0 :   PyObject **__pyx_v_p;
    7061           0 :   int __pyx_r;
    7062           0 :   int __pyx_t_1;
    7063           0 :   Py_ssize_t __pyx_t_2;
    7064           0 :   Py_ssize_t __pyx_t_3;
    7065           0 :   Py_ssize_t __pyx_t_4;
    7066           0 :   int __pyx_lineno = 0;
    7067           0 :   const char *__pyx_filename = NULL;
    7068           0 :   int __pyx_clineno = 0;
    7069             : 
    7070             :   /* "View.MemoryView":254
    7071             :  *     cdef PyObject **p
    7072             :  * 
    7073             :  *     self.free_data = True             # <<<<<<<<<<<<<<
    7074             :  *     self.data = <char *>malloc(self.len)
    7075             :  *     if not self.data:
    7076             :  */
    7077           0 :   __pyx_v_self->free_data = 1;
    7078             : 
    7079             :   /* "View.MemoryView":255
    7080             :  * 
    7081             :  *     self.free_data = True
    7082             :  *     self.data = <char *>malloc(self.len)             # <<<<<<<<<<<<<<
    7083             :  *     if not self.data:
    7084             :  *         raise MemoryError, "unable to allocate array data."
    7085             :  */
    7086           0 :   __pyx_v_self->data = ((char *)malloc(__pyx_v_self->len));
    7087             : 
    7088             :   /* "View.MemoryView":256
    7089             :  *     self.free_data = True
    7090             :  *     self.data = <char *>malloc(self.len)
    7091             :  *     if not self.data:             # <<<<<<<<<<<<<<
    7092             :  *         raise MemoryError, "unable to allocate array data."
    7093             :  * 
    7094             :  */
    7095           0 :   __pyx_t_1 = (!(__pyx_v_self->data != 0));
    7096           0 :   if (unlikely(__pyx_t_1)) {
    7097             : 
    7098             :     /* "View.MemoryView":257
    7099             :  *     self.data = <char *>malloc(self.len)
    7100             :  *     if not self.data:
    7101             :  *         raise MemoryError, "unable to allocate array data."             # <<<<<<<<<<<<<<
    7102             :  * 
    7103             :  *     if self.dtype_is_object:
    7104             :  */
    7105           0 :     __Pyx_Raise(__pyx_builtin_MemoryError, __pyx_kp_s_unable_to_allocate_array_data, 0, 0);
    7106           0 :     __PYX_ERR(1, 257, __pyx_L1_error)
    7107             : 
    7108             :     /* "View.MemoryView":256
    7109             :  *     self.free_data = True
    7110             :  *     self.data = <char *>malloc(self.len)
    7111             :  *     if not self.data:             # <<<<<<<<<<<<<<
    7112             :  *         raise MemoryError, "unable to allocate array data."
    7113             :  * 
    7114             :  */
    7115             :   }
    7116             : 
    7117             :   /* "View.MemoryView":259
    7118             :  *         raise MemoryError, "unable to allocate array data."
    7119             :  * 
    7120             :  *     if self.dtype_is_object:             # <<<<<<<<<<<<<<
    7121             :  *         p = <PyObject **> self.data
    7122             :  *         for i in range(self.len // self.itemsize):
    7123             :  */
    7124           0 :   if (__pyx_v_self->dtype_is_object) {
    7125             : 
    7126             :     /* "View.MemoryView":260
    7127             :  * 
    7128             :  *     if self.dtype_is_object:
    7129             :  *         p = <PyObject **> self.data             # <<<<<<<<<<<<<<
    7130             :  *         for i in range(self.len // self.itemsize):
    7131             :  *             p[i] = Py_None
    7132             :  */
    7133           0 :     __pyx_v_p = ((PyObject **)__pyx_v_self->data);
    7134             : 
    7135             :     /* "View.MemoryView":261
    7136             :  *     if self.dtype_is_object:
    7137             :  *         p = <PyObject **> self.data
    7138             :  *         for i in range(self.len // self.itemsize):             # <<<<<<<<<<<<<<
    7139             :  *             p[i] = Py_None
    7140             :  *             Py_INCREF(Py_None)
    7141             :  */
    7142           0 :     if (unlikely(__pyx_v_self->itemsize == 0)) {
    7143           0 :       PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
    7144           0 :       __PYX_ERR(1, 261, __pyx_L1_error)
    7145             :     }
    7146           0 :     else if (sizeof(Py_ssize_t) == sizeof(long) && (!(((Py_ssize_t)-1) > 0)) && unlikely(__pyx_v_self->itemsize == (Py_ssize_t)-1)  && unlikely(__Pyx_UNARY_NEG_WOULD_OVERFLOW(__pyx_v_self->len))) {
    7147           0 :       PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
    7148           0 :       __PYX_ERR(1, 261, __pyx_L1_error)
    7149             :     }
    7150           0 :     __pyx_t_2 = __Pyx_div_Py_ssize_t(__pyx_v_self->len, __pyx_v_self->itemsize);
    7151           0 :     __pyx_t_3 = __pyx_t_2;
    7152           0 :     for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    7153           0 :       __pyx_v_i = __pyx_t_4;
    7154             : 
    7155             :       /* "View.MemoryView":262
    7156             :  *         p = <PyObject **> self.data
    7157             :  *         for i in range(self.len // self.itemsize):
    7158             :  *             p[i] = Py_None             # <<<<<<<<<<<<<<
    7159             :  *             Py_INCREF(Py_None)
    7160             :  *     return 0
    7161             :  */
    7162           0 :       (__pyx_v_p[__pyx_v_i]) = Py_None;
    7163             : 
    7164             :       /* "View.MemoryView":263
    7165             :  *         for i in range(self.len // self.itemsize):
    7166             :  *             p[i] = Py_None
    7167             :  *             Py_INCREF(Py_None)             # <<<<<<<<<<<<<<
    7168             :  *     return 0
    7169             :  * 
    7170             :  */
    7171           0 :       Py_INCREF(Py_None);
    7172             :     }
    7173             : 
    7174             :     /* "View.MemoryView":259
    7175             :  *         raise MemoryError, "unable to allocate array data."
    7176             :  * 
    7177             :  *     if self.dtype_is_object:             # <<<<<<<<<<<<<<
    7178             :  *         p = <PyObject **> self.data
    7179             :  *         for i in range(self.len // self.itemsize):
    7180             :  */
    7181             :   }
    7182             : 
    7183             :   /* "View.MemoryView":264
    7184             :  *             p[i] = Py_None
    7185             :  *             Py_INCREF(Py_None)
    7186             :  *     return 0             # <<<<<<<<<<<<<<
    7187             :  * 
    7188             :  * 
    7189             :  */
    7190           0 :   __pyx_r = 0;
    7191           0 :   goto __pyx_L0;
    7192             : 
    7193             :   /* "View.MemoryView":248
    7194             :  * 
    7195             :  * @cname("__pyx_array_allocate_buffer")
    7196             :  * cdef int _allocate_buffer(array self) except -1:             # <<<<<<<<<<<<<<
    7197             :  * 
    7198             :  * 
    7199             :  */
    7200             : 
    7201             :   /* function exit code */
    7202           0 :   __pyx_L1_error:;
    7203           0 :   __Pyx_AddTraceback("View.MemoryView._allocate_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename);
    7204           0 :   __pyx_r = -1;
    7205           0 :   __pyx_L0:;
    7206           0 :   return __pyx_r;
    7207             : }
    7208             : 
    7209             : /* "View.MemoryView":268
    7210             :  * 
    7211             :  * @cname("__pyx_array_new")
    7212             :  * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format, char *c_mode, char *buf):             # <<<<<<<<<<<<<<
    7213             :  *     cdef array result
    7214             :  *     cdef str mode = "fortran" if c_mode[0] == b'f' else "c"  # this often comes from a constant C string.
    7215             :  */
    7216             : 
    7217           0 : static struct __pyx_array_obj *__pyx_array_new(PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, char *__pyx_v_format, char *__pyx_v_c_mode, char *__pyx_v_buf) {
    7218           0 :   struct __pyx_array_obj *__pyx_v_result = 0;
    7219           0 :   PyObject *__pyx_v_mode = 0;
    7220           0 :   struct __pyx_array_obj *__pyx_r = NULL;
    7221             :   __Pyx_RefNannyDeclarations
    7222           0 :   PyObject *__pyx_t_1 = NULL;
    7223           0 :   int __pyx_t_2;
    7224           0 :   PyObject *__pyx_t_3 = NULL;
    7225           0 :   PyObject *__pyx_t_4 = NULL;
    7226           0 :   int __pyx_lineno = 0;
    7227           0 :   const char *__pyx_filename = NULL;
    7228           0 :   int __pyx_clineno = 0;
    7229           0 :   __Pyx_RefNannySetupContext("array_cwrapper", 1);
    7230             : 
    7231             :   /* "View.MemoryView":270
    7232             :  * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format, char *c_mode, char *buf):
    7233             :  *     cdef array result
    7234             :  *     cdef str mode = "fortran" if c_mode[0] == b'f' else "c"  # this often comes from a constant C string.             # <<<<<<<<<<<<<<
    7235             :  * 
    7236             :  *     if buf is NULL:
    7237             :  */
    7238           0 :   __pyx_t_2 = ((__pyx_v_c_mode[0]) == 'f');
    7239           0 :   if (__pyx_t_2) {
    7240           0 :     __Pyx_INCREF(__pyx_n_s_fortran);
    7241             :     __pyx_t_1 = __pyx_n_s_fortran;
    7242             :   } else {
    7243           0 :     __Pyx_INCREF(__pyx_n_s_c);
    7244             :     __pyx_t_1 = __pyx_n_s_c;
    7245             :   }
    7246           0 :   __pyx_v_mode = ((PyObject*)__pyx_t_1);
    7247           0 :   __pyx_t_1 = 0;
    7248             : 
    7249             :   /* "View.MemoryView":272
    7250             :  *     cdef str mode = "fortran" if c_mode[0] == b'f' else "c"  # this often comes from a constant C string.
    7251             :  * 
    7252             :  *     if buf is NULL:             # <<<<<<<<<<<<<<
    7253             :  *         result = array.__new__(array, shape, itemsize, format, mode)
    7254             :  *     else:
    7255             :  */
    7256           0 :   __pyx_t_2 = (__pyx_v_buf == NULL);
    7257           0 :   if (__pyx_t_2) {
    7258             : 
    7259             :     /* "View.MemoryView":273
    7260             :  * 
    7261             :  *     if buf is NULL:
    7262             :  *         result = array.__new__(array, shape, itemsize, format, mode)             # <<<<<<<<<<<<<<
    7263             :  *     else:
    7264             :  *         result = array.__new__(array, shape, itemsize, format, mode, allocate_buffer=False)
    7265             :  */
    7266           0 :     __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_itemsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 273, __pyx_L1_error)
    7267           0 :     __Pyx_GOTREF(__pyx_t_1);
    7268           0 :     __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 273, __pyx_L1_error)
    7269           0 :     __Pyx_GOTREF(__pyx_t_3);
    7270           0 :     __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 273, __pyx_L1_error)
    7271           0 :     __Pyx_GOTREF(__pyx_t_4);
    7272           0 :     __Pyx_INCREF(__pyx_v_shape);
    7273           0 :     __Pyx_GIVEREF(__pyx_v_shape);
    7274           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_shape)) __PYX_ERR(1, 273, __pyx_L1_error);
    7275           0 :     __Pyx_GIVEREF(__pyx_t_1);
    7276           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1)) __PYX_ERR(1, 273, __pyx_L1_error);
    7277           0 :     __Pyx_GIVEREF(__pyx_t_3);
    7278           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3)) __PYX_ERR(1, 273, __pyx_L1_error);
    7279           0 :     __Pyx_INCREF(__pyx_v_mode);
    7280           0 :     __Pyx_GIVEREF(__pyx_v_mode);
    7281           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_v_mode)) __PYX_ERR(1, 273, __pyx_L1_error);
    7282           0 :     __pyx_t_1 = 0;
    7283           0 :     __pyx_t_3 = 0;
    7284           0 :     __pyx_t_3 = ((PyObject *)__pyx_tp_new_array(((PyTypeObject *)__pyx_array_type), __pyx_t_4, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 273, __pyx_L1_error)
    7285           0 :     __Pyx_GOTREF((PyObject *)__pyx_t_3);
    7286           0 :     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    7287           0 :     __pyx_v_result = ((struct __pyx_array_obj *)__pyx_t_3);
    7288           0 :     __pyx_t_3 = 0;
    7289             : 
    7290             :     /* "View.MemoryView":272
    7291             :  *     cdef str mode = "fortran" if c_mode[0] == b'f' else "c"  # this often comes from a constant C string.
    7292             :  * 
    7293             :  *     if buf is NULL:             # <<<<<<<<<<<<<<
    7294             :  *         result = array.__new__(array, shape, itemsize, format, mode)
    7295             :  *     else:
    7296             :  */
    7297           0 :     goto __pyx_L3;
    7298             :   }
    7299             : 
    7300             :   /* "View.MemoryView":275
    7301             :  *         result = array.__new__(array, shape, itemsize, format, mode)
    7302             :  *     else:
    7303             :  *         result = array.__new__(array, shape, itemsize, format, mode, allocate_buffer=False)             # <<<<<<<<<<<<<<
    7304             :  *         result.data = buf
    7305             :  * 
    7306             :  */
    7307             :   /*else*/ {
    7308           0 :     __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_itemsize); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 275, __pyx_L1_error)
    7309           0 :     __Pyx_GOTREF(__pyx_t_3);
    7310           0 :     __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 275, __pyx_L1_error)
    7311           0 :     __Pyx_GOTREF(__pyx_t_4);
    7312           0 :     __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 275, __pyx_L1_error)
    7313           0 :     __Pyx_GOTREF(__pyx_t_1);
    7314           0 :     __Pyx_INCREF(__pyx_v_shape);
    7315           0 :     __Pyx_GIVEREF(__pyx_v_shape);
    7316           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_shape)) __PYX_ERR(1, 275, __pyx_L1_error);
    7317           0 :     __Pyx_GIVEREF(__pyx_t_3);
    7318           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3)) __PYX_ERR(1, 275, __pyx_L1_error);
    7319           0 :     __Pyx_GIVEREF(__pyx_t_4);
    7320           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_4)) __PYX_ERR(1, 275, __pyx_L1_error);
    7321           0 :     __Pyx_INCREF(__pyx_v_mode);
    7322           0 :     __Pyx_GIVEREF(__pyx_v_mode);
    7323           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_mode)) __PYX_ERR(1, 275, __pyx_L1_error);
    7324           0 :     __pyx_t_3 = 0;
    7325           0 :     __pyx_t_4 = 0;
    7326           0 :     __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 275, __pyx_L1_error)
    7327           0 :     __Pyx_GOTREF(__pyx_t_4);
    7328           0 :     if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_allocate_buffer, Py_False) < 0) __PYX_ERR(1, 275, __pyx_L1_error)
    7329           0 :     __pyx_t_3 = ((PyObject *)__pyx_tp_new_array(((PyTypeObject *)__pyx_array_type), __pyx_t_1, __pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 275, __pyx_L1_error)
    7330           0 :     __Pyx_GOTREF((PyObject *)__pyx_t_3);
    7331           0 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    7332           0 :     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    7333           0 :     __pyx_v_result = ((struct __pyx_array_obj *)__pyx_t_3);
    7334           0 :     __pyx_t_3 = 0;
    7335             : 
    7336             :     /* "View.MemoryView":276
    7337             :  *     else:
    7338             :  *         result = array.__new__(array, shape, itemsize, format, mode, allocate_buffer=False)
    7339             :  *         result.data = buf             # <<<<<<<<<<<<<<
    7340             :  * 
    7341             :  *     return result
    7342             :  */
    7343           0 :     __pyx_v_result->data = __pyx_v_buf;
    7344             :   }
    7345           0 :   __pyx_L3:;
    7346             : 
    7347             :   /* "View.MemoryView":278
    7348             :  *         result.data = buf
    7349             :  * 
    7350             :  *     return result             # <<<<<<<<<<<<<<
    7351             :  * 
    7352             :  * 
    7353             :  */
    7354           0 :   __Pyx_XDECREF((PyObject *)__pyx_r);
    7355           0 :   __Pyx_INCREF((PyObject *)__pyx_v_result);
    7356           0 :   __pyx_r = __pyx_v_result;
    7357           0 :   goto __pyx_L0;
    7358             : 
    7359             :   /* "View.MemoryView":268
    7360             :  * 
    7361             :  * @cname("__pyx_array_new")
    7362             :  * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format, char *c_mode, char *buf):             # <<<<<<<<<<<<<<
    7363             :  *     cdef array result
    7364             :  *     cdef str mode = "fortran" if c_mode[0] == b'f' else "c"  # this often comes from a constant C string.
    7365             :  */
    7366             : 
    7367             :   /* function exit code */
    7368           0 :   __pyx_L1_error:;
    7369           0 :   __Pyx_XDECREF(__pyx_t_1);
    7370           0 :   __Pyx_XDECREF(__pyx_t_3);
    7371           0 :   __Pyx_XDECREF(__pyx_t_4);
    7372           0 :   __Pyx_AddTraceback("View.MemoryView.array_cwrapper", __pyx_clineno, __pyx_lineno, __pyx_filename);
    7373           0 :   __pyx_r = 0;
    7374           0 :   __pyx_L0:;
    7375           0 :   __Pyx_XDECREF((PyObject *)__pyx_v_result);
    7376           0 :   __Pyx_XDECREF(__pyx_v_mode);
    7377           0 :   __Pyx_XGIVEREF((PyObject *)__pyx_r);
    7378           0 :   __Pyx_RefNannyFinishContext();
    7379           0 :   return __pyx_r;
    7380             : }
    7381             : 
    7382             : /* "View.MemoryView":304
    7383             :  * cdef class Enum(object):
    7384             :  *     cdef object name
    7385             :  *     def __init__(self, name):             # <<<<<<<<<<<<<<
    7386             :  *         self.name = name
    7387             :  *     def __repr__(self):
    7388             :  */
    7389             : 
    7390             : /* Python wrapper */
    7391             : static int __pyx_MemviewEnum___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    7392          15 : static int __pyx_MemviewEnum___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
    7393          15 :   PyObject *__pyx_v_name = 0;
    7394          15 :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
    7395          15 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    7396          15 :   PyObject* values[1] = {0};
    7397          15 :   int __pyx_lineno = 0;
    7398          15 :   const char *__pyx_filename = NULL;
    7399          15 :   int __pyx_clineno = 0;
    7400          15 :   int __pyx_r;
    7401             :   __Pyx_RefNannyDeclarations
    7402          15 :   __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
    7403             :   #if CYTHON_ASSUME_SAFE_MACROS
    7404          15 :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
    7405             :   #else
    7406             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
    7407             :   #endif
    7408          15 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
    7409             :   {
    7410          15 :     PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,0};
    7411          15 :     if (__pyx_kwds) {
    7412           0 :       Py_ssize_t kw_args;
    7413           0 :       switch (__pyx_nargs) {
    7414           0 :         case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
    7415           0 :         CYTHON_FALLTHROUGH;
    7416           0 :         case  0: break;
    7417           0 :         default: goto __pyx_L5_argtuple_error;
    7418             :       }
    7419           0 :       kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
    7420           0 :       switch (__pyx_nargs) {
    7421           0 :         case  0:
    7422           0 :         if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_name)) != 0)) {
    7423           0 :           (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
    7424           0 :           kw_args--;
    7425             :         }
    7426           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 304, __pyx_L3_error)
    7427           0 :         else goto __pyx_L5_argtuple_error;
    7428             :       }
    7429           0 :       if (unlikely(kw_args > 0)) {
    7430           0 :         const Py_ssize_t kwd_pos_args = __pyx_nargs;
    7431           0 :         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(1, 304, __pyx_L3_error)
    7432             :       }
    7433          15 :     } else if (unlikely(__pyx_nargs != 1)) {
    7434           0 :       goto __pyx_L5_argtuple_error;
    7435             :     } else {
    7436          15 :       values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
    7437             :     }
    7438          15 :     __pyx_v_name = values[0];
    7439             :   }
    7440          15 :   goto __pyx_L6_skip;
    7441           0 :   __pyx_L5_argtuple_error:;
    7442           0 :   __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 304, __pyx_L3_error)
    7443          15 :   __pyx_L6_skip:;
    7444          15 :   goto __pyx_L4_argument_unpacking_done;
    7445           0 :   __pyx_L3_error:;
    7446             :   {
    7447           0 :     Py_ssize_t __pyx_temp;
    7448           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    7449             :       __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
    7450             :     }
    7451             :   }
    7452           0 :   __Pyx_AddTraceback("View.MemoryView.Enum.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
    7453           0 :   __Pyx_RefNannyFinishContext();
    7454           0 :   return -1;
    7455          15 :   __pyx_L4_argument_unpacking_done:;
    7456          15 :   __pyx_r = __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self), __pyx_v_name);
    7457             : 
    7458             :   /* function exit code */
    7459             :   {
    7460          15 :     Py_ssize_t __pyx_temp;
    7461          15 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    7462             :       __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
    7463             :     }
    7464             :   }
    7465             :   __Pyx_RefNannyFinishContext();
    7466             :   return __pyx_r;
    7467             : }
    7468             : 
    7469          15 : static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name) {
    7470          15 :   int __pyx_r;
    7471             :   __Pyx_RefNannyDeclarations
    7472          15 :   __Pyx_RefNannySetupContext("__init__", 1);
    7473             : 
    7474             :   /* "View.MemoryView":305
    7475             :  *     cdef object name
    7476             :  *     def __init__(self, name):
    7477             :  *         self.name = name             # <<<<<<<<<<<<<<
    7478             :  *     def __repr__(self):
    7479             :  *         return self.name
    7480             :  */
    7481          15 :   __Pyx_INCREF(__pyx_v_name);
    7482          15 :   __Pyx_GIVEREF(__pyx_v_name);
    7483          15 :   __Pyx_GOTREF(__pyx_v_self->name);
    7484          15 :   __Pyx_DECREF(__pyx_v_self->name);
    7485          15 :   __pyx_v_self->name = __pyx_v_name;
    7486             : 
    7487             :   /* "View.MemoryView":304
    7488             :  * cdef class Enum(object):
    7489             :  *     cdef object name
    7490             :  *     def __init__(self, name):             # <<<<<<<<<<<<<<
    7491             :  *         self.name = name
    7492             :  *     def __repr__(self):
    7493             :  */
    7494             : 
    7495             :   /* function exit code */
    7496          15 :   __pyx_r = 0;
    7497          15 :   __Pyx_RefNannyFinishContext();
    7498          15 :   return __pyx_r;
    7499             : }
    7500             : 
    7501             : /* "View.MemoryView":306
    7502             :  *     def __init__(self, name):
    7503             :  *         self.name = name
    7504             :  *     def __repr__(self):             # <<<<<<<<<<<<<<
    7505             :  *         return self.name
    7506             :  * 
    7507             :  */
    7508             : 
    7509             : /* Python wrapper */
    7510             : static PyObject *__pyx_MemviewEnum___repr__(PyObject *__pyx_v_self); /*proto*/
    7511           0 : static PyObject *__pyx_MemviewEnum___repr__(PyObject *__pyx_v_self) {
    7512           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    7513           0 :   PyObject *__pyx_r = 0;
    7514             :   __Pyx_RefNannyDeclarations
    7515           0 :   __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
    7516           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
    7517           0 :   __pyx_r = __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self));
    7518             : 
    7519             :   /* function exit code */
    7520           0 :   __Pyx_RefNannyFinishContext();
    7521           0 :   return __pyx_r;
    7522             : }
    7523             : 
    7524           0 : static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(struct __pyx_MemviewEnum_obj *__pyx_v_self) {
    7525           0 :   PyObject *__pyx_r = NULL;
    7526             :   __Pyx_RefNannyDeclarations
    7527           0 :   __Pyx_RefNannySetupContext("__repr__", 1);
    7528             : 
    7529             :   /* "View.MemoryView":307
    7530             :  *         self.name = name
    7531             :  *     def __repr__(self):
    7532             :  *         return self.name             # <<<<<<<<<<<<<<
    7533             :  * 
    7534             :  * cdef generic = Enum("<strided and direct or indirect>")
    7535             :  */
    7536           0 :   __Pyx_XDECREF(__pyx_r);
    7537           0 :   __Pyx_INCREF(__pyx_v_self->name);
    7538           0 :   __pyx_r = __pyx_v_self->name;
    7539           0 :   goto __pyx_L0;
    7540             : 
    7541             :   /* "View.MemoryView":306
    7542             :  *     def __init__(self, name):
    7543             :  *         self.name = name
    7544             :  *     def __repr__(self):             # <<<<<<<<<<<<<<
    7545             :  *         return self.name
    7546             :  * 
    7547             :  */
    7548             : 
    7549             :   /* function exit code */
    7550           0 :   __pyx_L0:;
    7551           0 :   __Pyx_XGIVEREF(__pyx_r);
    7552           0 :   __Pyx_RefNannyFinishContext();
    7553           0 :   return __pyx_r;
    7554             : }
    7555             : 
    7556             : /* "(tree fragment)":1
    7557             :  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
    7558             :  *     cdef tuple state
    7559             :  *     cdef object _dict
    7560             :  */
    7561             : 
    7562             : /* Python wrapper */
    7563             : static PyObject *__pyx_pw___pyx_MemviewEnum_1__reduce_cython__(PyObject *__pyx_v_self, 
    7564             : #if CYTHON_METH_FASTCALL
    7565             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    7566             : #else
    7567             : PyObject *__pyx_args, PyObject *__pyx_kwds
    7568             : #endif
    7569             : ); /*proto*/
    7570           0 : static PyObject *__pyx_pw___pyx_MemviewEnum_1__reduce_cython__(PyObject *__pyx_v_self, 
    7571             : #if CYTHON_METH_FASTCALL
    7572             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    7573             : #else
    7574             : PyObject *__pyx_args, PyObject *__pyx_kwds
    7575             : #endif
    7576             : ) {
    7577             :   #if !CYTHON_METH_FASTCALL
    7578             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
    7579             :   #endif
    7580           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    7581           0 :   PyObject *__pyx_r = 0;
    7582             :   __Pyx_RefNannyDeclarations
    7583           0 :   __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
    7584             :   #if !CYTHON_METH_FASTCALL
    7585             :   #if CYTHON_ASSUME_SAFE_MACROS
    7586             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
    7587             :   #else
    7588             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
    7589             :   #endif
    7590             :   #endif
    7591           0 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
    7592           0 :   if (unlikely(__pyx_nargs > 0)) {
    7593           0 :     __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
    7594           0 :   if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
    7595           0 :   __pyx_r = __pyx_pf___pyx_MemviewEnum___reduce_cython__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self));
    7596             : 
    7597             :   /* function exit code */
    7598           0 :   __Pyx_RefNannyFinishContext();
    7599           0 :   return __pyx_r;
    7600             : }
    7601             : 
    7602           0 : static PyObject *__pyx_pf___pyx_MemviewEnum___reduce_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self) {
    7603           0 :   PyObject *__pyx_v_state = 0;
    7604           0 :   PyObject *__pyx_v__dict = 0;
    7605           0 :   int __pyx_v_use_setstate;
    7606           0 :   PyObject *__pyx_r = NULL;
    7607             :   __Pyx_RefNannyDeclarations
    7608           0 :   PyObject *__pyx_t_1 = NULL;
    7609           0 :   int __pyx_t_2;
    7610           0 :   PyObject *__pyx_t_3 = NULL;
    7611           0 :   PyObject *__pyx_t_4 = NULL;
    7612           0 :   int __pyx_lineno = 0;
    7613           0 :   const char *__pyx_filename = NULL;
    7614           0 :   int __pyx_clineno = 0;
    7615           0 :   __Pyx_RefNannySetupContext("__reduce_cython__", 1);
    7616             : 
    7617             :   /* "(tree fragment)":5
    7618             :  *     cdef object _dict
    7619             :  *     cdef bint use_setstate
    7620             :  *     state = (self.name,)             # <<<<<<<<<<<<<<
    7621             :  *     _dict = getattr(self, '__dict__', None)
    7622             :  *     if _dict is not None:
    7623             :  */
    7624           0 :   __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    7625           0 :   __Pyx_GOTREF(__pyx_t_1);
    7626           0 :   __Pyx_INCREF(__pyx_v_self->name);
    7627           0 :   __Pyx_GIVEREF(__pyx_v_self->name);
    7628           0 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->name)) __PYX_ERR(1, 5, __pyx_L1_error);
    7629           0 :   __pyx_v_state = ((PyObject*)__pyx_t_1);
    7630           0 :   __pyx_t_1 = 0;
    7631             : 
    7632             :   /* "(tree fragment)":6
    7633             :  *     cdef bint use_setstate
    7634             :  *     state = (self.name,)
    7635             :  *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
    7636             :  *     if _dict is not None:
    7637             :  *         state += (_dict,)
    7638             :  */
    7639           0 :   __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
    7640           0 :   __Pyx_GOTREF(__pyx_t_1);
    7641           0 :   __pyx_v__dict = __pyx_t_1;
    7642           0 :   __pyx_t_1 = 0;
    7643             : 
    7644             :   /* "(tree fragment)":7
    7645             :  *     state = (self.name,)
    7646             :  *     _dict = getattr(self, '__dict__', None)
    7647             :  *     if _dict is not None:             # <<<<<<<<<<<<<<
    7648             :  *         state += (_dict,)
    7649             :  *         use_setstate = True
    7650             :  */
    7651           0 :   __pyx_t_2 = (__pyx_v__dict != Py_None);
    7652           0 :   if (__pyx_t_2) {
    7653             : 
    7654             :     /* "(tree fragment)":8
    7655             :  *     _dict = getattr(self, '__dict__', None)
    7656             :  *     if _dict is not None:
    7657             :  *         state += (_dict,)             # <<<<<<<<<<<<<<
    7658             :  *         use_setstate = True
    7659             :  *     else:
    7660             :  */
    7661           0 :     __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)
    7662           0 :     __Pyx_GOTREF(__pyx_t_1);
    7663           0 :     __Pyx_INCREF(__pyx_v__dict);
    7664           0 :     __Pyx_GIVEREF(__pyx_v__dict);
    7665           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict)) __PYX_ERR(1, 8, __pyx_L1_error);
    7666           0 :     __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 8, __pyx_L1_error)
    7667           0 :     __Pyx_GOTREF(__pyx_t_3);
    7668           0 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    7669           0 :     __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_3));
    7670           0 :     __pyx_t_3 = 0;
    7671             : 
    7672             :     /* "(tree fragment)":9
    7673             :  *     if _dict is not None:
    7674             :  *         state += (_dict,)
    7675             :  *         use_setstate = True             # <<<<<<<<<<<<<<
    7676             :  *     else:
    7677             :  *         use_setstate = self.name is not None
    7678             :  */
    7679           0 :     __pyx_v_use_setstate = 1;
    7680             : 
    7681             :     /* "(tree fragment)":7
    7682             :  *     state = (self.name,)
    7683             :  *     _dict = getattr(self, '__dict__', None)
    7684             :  *     if _dict is not None:             # <<<<<<<<<<<<<<
    7685             :  *         state += (_dict,)
    7686             :  *         use_setstate = True
    7687             :  */
    7688           0 :     goto __pyx_L3;
    7689             :   }
    7690             : 
    7691             :   /* "(tree fragment)":11
    7692             :  *         use_setstate = True
    7693             :  *     else:
    7694             :  *         use_setstate = self.name is not None             # <<<<<<<<<<<<<<
    7695             :  *     if use_setstate:
    7696             :  *         return __pyx_unpickle_Enum, (type(self), 0x82a3537, None), state
    7697             :  */
    7698             :   /*else*/ {
    7699           0 :     __pyx_t_2 = (__pyx_v_self->name != Py_None);
    7700           0 :     __pyx_v_use_setstate = __pyx_t_2;
    7701             :   }
    7702           0 :   __pyx_L3:;
    7703             : 
    7704             :   /* "(tree fragment)":12
    7705             :  *     else:
    7706             :  *         use_setstate = self.name is not None
    7707             :  *     if use_setstate:             # <<<<<<<<<<<<<<
    7708             :  *         return __pyx_unpickle_Enum, (type(self), 0x82a3537, None), state
    7709             :  *     else:
    7710             :  */
    7711           0 :   if (__pyx_v_use_setstate) {
    7712             : 
    7713             :     /* "(tree fragment)":13
    7714             :  *         use_setstate = self.name is not None
    7715             :  *     if use_setstate:
    7716             :  *         return __pyx_unpickle_Enum, (type(self), 0x82a3537, None), state             # <<<<<<<<<<<<<<
    7717             :  *     else:
    7718             :  *         return __pyx_unpickle_Enum, (type(self), 0x82a3537, state)
    7719             :  */
    7720           0 :     __Pyx_XDECREF(__pyx_r);
    7721           0 :     __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pyx_unpickle_Enum); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error)
    7722           0 :     __Pyx_GOTREF(__pyx_t_3);
    7723           0 :     __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    7724           0 :     __Pyx_GOTREF(__pyx_t_1);
    7725           0 :     __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    7726           0 :     __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    7727           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(1, 13, __pyx_L1_error);
    7728           0 :     __Pyx_INCREF(__pyx_int_136983863);
    7729           0 :     __Pyx_GIVEREF(__pyx_int_136983863);
    7730           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_136983863)) __PYX_ERR(1, 13, __pyx_L1_error);
    7731           0 :     __Pyx_INCREF(Py_None);
    7732           0 :     __Pyx_GIVEREF(Py_None);
    7733           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None)) __PYX_ERR(1, 13, __pyx_L1_error);
    7734           0 :     __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
    7735           0 :     __Pyx_GOTREF(__pyx_t_4);
    7736           0 :     __Pyx_GIVEREF(__pyx_t_3);
    7737           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error);
    7738           0 :     __Pyx_GIVEREF(__pyx_t_1);
    7739           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error);
    7740           0 :     __Pyx_INCREF(__pyx_v_state);
    7741           0 :     __Pyx_GIVEREF(__pyx_v_state);
    7742           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_state)) __PYX_ERR(1, 13, __pyx_L1_error);
    7743           0 :     __pyx_t_3 = 0;
    7744           0 :     __pyx_t_1 = 0;
    7745           0 :     __pyx_r = __pyx_t_4;
    7746           0 :     __pyx_t_4 = 0;
    7747           0 :     goto __pyx_L0;
    7748             : 
    7749             :     /* "(tree fragment)":12
    7750             :  *     else:
    7751             :  *         use_setstate = self.name is not None
    7752             :  *     if use_setstate:             # <<<<<<<<<<<<<<
    7753             :  *         return __pyx_unpickle_Enum, (type(self), 0x82a3537, None), state
    7754             :  *     else:
    7755             :  */
    7756             :   }
    7757             : 
    7758             :   /* "(tree fragment)":15
    7759             :  *         return __pyx_unpickle_Enum, (type(self), 0x82a3537, None), state
    7760             :  *     else:
    7761             :  *         return __pyx_unpickle_Enum, (type(self), 0x82a3537, state)             # <<<<<<<<<<<<<<
    7762             :  * def __setstate_cython__(self, __pyx_state):
    7763             :  *     __pyx_unpickle_Enum__set_state(self, __pyx_state)
    7764             :  */
    7765             :   /*else*/ {
    7766           0 :     __Pyx_XDECREF(__pyx_r);
    7767           0 :     __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_Enum); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
    7768           0 :     __Pyx_GOTREF(__pyx_t_4);
    7769           0 :     __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
    7770           0 :     __Pyx_GOTREF(__pyx_t_1);
    7771           0 :     __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    7772           0 :     __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    7773           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(1, 15, __pyx_L1_error);
    7774           0 :     __Pyx_INCREF(__pyx_int_136983863);
    7775           0 :     __Pyx_GIVEREF(__pyx_int_136983863);
    7776           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_136983863)) __PYX_ERR(1, 15, __pyx_L1_error);
    7777           0 :     __Pyx_INCREF(__pyx_v_state);
    7778           0 :     __Pyx_GIVEREF(__pyx_v_state);
    7779           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state)) __PYX_ERR(1, 15, __pyx_L1_error);
    7780           0 :     __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 15, __pyx_L1_error)
    7781           0 :     __Pyx_GOTREF(__pyx_t_3);
    7782           0 :     __Pyx_GIVEREF(__pyx_t_4);
    7783           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error);
    7784           0 :     __Pyx_GIVEREF(__pyx_t_1);
    7785           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error);
    7786           0 :     __pyx_t_4 = 0;
    7787           0 :     __pyx_t_1 = 0;
    7788           0 :     __pyx_r = __pyx_t_3;
    7789           0 :     __pyx_t_3 = 0;
    7790           0 :     goto __pyx_L0;
    7791             :   }
    7792             : 
    7793             :   /* "(tree fragment)":1
    7794             :  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
    7795             :  *     cdef tuple state
    7796             :  *     cdef object _dict
    7797             :  */
    7798             : 
    7799             :   /* function exit code */
    7800           0 :   __pyx_L1_error:;
    7801           0 :   __Pyx_XDECREF(__pyx_t_1);
    7802           0 :   __Pyx_XDECREF(__pyx_t_3);
    7803           0 :   __Pyx_XDECREF(__pyx_t_4);
    7804           0 :   __Pyx_AddTraceback("View.MemoryView.Enum.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
    7805           0 :   __pyx_r = NULL;
    7806           0 :   __pyx_L0:;
    7807           0 :   __Pyx_XDECREF(__pyx_v_state);
    7808           0 :   __Pyx_XDECREF(__pyx_v__dict);
    7809           0 :   __Pyx_XGIVEREF(__pyx_r);
    7810           0 :   __Pyx_RefNannyFinishContext();
    7811           0 :   return __pyx_r;
    7812             : }
    7813             : 
    7814             : /* "(tree fragment)":16
    7815             :  *     else:
    7816             :  *         return __pyx_unpickle_Enum, (type(self), 0x82a3537, state)
    7817             :  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
    7818             :  *     __pyx_unpickle_Enum__set_state(self, __pyx_state)
    7819             :  */
    7820             : 
    7821             : /* Python wrapper */
    7822             : static PyObject *__pyx_pw___pyx_MemviewEnum_3__setstate_cython__(PyObject *__pyx_v_self, 
    7823             : #if CYTHON_METH_FASTCALL
    7824             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    7825             : #else
    7826             : PyObject *__pyx_args, PyObject *__pyx_kwds
    7827             : #endif
    7828             : ); /*proto*/
    7829           0 : static PyObject *__pyx_pw___pyx_MemviewEnum_3__setstate_cython__(PyObject *__pyx_v_self, 
    7830             : #if CYTHON_METH_FASTCALL
    7831             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    7832             : #else
    7833             : PyObject *__pyx_args, PyObject *__pyx_kwds
    7834             : #endif
    7835             : ) {
    7836           0 :   PyObject *__pyx_v___pyx_state = 0;
    7837             :   #if !CYTHON_METH_FASTCALL
    7838             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
    7839             :   #endif
    7840           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    7841           0 :   PyObject* values[1] = {0};
    7842           0 :   int __pyx_lineno = 0;
    7843           0 :   const char *__pyx_filename = NULL;
    7844           0 :   int __pyx_clineno = 0;
    7845           0 :   PyObject *__pyx_r = 0;
    7846             :   __Pyx_RefNannyDeclarations
    7847           0 :   __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
    7848             :   #if !CYTHON_METH_FASTCALL
    7849             :   #if CYTHON_ASSUME_SAFE_MACROS
    7850             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
    7851             :   #else
    7852             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
    7853             :   #endif
    7854             :   #endif
    7855           0 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
    7856             :   {
    7857           0 :     PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    7858           0 :     if (__pyx_kwds) {
    7859           0 :       Py_ssize_t kw_args;
    7860           0 :       switch (__pyx_nargs) {
    7861           0 :         case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    7862           0 :         CYTHON_FALLTHROUGH;
    7863           0 :         case  0: break;
    7864           0 :         default: goto __pyx_L5_argtuple_error;
    7865             :       }
    7866           0 :       kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
    7867           0 :       switch (__pyx_nargs) {
    7868             :         case  0:
    7869           0 :         if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
    7870           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
    7871           0 :           kw_args--;
    7872             :         }
    7873           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 16, __pyx_L3_error)
    7874           0 :         else goto __pyx_L5_argtuple_error;
    7875             :       }
    7876           0 :       if (unlikely(kw_args > 0)) {
    7877           0 :         const Py_ssize_t kwd_pos_args = __pyx_nargs;
    7878           0 :         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 16, __pyx_L3_error)
    7879             :       }
    7880           0 :     } else if (unlikely(__pyx_nargs != 1)) {
    7881           0 :       goto __pyx_L5_argtuple_error;
    7882             :     } else {
    7883           0 :       values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    7884             :     }
    7885           0 :     __pyx_v___pyx_state = values[0];
    7886             :   }
    7887           0 :   goto __pyx_L6_skip;
    7888           0 :   __pyx_L5_argtuple_error:;
    7889           0 :   __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error)
    7890           0 :   __pyx_L6_skip:;
    7891           0 :   goto __pyx_L4_argument_unpacking_done;
    7892           0 :   __pyx_L3_error:;
    7893             :   {
    7894           0 :     Py_ssize_t __pyx_temp;
    7895           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    7896             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    7897             :     }
    7898             :   }
    7899           0 :   __Pyx_AddTraceback("View.MemoryView.Enum.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
    7900           0 :   __Pyx_RefNannyFinishContext();
    7901           0 :   return NULL;
    7902           0 :   __pyx_L4_argument_unpacking_done:;
    7903           0 :   __pyx_r = __pyx_pf___pyx_MemviewEnum_2__setstate_cython__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self), __pyx_v___pyx_state);
    7904             : 
    7905             :   /* function exit code */
    7906             :   {
    7907           0 :     Py_ssize_t __pyx_temp;
    7908           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    7909             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    7910             :     }
    7911             :   }
    7912             :   __Pyx_RefNannyFinishContext();
    7913             :   return __pyx_r;
    7914             : }
    7915             : 
    7916           0 : static PyObject *__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
    7917           0 :   PyObject *__pyx_r = NULL;
    7918             :   __Pyx_RefNannyDeclarations
    7919           0 :   PyObject *__pyx_t_1 = NULL;
    7920           0 :   int __pyx_lineno = 0;
    7921           0 :   const char *__pyx_filename = NULL;
    7922           0 :   int __pyx_clineno = 0;
    7923           0 :   __Pyx_RefNannySetupContext("__setstate_cython__", 1);
    7924             : 
    7925             :   /* "(tree fragment)":17
    7926             :  *         return __pyx_unpickle_Enum, (type(self), 0x82a3537, state)
    7927             :  * def __setstate_cython__(self, __pyx_state):
    7928             :  *     __pyx_unpickle_Enum__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
    7929             :  */
    7930           0 :   if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(1, 17, __pyx_L1_error)
    7931           0 :   __pyx_t_1 = __pyx_unpickle_Enum__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
    7932           0 :   __Pyx_GOTREF(__pyx_t_1);
    7933           0 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    7934             : 
    7935             :   /* "(tree fragment)":16
    7936             :  *     else:
    7937             :  *         return __pyx_unpickle_Enum, (type(self), 0x82a3537, state)
    7938             :  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
    7939             :  *     __pyx_unpickle_Enum__set_state(self, __pyx_state)
    7940             :  */
    7941             : 
    7942             :   /* function exit code */
    7943           0 :   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    7944           0 :   goto __pyx_L0;
    7945           0 :   __pyx_L1_error:;
    7946           0 :   __Pyx_XDECREF(__pyx_t_1);
    7947           0 :   __Pyx_AddTraceback("View.MemoryView.Enum.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
    7948           0 :   __pyx_r = NULL;
    7949           0 :   __pyx_L0:;
    7950           0 :   __Pyx_XGIVEREF(__pyx_r);
    7951           0 :   __Pyx_RefNannyFinishContext();
    7952           0 :   return __pyx_r;
    7953             : }
    7954             : 
    7955             : /* "View.MemoryView":349
    7956             :  *     cdef __Pyx_TypeInfo *typeinfo
    7957             :  * 
    7958             :  *     def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):             # <<<<<<<<<<<<<<
    7959             :  *         self.obj = obj
    7960             :  *         self.flags = flags
    7961             :  */
    7962             : 
    7963             : /* Python wrapper */
    7964             : static int __pyx_memoryview___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    7965         673 : static int __pyx_memoryview___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
    7966         673 :   PyObject *__pyx_v_obj = 0;
    7967         673 :   int __pyx_v_flags;
    7968         673 :   int __pyx_v_dtype_is_object;
    7969         673 :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
    7970         673 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    7971         673 :   PyObject* values[3] = {0,0,0};
    7972         673 :   int __pyx_lineno = 0;
    7973         673 :   const char *__pyx_filename = NULL;
    7974         673 :   int __pyx_clineno = 0;
    7975         673 :   int __pyx_r;
    7976             :   __Pyx_RefNannyDeclarations
    7977         673 :   __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
    7978             :   #if CYTHON_ASSUME_SAFE_MACROS
    7979         673 :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
    7980             :   #else
    7981             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
    7982             :   #endif
    7983         673 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
    7984             :   {
    7985         673 :     PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_flags,&__pyx_n_s_dtype_is_object,0};
    7986         673 :     if (__pyx_kwds) {
    7987           0 :       Py_ssize_t kw_args;
    7988           0 :       switch (__pyx_nargs) {
    7989           0 :         case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
    7990           0 :         CYTHON_FALLTHROUGH;
    7991           0 :         case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
    7992           0 :         CYTHON_FALLTHROUGH;
    7993           0 :         case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
    7994           0 :         CYTHON_FALLTHROUGH;
    7995           0 :         case  0: break;
    7996           0 :         default: goto __pyx_L5_argtuple_error;
    7997             :       }
    7998           0 :       kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
    7999           0 :       switch (__pyx_nargs) {
    8000           0 :         case  0:
    8001           0 :         if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) {
    8002           0 :           (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
    8003           0 :           kw_args--;
    8004             :         }
    8005           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 349, __pyx_L3_error)
    8006           0 :         else goto __pyx_L5_argtuple_error;
    8007           0 :         CYTHON_FALLTHROUGH;
    8008             :         case  1:
    8009           0 :         if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_flags)) != 0)) {
    8010           0 :           (void)__Pyx_Arg_NewRef_VARARGS(values[1]);
    8011           0 :           kw_args--;
    8012             :         }
    8013           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 349, __pyx_L3_error)
    8014             :         else {
    8015           0 :           __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, 1); __PYX_ERR(1, 349, __pyx_L3_error)
    8016             :         }
    8017           0 :         CYTHON_FALLTHROUGH;
    8018             :         case  2:
    8019           0 :         if (kw_args > 0) {
    8020           0 :           PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_dtype_is_object);
    8021           0 :           if (value) { values[2] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
    8022           0 :           else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 349, __pyx_L3_error)
    8023             :         }
    8024             :       }
    8025           0 :       if (unlikely(kw_args > 0)) {
    8026           0 :         const Py_ssize_t kwd_pos_args = __pyx_nargs;
    8027           0 :         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__cinit__") < 0)) __PYX_ERR(1, 349, __pyx_L3_error)
    8028             :       }
    8029             :     } else {
    8030         673 :       switch (__pyx_nargs) {
    8031         673 :         case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
    8032         673 :         CYTHON_FALLTHROUGH;
    8033         673 :         case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
    8034         673 :         values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
    8035         673 :         break;
    8036           0 :         default: goto __pyx_L5_argtuple_error;
    8037             :       }
    8038             :     }
    8039         673 :     __pyx_v_obj = values[0];
    8040         673 :     __pyx_v_flags = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_flags == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 349, __pyx_L3_error)
    8041         673 :     if (values[2]) {
    8042         673 :       __pyx_v_dtype_is_object = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_dtype_is_object == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 349, __pyx_L3_error)
    8043             :     } else {
    8044             :       __pyx_v_dtype_is_object = ((int)0);
    8045             :     }
    8046             :   }
    8047         673 :   goto __pyx_L6_skip;
    8048           0 :   __pyx_L5_argtuple_error:;
    8049           0 :   __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, __pyx_nargs); __PYX_ERR(1, 349, __pyx_L3_error)
    8050         673 :   __pyx_L6_skip:;
    8051         673 :   goto __pyx_L4_argument_unpacking_done;
    8052           0 :   __pyx_L3_error:;
    8053             :   {
    8054           0 :     Py_ssize_t __pyx_temp;
    8055           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    8056             :       __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
    8057             :     }
    8058             :   }
    8059           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
    8060           0 :   __Pyx_RefNannyFinishContext();
    8061           0 :   return -1;
    8062         673 :   __pyx_L4_argument_unpacking_done:;
    8063         673 :   __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_obj, __pyx_v_flags, __pyx_v_dtype_is_object);
    8064             : 
    8065             :   /* function exit code */
    8066             :   {
    8067         673 :     Py_ssize_t __pyx_temp;
    8068         673 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    8069             :       __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
    8070             :     }
    8071             :   }
    8072             :   __Pyx_RefNannyFinishContext();
    8073             :   return __pyx_r;
    8074             : }
    8075             : 
    8076         673 : static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_v_flags, int __pyx_v_dtype_is_object) {
    8077         673 :   int __pyx_r;
    8078             :   __Pyx_RefNannyDeclarations
    8079         673 :   int __pyx_t_1;
    8080         673 :   int __pyx_t_2;
    8081         673 :   int __pyx_t_3;
    8082         673 :   Py_intptr_t __pyx_t_4;
    8083         673 :   size_t __pyx_t_5;
    8084         673 :   int __pyx_lineno = 0;
    8085         673 :   const char *__pyx_filename = NULL;
    8086         673 :   int __pyx_clineno = 0;
    8087         673 :   __Pyx_RefNannySetupContext("__cinit__", 1);
    8088             : 
    8089             :   /* "View.MemoryView":350
    8090             :  * 
    8091             :  *     def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):
    8092             :  *         self.obj = obj             # <<<<<<<<<<<<<<
    8093             :  *         self.flags = flags
    8094             :  *         if type(self) is memoryview or obj is not None:
    8095             :  */
    8096         673 :   __Pyx_INCREF(__pyx_v_obj);
    8097         673 :   __Pyx_GIVEREF(__pyx_v_obj);
    8098         673 :   __Pyx_GOTREF(__pyx_v_self->obj);
    8099         673 :   __Pyx_DECREF(__pyx_v_self->obj);
    8100         673 :   __pyx_v_self->obj = __pyx_v_obj;
    8101             : 
    8102             :   /* "View.MemoryView":351
    8103             :  *     def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):
    8104             :  *         self.obj = obj
    8105             :  *         self.flags = flags             # <<<<<<<<<<<<<<
    8106             :  *         if type(self) is memoryview or obj is not None:
    8107             :  *             __Pyx_GetBuffer(obj, &self.view, flags)
    8108             :  */
    8109         673 :   __pyx_v_self->flags = __pyx_v_flags;
    8110             : 
    8111             :   /* "View.MemoryView":352
    8112             :  *         self.obj = obj
    8113             :  *         self.flags = flags
    8114             :  *         if type(self) is memoryview or obj is not None:             # <<<<<<<<<<<<<<
    8115             :  *             __Pyx_GetBuffer(obj, &self.view, flags)
    8116             :  *             if <PyObject *> self.view.obj == NULL:
    8117             :  */
    8118         673 :   __pyx_t_2 = (((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))) == ((PyObject *)__pyx_memoryview_type));
    8119         673 :   if (!__pyx_t_2) {
    8120          94 :   } else {
    8121         579 :     __pyx_t_1 = __pyx_t_2;
    8122         579 :     goto __pyx_L4_bool_binop_done;
    8123             :   }
    8124          94 :   __pyx_t_2 = (__pyx_v_obj != Py_None);
    8125          94 :   __pyx_t_1 = __pyx_t_2;
    8126         673 :   __pyx_L4_bool_binop_done:;
    8127         673 :   if (__pyx_t_1) {
    8128             : 
    8129             :     /* "View.MemoryView":353
    8130             :  *         self.flags = flags
    8131             :  *         if type(self) is memoryview or obj is not None:
    8132             :  *             __Pyx_GetBuffer(obj, &self.view, flags)             # <<<<<<<<<<<<<<
    8133             :  *             if <PyObject *> self.view.obj == NULL:
    8134             :  *                 (<__pyx_buffer *> &self.view).obj = Py_None
    8135             :  */
    8136         579 :     __pyx_t_3 = __Pyx_GetBuffer(__pyx_v_obj, (&__pyx_v_self->view), __pyx_v_flags); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 353, __pyx_L1_error)
    8137             : 
    8138             :     /* "View.MemoryView":354
    8139             :  *         if type(self) is memoryview or obj is not None:
    8140             :  *             __Pyx_GetBuffer(obj, &self.view, flags)
    8141             :  *             if <PyObject *> self.view.obj == NULL:             # <<<<<<<<<<<<<<
    8142             :  *                 (<__pyx_buffer *> &self.view).obj = Py_None
    8143             :  *                 Py_INCREF(Py_None)
    8144             :  */
    8145         579 :     __pyx_t_1 = (((PyObject *)__pyx_v_self->view.obj) == NULL);
    8146         579 :     if (__pyx_t_1) {
    8147             : 
    8148             :       /* "View.MemoryView":355
    8149             :  *             __Pyx_GetBuffer(obj, &self.view, flags)
    8150             :  *             if <PyObject *> self.view.obj == NULL:
    8151             :  *                 (<__pyx_buffer *> &self.view).obj = Py_None             # <<<<<<<<<<<<<<
    8152             :  *                 Py_INCREF(Py_None)
    8153             :  * 
    8154             :  */
    8155           0 :       ((Py_buffer *)(&__pyx_v_self->view))->obj = Py_None;
    8156             : 
    8157             :       /* "View.MemoryView":356
    8158             :  *             if <PyObject *> self.view.obj == NULL:
    8159             :  *                 (<__pyx_buffer *> &self.view).obj = Py_None
    8160             :  *                 Py_INCREF(Py_None)             # <<<<<<<<<<<<<<
    8161             :  * 
    8162             :  *         if not __PYX_CYTHON_ATOMICS_ENABLED():
    8163             :  */
    8164           0 :       Py_INCREF(Py_None);
    8165             : 
    8166             :       /* "View.MemoryView":354
    8167             :  *         if type(self) is memoryview or obj is not None:
    8168             :  *             __Pyx_GetBuffer(obj, &self.view, flags)
    8169             :  *             if <PyObject *> self.view.obj == NULL:             # <<<<<<<<<<<<<<
    8170             :  *                 (<__pyx_buffer *> &self.view).obj = Py_None
    8171             :  *                 Py_INCREF(Py_None)
    8172             :  */
    8173             :     }
    8174             : 
    8175             :     /* "View.MemoryView":352
    8176             :  *         self.obj = obj
    8177             :  *         self.flags = flags
    8178             :  *         if type(self) is memoryview or obj is not None:             # <<<<<<<<<<<<<<
    8179             :  *             __Pyx_GetBuffer(obj, &self.view, flags)
    8180             :  *             if <PyObject *> self.view.obj == NULL:
    8181             :  */
    8182             :   }
    8183             : 
    8184             :   /* "View.MemoryView":358
    8185             :  *                 Py_INCREF(Py_None)
    8186             :  * 
    8187             :  *         if not __PYX_CYTHON_ATOMICS_ENABLED():             # <<<<<<<<<<<<<<
    8188             :  *             global __pyx_memoryview_thread_locks_used
    8189             :  *             if __pyx_memoryview_thread_locks_used < 8:
    8190             :  */
    8191         673 :   __pyx_t_1 = (!__PYX_CYTHON_ATOMICS_ENABLED());
    8192         673 :   if (__pyx_t_1) {
    8193             : 
    8194             :     /* "View.MemoryView":360
    8195             :  *         if not __PYX_CYTHON_ATOMICS_ENABLED():
    8196             :  *             global __pyx_memoryview_thread_locks_used
    8197             :  *             if __pyx_memoryview_thread_locks_used < 8:             # <<<<<<<<<<<<<<
    8198             :  *                 self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
    8199             :  *                 __pyx_memoryview_thread_locks_used += 1
    8200             :  */
    8201             :     __pyx_t_1 = (__pyx_memoryview_thread_locks_used < 8);
    8202             :     if (__pyx_t_1) {
    8203             : 
    8204             :       /* "View.MemoryView":361
    8205             :  *             global __pyx_memoryview_thread_locks_used
    8206             :  *             if __pyx_memoryview_thread_locks_used < 8:
    8207             :  *                 self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]             # <<<<<<<<<<<<<<
    8208             :  *                 __pyx_memoryview_thread_locks_used += 1
    8209             :  *             if self.lock is NULL:
    8210             :  */
    8211             :       __pyx_v_self->lock = (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]);
    8212             : 
    8213             :       /* "View.MemoryView":362
    8214             :  *             if __pyx_memoryview_thread_locks_used < 8:
    8215             :  *                 self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
    8216             :  *                 __pyx_memoryview_thread_locks_used += 1             # <<<<<<<<<<<<<<
    8217             :  *             if self.lock is NULL:
    8218             :  *                 self.lock = PyThread_allocate_lock()
    8219             :  */
    8220             :       __pyx_memoryview_thread_locks_used = (__pyx_memoryview_thread_locks_used + 1);
    8221             : 
    8222             :       /* "View.MemoryView":360
    8223             :  *         if not __PYX_CYTHON_ATOMICS_ENABLED():
    8224             :  *             global __pyx_memoryview_thread_locks_used
    8225             :  *             if __pyx_memoryview_thread_locks_used < 8:             # <<<<<<<<<<<<<<
    8226             :  *                 self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
    8227             :  *                 __pyx_memoryview_thread_locks_used += 1
    8228             :  */
    8229             :     }
    8230             : 
    8231             :     /* "View.MemoryView":363
    8232             :  *                 self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
    8233             :  *                 __pyx_memoryview_thread_locks_used += 1
    8234             :  *             if self.lock is NULL:             # <<<<<<<<<<<<<<
    8235             :  *                 self.lock = PyThread_allocate_lock()
    8236             :  *                 if self.lock is NULL:
    8237             :  */
    8238             :     __pyx_t_1 = (__pyx_v_self->lock == NULL);
    8239             :     if (__pyx_t_1) {
    8240             : 
    8241             :       /* "View.MemoryView":364
    8242             :  *                 __pyx_memoryview_thread_locks_used += 1
    8243             :  *             if self.lock is NULL:
    8244             :  *                 self.lock = PyThread_allocate_lock()             # <<<<<<<<<<<<<<
    8245             :  *                 if self.lock is NULL:
    8246             :  *                     raise MemoryError
    8247             :  */
    8248             :       __pyx_v_self->lock = PyThread_allocate_lock();
    8249             : 
    8250             :       /* "View.MemoryView":365
    8251             :  *             if self.lock is NULL:
    8252             :  *                 self.lock = PyThread_allocate_lock()
    8253             :  *                 if self.lock is NULL:             # <<<<<<<<<<<<<<
    8254             :  *                     raise MemoryError
    8255             :  * 
    8256             :  */
    8257             :       __pyx_t_1 = (__pyx_v_self->lock == NULL);
    8258             :       if (unlikely(__pyx_t_1)) {
    8259             : 
    8260             :         /* "View.MemoryView":366
    8261             :  *                 self.lock = PyThread_allocate_lock()
    8262             :  *                 if self.lock is NULL:
    8263             :  *                     raise MemoryError             # <<<<<<<<<<<<<<
    8264             :  * 
    8265             :  *         if flags & PyBUF_FORMAT:
    8266             :  */
    8267             :         PyErr_NoMemory(); __PYX_ERR(1, 366, __pyx_L1_error)
    8268             : 
    8269             :         /* "View.MemoryView":365
    8270             :  *             if self.lock is NULL:
    8271             :  *                 self.lock = PyThread_allocate_lock()
    8272             :  *                 if self.lock is NULL:             # <<<<<<<<<<<<<<
    8273             :  *                     raise MemoryError
    8274             :  * 
    8275             :  */
    8276             :       }
    8277             : 
    8278             :       /* "View.MemoryView":363
    8279             :  *                 self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
    8280             :  *                 __pyx_memoryview_thread_locks_used += 1
    8281             :  *             if self.lock is NULL:             # <<<<<<<<<<<<<<
    8282             :  *                 self.lock = PyThread_allocate_lock()
    8283             :  *                 if self.lock is NULL:
    8284             :  */
    8285             :     }
    8286             : 
    8287             :     /* "View.MemoryView":358
    8288             :  *                 Py_INCREF(Py_None)
    8289             :  * 
    8290             :  *         if not __PYX_CYTHON_ATOMICS_ENABLED():             # <<<<<<<<<<<<<<
    8291             :  *             global __pyx_memoryview_thread_locks_used
    8292             :  *             if __pyx_memoryview_thread_locks_used < 8:
    8293             :  */
    8294             :   }
    8295             : 
    8296             :   /* "View.MemoryView":368
    8297             :  *                     raise MemoryError
    8298             :  * 
    8299             :  *         if flags & PyBUF_FORMAT:             # <<<<<<<<<<<<<<
    8300             :  *             self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')
    8301             :  *         else:
    8302             :  */
    8303         673 :   __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
    8304         673 :   if (__pyx_t_1) {
    8305             : 
    8306             :     /* "View.MemoryView":369
    8307             :  * 
    8308             :  *         if flags & PyBUF_FORMAT:
    8309             :  *             self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')             # <<<<<<<<<<<<<<
    8310             :  *         else:
    8311             :  *             self.dtype_is_object = dtype_is_object
    8312             :  */
    8313         579 :     __pyx_t_2 = ((__pyx_v_self->view.format[0]) == 'O');
    8314         579 :     if (__pyx_t_2) {
    8315           0 :     } else {
    8316         579 :       __pyx_t_1 = __pyx_t_2;
    8317         579 :       goto __pyx_L12_bool_binop_done;
    8318             :     }
    8319           0 :     __pyx_t_2 = ((__pyx_v_self->view.format[1]) == '\x00');
    8320           0 :     __pyx_t_1 = __pyx_t_2;
    8321         579 :     __pyx_L12_bool_binop_done:;
    8322         579 :     __pyx_v_self->dtype_is_object = __pyx_t_1;
    8323             : 
    8324             :     /* "View.MemoryView":368
    8325             :  *                     raise MemoryError
    8326             :  * 
    8327             :  *         if flags & PyBUF_FORMAT:             # <<<<<<<<<<<<<<
    8328             :  *             self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')
    8329             :  *         else:
    8330             :  */
    8331         579 :     goto __pyx_L11;
    8332             :   }
    8333             : 
    8334             :   /* "View.MemoryView":371
    8335             :  *             self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')
    8336             :  *         else:
    8337             :  *             self.dtype_is_object = dtype_is_object             # <<<<<<<<<<<<<<
    8338             :  * 
    8339             :  *         assert <Py_intptr_t><void*>(&self.acquisition_count) % sizeof(__pyx_atomic_int_type) == 0
    8340             :  */
    8341             :   /*else*/ {
    8342          94 :     __pyx_v_self->dtype_is_object = __pyx_v_dtype_is_object;
    8343             :   }
    8344         673 :   __pyx_L11:;
    8345             : 
    8346             :   /* "View.MemoryView":373
    8347             :  *             self.dtype_is_object = dtype_is_object
    8348             :  * 
    8349             :  *         assert <Py_intptr_t><void*>(&self.acquisition_count) % sizeof(__pyx_atomic_int_type) == 0             # <<<<<<<<<<<<<<
    8350             :  *         self.typeinfo = NULL
    8351             :  * 
    8352             :  */
    8353             :   #ifndef CYTHON_WITHOUT_ASSERTIONS
    8354         673 :   if (unlikely(__pyx_assertions_enabled())) {
    8355         673 :     __pyx_t_4 = ((Py_intptr_t)((void *)(&__pyx_v_self->acquisition_count)));
    8356         673 :     __pyx_t_5 = (sizeof(__pyx_atomic_int_type));
    8357         673 :     if (unlikely(__pyx_t_5 == 0)) {
    8358             :       PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
    8359             :       __PYX_ERR(1, 373, __pyx_L1_error)
    8360             :     }
    8361         673 :     __pyx_t_1 = ((__pyx_t_4 % __pyx_t_5) == 0);
    8362         673 :     if (unlikely(!__pyx_t_1)) {
    8363           0 :       __Pyx_Raise(__pyx_builtin_AssertionError, 0, 0, 0);
    8364           0 :       __PYX_ERR(1, 373, __pyx_L1_error)
    8365             :     }
    8366             :   }
    8367             :   #else
    8368             :   if ((1)); else __PYX_ERR(1, 373, __pyx_L1_error)
    8369             :   #endif
    8370             : 
    8371             :   /* "View.MemoryView":374
    8372             :  * 
    8373             :  *         assert <Py_intptr_t><void*>(&self.acquisition_count) % sizeof(__pyx_atomic_int_type) == 0
    8374             :  *         self.typeinfo = NULL             # <<<<<<<<<<<<<<
    8375             :  * 
    8376             :  *     def __dealloc__(memoryview self):
    8377             :  */
    8378         673 :   __pyx_v_self->typeinfo = NULL;
    8379             : 
    8380             :   /* "View.MemoryView":349
    8381             :  *     cdef __Pyx_TypeInfo *typeinfo
    8382             :  * 
    8383             :  *     def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):             # <<<<<<<<<<<<<<
    8384             :  *         self.obj = obj
    8385             :  *         self.flags = flags
    8386             :  */
    8387             : 
    8388             :   /* function exit code */
    8389         673 :   __pyx_r = 0;
    8390         673 :   goto __pyx_L0;
    8391           0 :   __pyx_L1_error:;
    8392           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
    8393           0 :   __pyx_r = -1;
    8394         673 :   __pyx_L0:;
    8395         673 :   __Pyx_RefNannyFinishContext();
    8396         673 :   return __pyx_r;
    8397             : }
    8398             : 
    8399             : /* "View.MemoryView":376
    8400             :  *         self.typeinfo = NULL
    8401             :  * 
    8402             :  *     def __dealloc__(memoryview self):             # <<<<<<<<<<<<<<
    8403             :  *         if self.obj is not None:
    8404             :  *             __Pyx_ReleaseBuffer(&self.view)
    8405             :  */
    8406             : 
    8407             : /* Python wrapper */
    8408             : static void __pyx_memoryview___dealloc__(PyObject *__pyx_v_self); /*proto*/
    8409         673 : static void __pyx_memoryview___dealloc__(PyObject *__pyx_v_self) {
    8410         673 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    8411             :   __Pyx_RefNannyDeclarations
    8412         673 :   __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
    8413         673 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
    8414         673 :   __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(((struct __pyx_memoryview_obj *)__pyx_v_self));
    8415             : 
    8416             :   /* function exit code */
    8417         673 :   __Pyx_RefNannyFinishContext();
    8418             : }
    8419             : 
    8420         673 : static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(struct __pyx_memoryview_obj *__pyx_v_self) {
    8421         673 :   int __pyx_v_i;
    8422         673 :   int __pyx_t_1;
    8423         673 :   int __pyx_t_2;
    8424         673 :   int __pyx_t_3;
    8425         673 :   int __pyx_t_4;
    8426         673 :   PyThread_type_lock __pyx_t_5;
    8427         673 :   PyThread_type_lock __pyx_t_6;
    8428             : 
    8429             :   /* "View.MemoryView":377
    8430             :  * 
    8431             :  *     def __dealloc__(memoryview self):
    8432             :  *         if self.obj is not None:             # <<<<<<<<<<<<<<
    8433             :  *             __Pyx_ReleaseBuffer(&self.view)
    8434             :  *         elif (<__pyx_buffer *> &self.view).obj == Py_None:
    8435             :  */
    8436         673 :   __pyx_t_1 = (__pyx_v_self->obj != Py_None);
    8437         673 :   if (__pyx_t_1) {
    8438             : 
    8439             :     /* "View.MemoryView":378
    8440             :  *     def __dealloc__(memoryview self):
    8441             :  *         if self.obj is not None:
    8442             :  *             __Pyx_ReleaseBuffer(&self.view)             # <<<<<<<<<<<<<<
    8443             :  *         elif (<__pyx_buffer *> &self.view).obj == Py_None:
    8444             :  * 
    8445             :  */
    8446         579 :     __Pyx_ReleaseBuffer((&__pyx_v_self->view));
    8447             : 
    8448             :     /* "View.MemoryView":377
    8449             :  * 
    8450             :  *     def __dealloc__(memoryview self):
    8451             :  *         if self.obj is not None:             # <<<<<<<<<<<<<<
    8452             :  *             __Pyx_ReleaseBuffer(&self.view)
    8453             :  *         elif (<__pyx_buffer *> &self.view).obj == Py_None:
    8454             :  */
    8455         579 :     goto __pyx_L3;
    8456             :   }
    8457             : 
    8458             :   /* "View.MemoryView":379
    8459             :  *         if self.obj is not None:
    8460             :  *             __Pyx_ReleaseBuffer(&self.view)
    8461             :  *         elif (<__pyx_buffer *> &self.view).obj == Py_None:             # <<<<<<<<<<<<<<
    8462             :  * 
    8463             :  *             (<__pyx_buffer *> &self.view).obj = NULL
    8464             :  */
    8465          94 :   __pyx_t_1 = (((Py_buffer *)(&__pyx_v_self->view))->obj == Py_None);
    8466          94 :   if (__pyx_t_1) {
    8467             : 
    8468             :     /* "View.MemoryView":381
    8469             :  *         elif (<__pyx_buffer *> &self.view).obj == Py_None:
    8470             :  * 
    8471             :  *             (<__pyx_buffer *> &self.view).obj = NULL             # <<<<<<<<<<<<<<
    8472             :  *             Py_DECREF(Py_None)
    8473             :  * 
    8474             :  */
    8475          94 :     ((Py_buffer *)(&__pyx_v_self->view))->obj = NULL;
    8476             : 
    8477             :     /* "View.MemoryView":382
    8478             :  * 
    8479             :  *             (<__pyx_buffer *> &self.view).obj = NULL
    8480             :  *             Py_DECREF(Py_None)             # <<<<<<<<<<<<<<
    8481             :  * 
    8482             :  *         cdef int i
    8483             :  */
    8484          94 :     Py_DECREF(Py_None);
    8485             : 
    8486             :     /* "View.MemoryView":379
    8487             :  *         if self.obj is not None:
    8488             :  *             __Pyx_ReleaseBuffer(&self.view)
    8489             :  *         elif (<__pyx_buffer *> &self.view).obj == Py_None:             # <<<<<<<<<<<<<<
    8490             :  * 
    8491             :  *             (<__pyx_buffer *> &self.view).obj = NULL
    8492             :  */
    8493             :   }
    8494           0 :   __pyx_L3:;
    8495             : 
    8496             :   /* "View.MemoryView":386
    8497             :  *         cdef int i
    8498             :  *         global __pyx_memoryview_thread_locks_used
    8499             :  *         if self.lock != NULL:             # <<<<<<<<<<<<<<
    8500             :  *             for i in range(__pyx_memoryview_thread_locks_used):
    8501             :  *                 if __pyx_memoryview_thread_locks[i] is self.lock:
    8502             :  */
    8503         673 :   __pyx_t_1 = (__pyx_v_self->lock != NULL);
    8504         673 :   if (__pyx_t_1) {
    8505             : 
    8506             :     /* "View.MemoryView":387
    8507             :  *         global __pyx_memoryview_thread_locks_used
    8508             :  *         if self.lock != NULL:
    8509             :  *             for i in range(__pyx_memoryview_thread_locks_used):             # <<<<<<<<<<<<<<
    8510             :  *                 if __pyx_memoryview_thread_locks[i] is self.lock:
    8511             :  *                     __pyx_memoryview_thread_locks_used -= 1
    8512             :  */
    8513           0 :     __pyx_t_2 = __pyx_memoryview_thread_locks_used;
    8514           0 :     __pyx_t_3 = __pyx_t_2;
    8515           0 :     for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    8516           0 :       __pyx_v_i = __pyx_t_4;
    8517             : 
    8518             :       /* "View.MemoryView":388
    8519             :  *         if self.lock != NULL:
    8520             :  *             for i in range(__pyx_memoryview_thread_locks_used):
    8521             :  *                 if __pyx_memoryview_thread_locks[i] is self.lock:             # <<<<<<<<<<<<<<
    8522             :  *                     __pyx_memoryview_thread_locks_used -= 1
    8523             :  *                     if i != __pyx_memoryview_thread_locks_used:
    8524             :  */
    8525           0 :       __pyx_t_1 = ((__pyx_memoryview_thread_locks[__pyx_v_i]) == __pyx_v_self->lock);
    8526           0 :       if (__pyx_t_1) {
    8527             : 
    8528             :         /* "View.MemoryView":389
    8529             :  *             for i in range(__pyx_memoryview_thread_locks_used):
    8530             :  *                 if __pyx_memoryview_thread_locks[i] is self.lock:
    8531             :  *                     __pyx_memoryview_thread_locks_used -= 1             # <<<<<<<<<<<<<<
    8532             :  *                     if i != __pyx_memoryview_thread_locks_used:
    8533             :  *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
    8534             :  */
    8535           0 :         __pyx_memoryview_thread_locks_used = (__pyx_memoryview_thread_locks_used - 1);
    8536             : 
    8537             :         /* "View.MemoryView":390
    8538             :  *                 if __pyx_memoryview_thread_locks[i] is self.lock:
    8539             :  *                     __pyx_memoryview_thread_locks_used -= 1
    8540             :  *                     if i != __pyx_memoryview_thread_locks_used:             # <<<<<<<<<<<<<<
    8541             :  *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
    8542             :  *                             __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
    8543             :  */
    8544           0 :         __pyx_t_1 = (__pyx_v_i != __pyx_memoryview_thread_locks_used);
    8545           0 :         if (__pyx_t_1) {
    8546             : 
    8547             :           /* "View.MemoryView":392
    8548             :  *                     if i != __pyx_memoryview_thread_locks_used:
    8549             :  *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
    8550             :  *                             __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])             # <<<<<<<<<<<<<<
    8551             :  *                     break
    8552             :  *             else:
    8553             :  */
    8554           0 :           __pyx_t_5 = (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]);
    8555           0 :           __pyx_t_6 = (__pyx_memoryview_thread_locks[__pyx_v_i]);
    8556             : 
    8557             :           /* "View.MemoryView":391
    8558             :  *                     __pyx_memoryview_thread_locks_used -= 1
    8559             :  *                     if i != __pyx_memoryview_thread_locks_used:
    8560             :  *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (             # <<<<<<<<<<<<<<
    8561             :  *                             __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
    8562             :  *                     break
    8563             :  */
    8564           0 :           (__pyx_memoryview_thread_locks[__pyx_v_i]) = __pyx_t_5;
    8565           0 :           (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]) = __pyx_t_6;
    8566             : 
    8567             :           /* "View.MemoryView":390
    8568             :  *                 if __pyx_memoryview_thread_locks[i] is self.lock:
    8569             :  *                     __pyx_memoryview_thread_locks_used -= 1
    8570             :  *                     if i != __pyx_memoryview_thread_locks_used:             # <<<<<<<<<<<<<<
    8571             :  *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
    8572             :  *                             __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
    8573             :  */
    8574             :         }
    8575             : 
    8576             :         /* "View.MemoryView":393
    8577             :  *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
    8578             :  *                             __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
    8579             :  *                     break             # <<<<<<<<<<<<<<
    8580             :  *             else:
    8581             :  *                 PyThread_free_lock(self.lock)
    8582             :  */
    8583           0 :         goto __pyx_L6_break;
    8584             : 
    8585             :         /* "View.MemoryView":388
    8586             :  *         if self.lock != NULL:
    8587             :  *             for i in range(__pyx_memoryview_thread_locks_used):
    8588             :  *                 if __pyx_memoryview_thread_locks[i] is self.lock:             # <<<<<<<<<<<<<<
    8589             :  *                     __pyx_memoryview_thread_locks_used -= 1
    8590             :  *                     if i != __pyx_memoryview_thread_locks_used:
    8591             :  */
    8592             :       }
    8593             :     }
    8594             :     /*else*/ {
    8595             : 
    8596             :       /* "View.MemoryView":395
    8597             :  *                     break
    8598             :  *             else:
    8599             :  *                 PyThread_free_lock(self.lock)             # <<<<<<<<<<<<<<
    8600             :  * 
    8601             :  *     cdef char *get_item_pointer(memoryview self, object index) except NULL:
    8602             :  */
    8603           0 :       PyThread_free_lock(__pyx_v_self->lock);
    8604             :     }
    8605         673 :     __pyx_L6_break:;
    8606             : 
    8607             :     /* "View.MemoryView":386
    8608             :  *         cdef int i
    8609             :  *         global __pyx_memoryview_thread_locks_used
    8610             :  *         if self.lock != NULL:             # <<<<<<<<<<<<<<
    8611             :  *             for i in range(__pyx_memoryview_thread_locks_used):
    8612             :  *                 if __pyx_memoryview_thread_locks[i] is self.lock:
    8613             :  */
    8614             :   }
    8615             : 
    8616             :   /* "View.MemoryView":376
    8617             :  *         self.typeinfo = NULL
    8618             :  * 
    8619             :  *     def __dealloc__(memoryview self):             # <<<<<<<<<<<<<<
    8620             :  *         if self.obj is not None:
    8621             :  *             __Pyx_ReleaseBuffer(&self.view)
    8622             :  */
    8623             : 
    8624             :   /* function exit code */
    8625         673 : }
    8626             : 
    8627             : /* "View.MemoryView":397
    8628             :  *                 PyThread_free_lock(self.lock)
    8629             :  * 
    8630             :  *     cdef char *get_item_pointer(memoryview self, object index) except NULL:             # <<<<<<<<<<<<<<
    8631             :  *         cdef Py_ssize_t dim
    8632             :  *         cdef char *itemp = <char *> self.view.buf
    8633             :  */
    8634             : 
    8635           0 : static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index) {
    8636           0 :   Py_ssize_t __pyx_v_dim;
    8637           0 :   char *__pyx_v_itemp;
    8638           0 :   PyObject *__pyx_v_idx = NULL;
    8639           0 :   char *__pyx_r;
    8640             :   __Pyx_RefNannyDeclarations
    8641           0 :   Py_ssize_t __pyx_t_1;
    8642           0 :   PyObject *__pyx_t_2 = NULL;
    8643           0 :   Py_ssize_t __pyx_t_3;
    8644           0 :   PyObject *(*__pyx_t_4)(PyObject *);
    8645           0 :   PyObject *__pyx_t_5 = NULL;
    8646           0 :   Py_ssize_t __pyx_t_6;
    8647           0 :   char *__pyx_t_7;
    8648           0 :   int __pyx_lineno = 0;
    8649           0 :   const char *__pyx_filename = NULL;
    8650           0 :   int __pyx_clineno = 0;
    8651           0 :   __Pyx_RefNannySetupContext("get_item_pointer", 1);
    8652             : 
    8653             :   /* "View.MemoryView":399
    8654             :  *     cdef char *get_item_pointer(memoryview self, object index) except NULL:
    8655             :  *         cdef Py_ssize_t dim
    8656             :  *         cdef char *itemp = <char *> self.view.buf             # <<<<<<<<<<<<<<
    8657             :  * 
    8658             :  *         for dim, idx in enumerate(index):
    8659             :  */
    8660           0 :   __pyx_v_itemp = ((char *)__pyx_v_self->view.buf);
    8661             : 
    8662             :   /* "View.MemoryView":401
    8663             :  *         cdef char *itemp = <char *> self.view.buf
    8664             :  * 
    8665             :  *         for dim, idx in enumerate(index):             # <<<<<<<<<<<<<<
    8666             :  *             itemp = pybuffer_index(&self.view, itemp, idx, dim)
    8667             :  * 
    8668             :  */
    8669           0 :   __pyx_t_1 = 0;
    8670           0 :   if (likely(PyList_CheckExact(__pyx_v_index)) || PyTuple_CheckExact(__pyx_v_index)) {
    8671           0 :     __pyx_t_2 = __pyx_v_index; __Pyx_INCREF(__pyx_t_2);
    8672           0 :     __pyx_t_3 = 0;
    8673           0 :     __pyx_t_4 = NULL;
    8674             :   } else {
    8675           0 :     __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 401, __pyx_L1_error)
    8676           0 :     __Pyx_GOTREF(__pyx_t_2);
    8677           0 :     __pyx_t_4 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 401, __pyx_L1_error)
    8678             :   }
    8679           0 :   for (;;) {
    8680           0 :     if (likely(!__pyx_t_4)) {
    8681           0 :       if (likely(PyList_CheckExact(__pyx_t_2))) {
    8682             :         {
    8683           0 :           Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
    8684             :           #if !CYTHON_ASSUME_SAFE_MACROS
    8685             :           if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 401, __pyx_L1_error)
    8686             :           #endif
    8687           0 :           if (__pyx_t_3 >= __pyx_temp) break;
    8688             :         }
    8689             :         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    8690           0 :         __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(1, 401, __pyx_L1_error)
    8691             :         #else
    8692             :         __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 401, __pyx_L1_error)
    8693             :         __Pyx_GOTREF(__pyx_t_5);
    8694             :         #endif
    8695             :       } else {
    8696             :         {
    8697           0 :           Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
    8698             :           #if !CYTHON_ASSUME_SAFE_MACROS
    8699             :           if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 401, __pyx_L1_error)
    8700             :           #endif
    8701           0 :           if (__pyx_t_3 >= __pyx_temp) break;
    8702             :         }
    8703             :         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    8704           0 :         __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(1, 401, __pyx_L1_error)
    8705             :         #else
    8706             :         __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 401, __pyx_L1_error)
    8707             :         __Pyx_GOTREF(__pyx_t_5);
    8708             :         #endif
    8709             :       }
    8710             :     } else {
    8711           0 :       __pyx_t_5 = __pyx_t_4(__pyx_t_2);
    8712           0 :       if (unlikely(!__pyx_t_5)) {
    8713           0 :         PyObject* exc_type = PyErr_Occurred();
    8714           0 :         if (exc_type) {
    8715           0 :           if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
    8716           0 :           else __PYX_ERR(1, 401, __pyx_L1_error)
    8717             :         }
    8718             :         break;
    8719             :       }
    8720           0 :       __Pyx_GOTREF(__pyx_t_5);
    8721             :     }
    8722           0 :     __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_5);
    8723           0 :     __pyx_t_5 = 0;
    8724           0 :     __pyx_v_dim = __pyx_t_1;
    8725           0 :     __pyx_t_1 = (__pyx_t_1 + 1);
    8726             : 
    8727             :     /* "View.MemoryView":402
    8728             :  * 
    8729             :  *         for dim, idx in enumerate(index):
    8730             :  *             itemp = pybuffer_index(&self.view, itemp, idx, dim)             # <<<<<<<<<<<<<<
    8731             :  * 
    8732             :  *         return itemp
    8733             :  */
    8734           0 :     __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 402, __pyx_L1_error)
    8735           0 :     __pyx_t_7 = __pyx_pybuffer_index((&__pyx_v_self->view), __pyx_v_itemp, __pyx_t_6, __pyx_v_dim); if (unlikely(__pyx_t_7 == ((char *)NULL))) __PYX_ERR(1, 402, __pyx_L1_error)
    8736             :     __pyx_v_itemp = __pyx_t_7;
    8737             : 
    8738             :     /* "View.MemoryView":401
    8739             :  *         cdef char *itemp = <char *> self.view.buf
    8740             :  * 
    8741             :  *         for dim, idx in enumerate(index):             # <<<<<<<<<<<<<<
    8742             :  *             itemp = pybuffer_index(&self.view, itemp, idx, dim)
    8743             :  * 
    8744             :  */
    8745             :   }
    8746           0 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    8747             : 
    8748             :   /* "View.MemoryView":404
    8749             :  *             itemp = pybuffer_index(&self.view, itemp, idx, dim)
    8750             :  * 
    8751             :  *         return itemp             # <<<<<<<<<<<<<<
    8752             :  * 
    8753             :  * 
    8754             :  */
    8755           0 :   __pyx_r = __pyx_v_itemp;
    8756           0 :   goto __pyx_L0;
    8757             : 
    8758             :   /* "View.MemoryView":397
    8759             :  *                 PyThread_free_lock(self.lock)
    8760             :  * 
    8761             :  *     cdef char *get_item_pointer(memoryview self, object index) except NULL:             # <<<<<<<<<<<<<<
    8762             :  *         cdef Py_ssize_t dim
    8763             :  *         cdef char *itemp = <char *> self.view.buf
    8764             :  */
    8765             : 
    8766             :   /* function exit code */
    8767           0 :   __pyx_L1_error:;
    8768           0 :   __Pyx_XDECREF(__pyx_t_2);
    8769           0 :   __Pyx_XDECREF(__pyx_t_5);
    8770           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.get_item_pointer", __pyx_clineno, __pyx_lineno, __pyx_filename);
    8771           0 :   __pyx_r = NULL;
    8772           0 :   __pyx_L0:;
    8773           0 :   __Pyx_XDECREF(__pyx_v_idx);
    8774           0 :   __Pyx_RefNannyFinishContext();
    8775           0 :   return __pyx_r;
    8776             : }
    8777             : 
    8778             : /* "View.MemoryView":407
    8779             :  * 
    8780             :  * 
    8781             :  *     def __getitem__(memoryview self, object index):             # <<<<<<<<<<<<<<
    8782             :  *         if index is Ellipsis:
    8783             :  *             return self
    8784             :  */
    8785             : 
    8786             : /* Python wrapper */
    8787             : static PyObject *__pyx_memoryview___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index); /*proto*/
    8788           0 : static PyObject *__pyx_memoryview___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index) {
    8789           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    8790           0 :   PyObject *__pyx_r = 0;
    8791             :   __Pyx_RefNannyDeclarations
    8792           0 :   __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
    8793           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
    8794           0 :   __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v_index));
    8795             : 
    8796             :   /* function exit code */
    8797           0 :   __Pyx_RefNannyFinishContext();
    8798           0 :   return __pyx_r;
    8799             : }
    8800             : 
    8801           0 : static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index) {
    8802           0 :   PyObject *__pyx_v_have_slices = NULL;
    8803           0 :   PyObject *__pyx_v_indices = NULL;
    8804           0 :   char *__pyx_v_itemp;
    8805           0 :   PyObject *__pyx_r = NULL;
    8806             :   __Pyx_RefNannyDeclarations
    8807           0 :   int __pyx_t_1;
    8808           0 :   PyObject *__pyx_t_2 = NULL;
    8809           0 :   PyObject *__pyx_t_3 = NULL;
    8810           0 :   PyObject *__pyx_t_4 = NULL;
    8811           0 :   char *__pyx_t_5;
    8812           0 :   int __pyx_lineno = 0;
    8813           0 :   const char *__pyx_filename = NULL;
    8814           0 :   int __pyx_clineno = 0;
    8815           0 :   __Pyx_RefNannySetupContext("__getitem__", 1);
    8816             : 
    8817             :   /* "View.MemoryView":408
    8818             :  * 
    8819             :  *     def __getitem__(memoryview self, object index):
    8820             :  *         if index is Ellipsis:             # <<<<<<<<<<<<<<
    8821             :  *             return self
    8822             :  * 
    8823             :  */
    8824           0 :   __pyx_t_1 = (__pyx_v_index == __pyx_builtin_Ellipsis);
    8825           0 :   if (__pyx_t_1) {
    8826             : 
    8827             :     /* "View.MemoryView":409
    8828             :  *     def __getitem__(memoryview self, object index):
    8829             :  *         if index is Ellipsis:
    8830             :  *             return self             # <<<<<<<<<<<<<<
    8831             :  * 
    8832             :  *         have_slices, indices = _unellipsify(index, self.view.ndim)
    8833             :  */
    8834           0 :     __Pyx_XDECREF(__pyx_r);
    8835           0 :     __Pyx_INCREF((PyObject *)__pyx_v_self);
    8836           0 :     __pyx_r = ((PyObject *)__pyx_v_self);
    8837           0 :     goto __pyx_L0;
    8838             : 
    8839             :     /* "View.MemoryView":408
    8840             :  * 
    8841             :  *     def __getitem__(memoryview self, object index):
    8842             :  *         if index is Ellipsis:             # <<<<<<<<<<<<<<
    8843             :  *             return self
    8844             :  * 
    8845             :  */
    8846             :   }
    8847             : 
    8848             :   /* "View.MemoryView":411
    8849             :  *             return self
    8850             :  * 
    8851             :  *         have_slices, indices = _unellipsify(index, self.view.ndim)             # <<<<<<<<<<<<<<
    8852             :  * 
    8853             :  *         cdef char *itemp
    8854             :  */
    8855           0 :   __pyx_t_2 = _unellipsify(__pyx_v_index, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 411, __pyx_L1_error)
    8856           0 :   __Pyx_GOTREF(__pyx_t_2);
    8857           0 :   if (likely(__pyx_t_2 != Py_None)) {
    8858           0 :     PyObject* sequence = __pyx_t_2;
    8859           0 :     Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    8860           0 :     if (unlikely(size != 2)) {
    8861           0 :       if (size > 2) __Pyx_RaiseTooManyValuesError(2);
    8862           0 :       else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
    8863           0 :       __PYX_ERR(1, 411, __pyx_L1_error)
    8864             :     }
    8865             :     #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    8866           0 :     __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
    8867           0 :     __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
    8868           0 :     __Pyx_INCREF(__pyx_t_3);
    8869           0 :     __Pyx_INCREF(__pyx_t_4);
    8870             :     #else
    8871             :     __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 411, __pyx_L1_error)
    8872             :     __Pyx_GOTREF(__pyx_t_3);
    8873             :     __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 411, __pyx_L1_error)
    8874             :     __Pyx_GOTREF(__pyx_t_4);
    8875             :     #endif
    8876           0 :     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    8877             :   } else {
    8878           0 :     __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(1, 411, __pyx_L1_error)
    8879             :   }
    8880           0 :   __pyx_v_have_slices = __pyx_t_3;
    8881           0 :   __pyx_t_3 = 0;
    8882           0 :   __pyx_v_indices = __pyx_t_4;
    8883           0 :   __pyx_t_4 = 0;
    8884             : 
    8885             :   /* "View.MemoryView":414
    8886             :  * 
    8887             :  *         cdef char *itemp
    8888             :  *         if have_slices:             # <<<<<<<<<<<<<<
    8889             :  *             return memview_slice(self, indices)
    8890             :  *         else:
    8891             :  */
    8892           0 :   __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_have_slices); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 414, __pyx_L1_error)
    8893           0 :   if (__pyx_t_1) {
    8894             : 
    8895             :     /* "View.MemoryView":415
    8896             :  *         cdef char *itemp
    8897             :  *         if have_slices:
    8898             :  *             return memview_slice(self, indices)             # <<<<<<<<<<<<<<
    8899             :  *         else:
    8900             :  *             itemp = self.get_item_pointer(indices)
    8901             :  */
    8902           0 :     __Pyx_XDECREF(__pyx_r);
    8903           0 :     __pyx_t_2 = ((PyObject *)__pyx_memview_slice(__pyx_v_self, __pyx_v_indices)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 415, __pyx_L1_error)
    8904           0 :     __Pyx_GOTREF(__pyx_t_2);
    8905           0 :     __pyx_r = __pyx_t_2;
    8906           0 :     __pyx_t_2 = 0;
    8907           0 :     goto __pyx_L0;
    8908             : 
    8909             :     /* "View.MemoryView":414
    8910             :  * 
    8911             :  *         cdef char *itemp
    8912             :  *         if have_slices:             # <<<<<<<<<<<<<<
    8913             :  *             return memview_slice(self, indices)
    8914             :  *         else:
    8915             :  */
    8916             :   }
    8917             : 
    8918             :   /* "View.MemoryView":417
    8919             :  *             return memview_slice(self, indices)
    8920             :  *         else:
    8921             :  *             itemp = self.get_item_pointer(indices)             # <<<<<<<<<<<<<<
    8922             :  *             return self.convert_item_to_object(itemp)
    8923             :  * 
    8924             :  */
    8925             :   /*else*/ {
    8926           0 :     __pyx_t_5 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->get_item_pointer(__pyx_v_self, __pyx_v_indices); if (unlikely(__pyx_t_5 == ((char *)NULL))) __PYX_ERR(1, 417, __pyx_L1_error)
    8927           0 :     __pyx_v_itemp = __pyx_t_5;
    8928             : 
    8929             :     /* "View.MemoryView":418
    8930             :  *         else:
    8931             :  *             itemp = self.get_item_pointer(indices)
    8932             :  *             return self.convert_item_to_object(itemp)             # <<<<<<<<<<<<<<
    8933             :  * 
    8934             :  *     def __setitem__(memoryview self, object index, object value):
    8935             :  */
    8936           0 :     __Pyx_XDECREF(__pyx_r);
    8937           0 :     __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->convert_item_to_object(__pyx_v_self, __pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 418, __pyx_L1_error)
    8938           0 :     __Pyx_GOTREF(__pyx_t_2);
    8939           0 :     __pyx_r = __pyx_t_2;
    8940           0 :     __pyx_t_2 = 0;
    8941           0 :     goto __pyx_L0;
    8942             :   }
    8943             : 
    8944             :   /* "View.MemoryView":407
    8945             :  * 
    8946             :  * 
    8947             :  *     def __getitem__(memoryview self, object index):             # <<<<<<<<<<<<<<
    8948             :  *         if index is Ellipsis:
    8949             :  *             return self
    8950             :  */
    8951             : 
    8952             :   /* function exit code */
    8953           0 :   __pyx_L1_error:;
    8954           0 :   __Pyx_XDECREF(__pyx_t_2);
    8955           0 :   __Pyx_XDECREF(__pyx_t_3);
    8956           0 :   __Pyx_XDECREF(__pyx_t_4);
    8957           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
    8958           0 :   __pyx_r = NULL;
    8959           0 :   __pyx_L0:;
    8960           0 :   __Pyx_XDECREF(__pyx_v_have_slices);
    8961           0 :   __Pyx_XDECREF(__pyx_v_indices);
    8962           0 :   __Pyx_XGIVEREF(__pyx_r);
    8963           0 :   __Pyx_RefNannyFinishContext();
    8964           0 :   return __pyx_r;
    8965             : }
    8966             : 
    8967             : /* "View.MemoryView":420
    8968             :  *             return self.convert_item_to_object(itemp)
    8969             :  * 
    8970             :  *     def __setitem__(memoryview self, object index, object value):             # <<<<<<<<<<<<<<
    8971             :  *         if self.view.readonly:
    8972             :  *             raise TypeError, "Cannot assign to read-only memoryview"
    8973             :  */
    8974             : 
    8975             : /* Python wrapper */
    8976             : static int __pyx_memoryview___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /*proto*/
    8977           0 : static int __pyx_memoryview___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
    8978           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    8979           0 :   int __pyx_r;
    8980             :   __Pyx_RefNannyDeclarations
    8981           0 :   __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
    8982           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
    8983           0 :   __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v_index), ((PyObject *)__pyx_v_value));
    8984             : 
    8985             :   /* function exit code */
    8986           0 :   __Pyx_RefNannyFinishContext();
    8987           0 :   return __pyx_r;
    8988             : }
    8989             : 
    8990           0 : static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
    8991           0 :   PyObject *__pyx_v_have_slices = NULL;
    8992           0 :   PyObject *__pyx_v_obj = NULL;
    8993           0 :   int __pyx_r;
    8994             :   __Pyx_RefNannyDeclarations
    8995           0 :   PyObject *__pyx_t_1 = NULL;
    8996           0 :   PyObject *__pyx_t_2 = NULL;
    8997           0 :   PyObject *__pyx_t_3 = NULL;
    8998           0 :   int __pyx_t_4;
    8999           0 :   int __pyx_lineno = 0;
    9000           0 :   const char *__pyx_filename = NULL;
    9001           0 :   int __pyx_clineno = 0;
    9002           0 :   __Pyx_RefNannySetupContext("__setitem__", 0);
    9003           0 :   __Pyx_INCREF(__pyx_v_index);
    9004             : 
    9005             :   /* "View.MemoryView":421
    9006             :  * 
    9007             :  *     def __setitem__(memoryview self, object index, object value):
    9008             :  *         if self.view.readonly:             # <<<<<<<<<<<<<<
    9009             :  *             raise TypeError, "Cannot assign to read-only memoryview"
    9010             :  * 
    9011             :  */
    9012           0 :   if (unlikely(__pyx_v_self->view.readonly)) {
    9013             : 
    9014             :     /* "View.MemoryView":422
    9015             :  *     def __setitem__(memoryview self, object index, object value):
    9016             :  *         if self.view.readonly:
    9017             :  *             raise TypeError, "Cannot assign to read-only memoryview"             # <<<<<<<<<<<<<<
    9018             :  * 
    9019             :  *         have_slices, index = _unellipsify(index, self.view.ndim)
    9020             :  */
    9021           0 :     __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_Cannot_assign_to_read_only_memor, 0, 0);
    9022           0 :     __PYX_ERR(1, 422, __pyx_L1_error)
    9023             : 
    9024             :     /* "View.MemoryView":421
    9025             :  * 
    9026             :  *     def __setitem__(memoryview self, object index, object value):
    9027             :  *         if self.view.readonly:             # <<<<<<<<<<<<<<
    9028             :  *             raise TypeError, "Cannot assign to read-only memoryview"
    9029             :  * 
    9030             :  */
    9031             :   }
    9032             : 
    9033             :   /* "View.MemoryView":424
    9034             :  *             raise TypeError, "Cannot assign to read-only memoryview"
    9035             :  * 
    9036             :  *         have_slices, index = _unellipsify(index, self.view.ndim)             # <<<<<<<<<<<<<<
    9037             :  * 
    9038             :  *         if have_slices:
    9039             :  */
    9040           0 :   __pyx_t_1 = _unellipsify(__pyx_v_index, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 424, __pyx_L1_error)
    9041           0 :   __Pyx_GOTREF(__pyx_t_1);
    9042           0 :   if (likely(__pyx_t_1 != Py_None)) {
    9043           0 :     PyObject* sequence = __pyx_t_1;
    9044           0 :     Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    9045           0 :     if (unlikely(size != 2)) {
    9046           0 :       if (size > 2) __Pyx_RaiseTooManyValuesError(2);
    9047           0 :       else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
    9048           0 :       __PYX_ERR(1, 424, __pyx_L1_error)
    9049             :     }
    9050             :     #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    9051           0 :     __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
    9052           0 :     __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
    9053           0 :     __Pyx_INCREF(__pyx_t_2);
    9054           0 :     __Pyx_INCREF(__pyx_t_3);
    9055             :     #else
    9056             :     __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 424, __pyx_L1_error)
    9057             :     __Pyx_GOTREF(__pyx_t_2);
    9058             :     __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 424, __pyx_L1_error)
    9059             :     __Pyx_GOTREF(__pyx_t_3);
    9060             :     #endif
    9061           0 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    9062             :   } else {
    9063           0 :     __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(1, 424, __pyx_L1_error)
    9064             :   }
    9065           0 :   __pyx_v_have_slices = __pyx_t_2;
    9066           0 :   __pyx_t_2 = 0;
    9067           0 :   __Pyx_DECREF_SET(__pyx_v_index, __pyx_t_3);
    9068           0 :   __pyx_t_3 = 0;
    9069             : 
    9070             :   /* "View.MemoryView":426
    9071             :  *         have_slices, index = _unellipsify(index, self.view.ndim)
    9072             :  * 
    9073             :  *         if have_slices:             # <<<<<<<<<<<<<<
    9074             :  *             obj = self.is_slice(value)
    9075             :  *             if obj is not None:
    9076             :  */
    9077           0 :   __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_have_slices); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(1, 426, __pyx_L1_error)
    9078           0 :   if (__pyx_t_4) {
    9079             : 
    9080             :     /* "View.MemoryView":427
    9081             :  * 
    9082             :  *         if have_slices:
    9083             :  *             obj = self.is_slice(value)             # <<<<<<<<<<<<<<
    9084             :  *             if obj is not None:
    9085             :  *                 self.setitem_slice_assignment(self[index], obj)
    9086             :  */
    9087           0 :     __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->is_slice(__pyx_v_self, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 427, __pyx_L1_error)
    9088           0 :     __Pyx_GOTREF(__pyx_t_1);
    9089           0 :     __pyx_v_obj = __pyx_t_1;
    9090           0 :     __pyx_t_1 = 0;
    9091             : 
    9092             :     /* "View.MemoryView":428
    9093             :  *         if have_slices:
    9094             :  *             obj = self.is_slice(value)
    9095             :  *             if obj is not None:             # <<<<<<<<<<<<<<
    9096             :  *                 self.setitem_slice_assignment(self[index], obj)
    9097             :  *             else:
    9098             :  */
    9099           0 :     __pyx_t_4 = (__pyx_v_obj != Py_None);
    9100           0 :     if (__pyx_t_4) {
    9101             : 
    9102             :       /* "View.MemoryView":429
    9103             :  *             obj = self.is_slice(value)
    9104             :  *             if obj is not None:
    9105             :  *                 self.setitem_slice_assignment(self[index], obj)             # <<<<<<<<<<<<<<
    9106             :  *             else:
    9107             :  *                 self.setitem_slice_assign_scalar(self[index], value)
    9108             :  */
    9109           0 :       __pyx_t_1 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 429, __pyx_L1_error)
    9110           0 :       __Pyx_GOTREF(__pyx_t_1);
    9111           0 :       __pyx_t_3 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_slice_assignment(__pyx_v_self, __pyx_t_1, __pyx_v_obj); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 429, __pyx_L1_error)
    9112           0 :       __Pyx_GOTREF(__pyx_t_3);
    9113           0 :       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    9114           0 :       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    9115             : 
    9116             :       /* "View.MemoryView":428
    9117             :  *         if have_slices:
    9118             :  *             obj = self.is_slice(value)
    9119             :  *             if obj is not None:             # <<<<<<<<<<<<<<
    9120             :  *                 self.setitem_slice_assignment(self[index], obj)
    9121             :  *             else:
    9122             :  */
    9123           0 :       goto __pyx_L5;
    9124             :     }
    9125             : 
    9126             :     /* "View.MemoryView":431
    9127             :  *                 self.setitem_slice_assignment(self[index], obj)
    9128             :  *             else:
    9129             :  *                 self.setitem_slice_assign_scalar(self[index], value)             # <<<<<<<<<<<<<<
    9130             :  *         else:
    9131             :  *             self.setitem_indexed(index, value)
    9132             :  */
    9133             :     /*else*/ {
    9134           0 :       __pyx_t_3 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 431, __pyx_L1_error)
    9135           0 :       __Pyx_GOTREF(__pyx_t_3);
    9136           0 :       if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_memoryview_type))))) __PYX_ERR(1, 431, __pyx_L1_error)
    9137           0 :       __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_slice_assign_scalar(__pyx_v_self, ((struct __pyx_memoryview_obj *)__pyx_t_3), __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 431, __pyx_L1_error)
    9138           0 :       __Pyx_GOTREF(__pyx_t_1);
    9139           0 :       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    9140           0 :       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    9141             :     }
    9142           0 :     __pyx_L5:;
    9143             : 
    9144             :     /* "View.MemoryView":426
    9145             :  *         have_slices, index = _unellipsify(index, self.view.ndim)
    9146             :  * 
    9147             :  *         if have_slices:             # <<<<<<<<<<<<<<
    9148             :  *             obj = self.is_slice(value)
    9149             :  *             if obj is not None:
    9150             :  */
    9151           0 :     goto __pyx_L4;
    9152             :   }
    9153             : 
    9154             :   /* "View.MemoryView":433
    9155             :  *                 self.setitem_slice_assign_scalar(self[index], value)
    9156             :  *         else:
    9157             :  *             self.setitem_indexed(index, value)             # <<<<<<<<<<<<<<
    9158             :  * 
    9159             :  *     cdef is_slice(self, obj):
    9160             :  */
    9161             :   /*else*/ {
    9162           0 :     __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_indexed(__pyx_v_self, __pyx_v_index, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 433, __pyx_L1_error)
    9163           0 :     __Pyx_GOTREF(__pyx_t_1);
    9164           0 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    9165             :   }
    9166           0 :   __pyx_L4:;
    9167             : 
    9168             :   /* "View.MemoryView":420
    9169             :  *             return self.convert_item_to_object(itemp)
    9170             :  * 
    9171             :  *     def __setitem__(memoryview self, object index, object value):             # <<<<<<<<<<<<<<
    9172             :  *         if self.view.readonly:
    9173             :  *             raise TypeError, "Cannot assign to read-only memoryview"
    9174             :  */
    9175             : 
    9176             :   /* function exit code */
    9177           0 :   __pyx_r = 0;
    9178           0 :   goto __pyx_L0;
    9179           0 :   __pyx_L1_error:;
    9180           0 :   __Pyx_XDECREF(__pyx_t_1);
    9181           0 :   __Pyx_XDECREF(__pyx_t_2);
    9182           0 :   __Pyx_XDECREF(__pyx_t_3);
    9183           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
    9184           0 :   __pyx_r = -1;
    9185           0 :   __pyx_L0:;
    9186           0 :   __Pyx_XDECREF(__pyx_v_have_slices);
    9187           0 :   __Pyx_XDECREF(__pyx_v_obj);
    9188           0 :   __Pyx_XDECREF(__pyx_v_index);
    9189           0 :   __Pyx_RefNannyFinishContext();
    9190           0 :   return __pyx_r;
    9191             : }
    9192             : 
    9193             : /* "View.MemoryView":435
    9194             :  *             self.setitem_indexed(index, value)
    9195             :  * 
    9196             :  *     cdef is_slice(self, obj):             # <<<<<<<<<<<<<<
    9197             :  *         if not isinstance(obj, memoryview):
    9198             :  *             try:
    9199             :  */
    9200             : 
    9201           0 : static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj) {
    9202           0 :   PyObject *__pyx_r = NULL;
    9203             :   __Pyx_RefNannyDeclarations
    9204           0 :   int __pyx_t_1;
    9205           0 :   int __pyx_t_2;
    9206           0 :   PyObject *__pyx_t_3 = NULL;
    9207           0 :   PyObject *__pyx_t_4 = NULL;
    9208           0 :   PyObject *__pyx_t_5 = NULL;
    9209           0 :   PyObject *__pyx_t_6 = NULL;
    9210           0 :   PyObject *__pyx_t_7 = NULL;
    9211           0 :   PyObject *__pyx_t_8 = NULL;
    9212           0 :   int __pyx_t_9;
    9213           0 :   int __pyx_lineno = 0;
    9214           0 :   const char *__pyx_filename = NULL;
    9215           0 :   int __pyx_clineno = 0;
    9216           0 :   __Pyx_RefNannySetupContext("is_slice", 0);
    9217           0 :   __Pyx_INCREF(__pyx_v_obj);
    9218             : 
    9219             :   /* "View.MemoryView":436
    9220             :  * 
    9221             :  *     cdef is_slice(self, obj):
    9222             :  *         if not isinstance(obj, memoryview):             # <<<<<<<<<<<<<<
    9223             :  *             try:
    9224             :  *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
    9225             :  */
    9226           0 :   __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_obj, __pyx_memoryview_type); 
    9227           0 :   __pyx_t_2 = (!__pyx_t_1);
    9228           0 :   if (__pyx_t_2) {
    9229             : 
    9230             :     /* "View.MemoryView":437
    9231             :  *     cdef is_slice(self, obj):
    9232             :  *         if not isinstance(obj, memoryview):
    9233             :  *             try:             # <<<<<<<<<<<<<<
    9234             :  *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
    9235             :  *                                  self.dtype_is_object)
    9236             :  */
    9237             :     {
    9238           0 :       __Pyx_PyThreadState_declare
    9239           0 :       __Pyx_PyThreadState_assign
    9240           0 :       __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
    9241           0 :       __Pyx_XGOTREF(__pyx_t_3);
    9242           0 :       __Pyx_XGOTREF(__pyx_t_4);
    9243           0 :       __Pyx_XGOTREF(__pyx_t_5);
    9244             :       /*try:*/ {
    9245             : 
    9246             :         /* "View.MemoryView":438
    9247             :  *         if not isinstance(obj, memoryview):
    9248             :  *             try:
    9249             :  *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,             # <<<<<<<<<<<<<<
    9250             :  *                                  self.dtype_is_object)
    9251             :  *             except TypeError:
    9252             :  */
    9253           0 :         __pyx_t_6 = __Pyx_PyInt_From_int(((__pyx_v_self->flags & (~PyBUF_WRITABLE)) | PyBUF_ANY_CONTIGUOUS)); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 438, __pyx_L4_error)
    9254           0 :         __Pyx_GOTREF(__pyx_t_6);
    9255             : 
    9256             :         /* "View.MemoryView":439
    9257             :  *             try:
    9258             :  *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
    9259             :  *                                  self.dtype_is_object)             # <<<<<<<<<<<<<<
    9260             :  *             except TypeError:
    9261             :  *                 return None
    9262             :  */
    9263           0 :         __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_self->dtype_is_object); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 439, __pyx_L4_error)
    9264           0 :         __Pyx_GOTREF(__pyx_t_7);
    9265             : 
    9266             :         /* "View.MemoryView":438
    9267             :  *         if not isinstance(obj, memoryview):
    9268             :  *             try:
    9269             :  *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,             # <<<<<<<<<<<<<<
    9270             :  *                                  self.dtype_is_object)
    9271             :  *             except TypeError:
    9272             :  */
    9273           0 :         __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 438, __pyx_L4_error)
    9274           0 :         __Pyx_GOTREF(__pyx_t_8);
    9275           0 :         __Pyx_INCREF(__pyx_v_obj);
    9276           0 :         __Pyx_GIVEREF(__pyx_v_obj);
    9277           0 :         if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_obj)) __PYX_ERR(1, 438, __pyx_L4_error);
    9278           0 :         __Pyx_GIVEREF(__pyx_t_6);
    9279           0 :         if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_6)) __PYX_ERR(1, 438, __pyx_L4_error);
    9280           0 :         __Pyx_GIVEREF(__pyx_t_7);
    9281           0 :         if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_7)) __PYX_ERR(1, 438, __pyx_L4_error);
    9282           0 :         __pyx_t_6 = 0;
    9283           0 :         __pyx_t_7 = 0;
    9284           0 :         __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 438, __pyx_L4_error)
    9285           0 :         __Pyx_GOTREF(__pyx_t_7);
    9286           0 :         __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    9287           0 :         __Pyx_DECREF_SET(__pyx_v_obj, __pyx_t_7);
    9288           0 :         __pyx_t_7 = 0;
    9289             : 
    9290             :         /* "View.MemoryView":437
    9291             :  *     cdef is_slice(self, obj):
    9292             :  *         if not isinstance(obj, memoryview):
    9293             :  *             try:             # <<<<<<<<<<<<<<
    9294             :  *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
    9295             :  *                                  self.dtype_is_object)
    9296             :  */
    9297             :       }
    9298           0 :       __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    9299           0 :       __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    9300           0 :       __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    9301           0 :       goto __pyx_L9_try_end;
    9302           0 :       __pyx_L4_error:;
    9303           0 :       __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    9304           0 :       __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    9305           0 :       __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    9306             : 
    9307             :       /* "View.MemoryView":440
    9308             :  *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
    9309             :  *                                  self.dtype_is_object)
    9310             :  *             except TypeError:             # <<<<<<<<<<<<<<
    9311             :  *                 return None
    9312             :  * 
    9313             :  */
    9314           0 :       __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError);
    9315           0 :       if (__pyx_t_9) {
    9316           0 :         __Pyx_AddTraceback("View.MemoryView.memoryview.is_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
    9317           0 :         if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_6) < 0) __PYX_ERR(1, 440, __pyx_L6_except_error)
    9318           0 :         __Pyx_XGOTREF(__pyx_t_7);
    9319           0 :         __Pyx_XGOTREF(__pyx_t_8);
    9320           0 :         __Pyx_XGOTREF(__pyx_t_6);
    9321             : 
    9322             :         /* "View.MemoryView":441
    9323             :  *                                  self.dtype_is_object)
    9324             :  *             except TypeError:
    9325             :  *                 return None             # <<<<<<<<<<<<<<
    9326             :  * 
    9327             :  *         return obj
    9328             :  */
    9329           0 :         __Pyx_XDECREF(__pyx_r);
    9330           0 :         __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    9331           0 :         __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    9332           0 :         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    9333           0 :         __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    9334           0 :         goto __pyx_L7_except_return;
    9335             :       }
    9336           0 :       goto __pyx_L6_except_error;
    9337             : 
    9338             :       /* "View.MemoryView":437
    9339             :  *     cdef is_slice(self, obj):
    9340             :  *         if not isinstance(obj, memoryview):
    9341             :  *             try:             # <<<<<<<<<<<<<<
    9342             :  *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
    9343             :  *                                  self.dtype_is_object)
    9344             :  */
    9345           0 :       __pyx_L6_except_error:;
    9346           0 :       __Pyx_XGIVEREF(__pyx_t_3);
    9347           0 :       __Pyx_XGIVEREF(__pyx_t_4);
    9348           0 :       __Pyx_XGIVEREF(__pyx_t_5);
    9349           0 :       __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
    9350           0 :       goto __pyx_L1_error;
    9351           0 :       __pyx_L7_except_return:;
    9352           0 :       __Pyx_XGIVEREF(__pyx_t_3);
    9353           0 :       __Pyx_XGIVEREF(__pyx_t_4);
    9354           0 :       __Pyx_XGIVEREF(__pyx_t_5);
    9355           0 :       __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
    9356           0 :       goto __pyx_L0;
    9357           0 :       __pyx_L9_try_end:;
    9358             :     }
    9359             : 
    9360             :     /* "View.MemoryView":436
    9361             :  * 
    9362             :  *     cdef is_slice(self, obj):
    9363             :  *         if not isinstance(obj, memoryview):             # <<<<<<<<<<<<<<
    9364             :  *             try:
    9365             :  *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
    9366             :  */
    9367             :   }
    9368             : 
    9369             :   /* "View.MemoryView":443
    9370             :  *                 return None
    9371             :  * 
    9372             :  *         return obj             # <<<<<<<<<<<<<<
    9373             :  * 
    9374             :  *     cdef setitem_slice_assignment(self, dst, src):
    9375             :  */
    9376           0 :   __Pyx_XDECREF(__pyx_r);
    9377           0 :   __Pyx_INCREF(__pyx_v_obj);
    9378           0 :   __pyx_r = __pyx_v_obj;
    9379           0 :   goto __pyx_L0;
    9380             : 
    9381             :   /* "View.MemoryView":435
    9382             :  *             self.setitem_indexed(index, value)
    9383             :  * 
    9384             :  *     cdef is_slice(self, obj):             # <<<<<<<<<<<<<<
    9385             :  *         if not isinstance(obj, memoryview):
    9386             :  *             try:
    9387             :  */
    9388             : 
    9389             :   /* function exit code */
    9390           0 :   __pyx_L1_error:;
    9391           0 :   __Pyx_XDECREF(__pyx_t_6);
    9392           0 :   __Pyx_XDECREF(__pyx_t_7);
    9393           0 :   __Pyx_XDECREF(__pyx_t_8);
    9394           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.is_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
    9395           0 :   __pyx_r = 0;
    9396           0 :   __pyx_L0:;
    9397           0 :   __Pyx_XDECREF(__pyx_v_obj);
    9398           0 :   __Pyx_XGIVEREF(__pyx_r);
    9399           0 :   __Pyx_RefNannyFinishContext();
    9400           0 :   return __pyx_r;
    9401             : }
    9402             : 
    9403             : /* "View.MemoryView":445
    9404             :  *         return obj
    9405             :  * 
    9406             :  *     cdef setitem_slice_assignment(self, dst, src):             # <<<<<<<<<<<<<<
    9407             :  *         cdef __Pyx_memviewslice dst_slice
    9408             :  *         cdef __Pyx_memviewslice src_slice
    9409             :  */
    9410             : 
    9411           0 : static PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src) {
    9412           0 :   __Pyx_memviewslice __pyx_v_dst_slice;
    9413           0 :   __Pyx_memviewslice __pyx_v_src_slice;
    9414           0 :   __Pyx_memviewslice __pyx_v_msrc;
    9415           0 :   __Pyx_memviewslice __pyx_v_mdst;
    9416           0 :   PyObject *__pyx_r = NULL;
    9417             :   __Pyx_RefNannyDeclarations
    9418           0 :   __Pyx_memviewslice *__pyx_t_1;
    9419           0 :   PyObject *__pyx_t_2 = NULL;
    9420           0 :   int __pyx_t_3;
    9421           0 :   int __pyx_t_4;
    9422           0 :   int __pyx_t_5;
    9423           0 :   int __pyx_lineno = 0;
    9424           0 :   const char *__pyx_filename = NULL;
    9425           0 :   int __pyx_clineno = 0;
    9426           0 :   __Pyx_RefNannySetupContext("setitem_slice_assignment", 1);
    9427             : 
    9428             :   /* "View.MemoryView":448
    9429             :  *         cdef __Pyx_memviewslice dst_slice
    9430             :  *         cdef __Pyx_memviewslice src_slice
    9431             :  *         cdef __Pyx_memviewslice msrc = get_slice_from_memview(src, &src_slice)[0]             # <<<<<<<<<<<<<<
    9432             :  *         cdef __Pyx_memviewslice mdst = get_slice_from_memview(dst, &dst_slice)[0]
    9433             :  * 
    9434             :  */
    9435           0 :   if (!(likely(((__pyx_v_src) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_src, __pyx_memoryview_type))))) __PYX_ERR(1, 448, __pyx_L1_error)
    9436           0 :   __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(((struct __pyx_memoryview_obj *)__pyx_v_src), (&__pyx_v_src_slice)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(1, 448, __pyx_L1_error)
    9437           0 :   __pyx_v_msrc = (__pyx_t_1[0]);
    9438             : 
    9439             :   /* "View.MemoryView":449
    9440             :  *         cdef __Pyx_memviewslice src_slice
    9441             :  *         cdef __Pyx_memviewslice msrc = get_slice_from_memview(src, &src_slice)[0]
    9442             :  *         cdef __Pyx_memviewslice mdst = get_slice_from_memview(dst, &dst_slice)[0]             # <<<<<<<<<<<<<<
    9443             :  * 
    9444             :  *         memoryview_copy_contents(msrc, mdst, src.ndim, dst.ndim, self.dtype_is_object)
    9445             :  */
    9446           0 :   if (!(likely(((__pyx_v_dst) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dst, __pyx_memoryview_type))))) __PYX_ERR(1, 449, __pyx_L1_error)
    9447           0 :   __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(((struct __pyx_memoryview_obj *)__pyx_v_dst), (&__pyx_v_dst_slice)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(1, 449, __pyx_L1_error)
    9448           0 :   __pyx_v_mdst = (__pyx_t_1[0]);
    9449             : 
    9450             :   /* "View.MemoryView":451
    9451             :  *         cdef __Pyx_memviewslice mdst = get_slice_from_memview(dst, &dst_slice)[0]
    9452             :  * 
    9453             :  *         memoryview_copy_contents(msrc, mdst, src.ndim, dst.ndim, self.dtype_is_object)             # <<<<<<<<<<<<<<
    9454             :  * 
    9455             :  *     cdef setitem_slice_assign_scalar(self, memoryview dst, value):
    9456             :  */
    9457           0 :   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_src, __pyx_n_s_ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 451, __pyx_L1_error)
    9458           0 :   __Pyx_GOTREF(__pyx_t_2);
    9459           0 :   __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 451, __pyx_L1_error)
    9460           0 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    9461           0 :   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_dst, __pyx_n_s_ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 451, __pyx_L1_error)
    9462           0 :   __Pyx_GOTREF(__pyx_t_2);
    9463           0 :   __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 451, __pyx_L1_error)
    9464           0 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    9465           0 :   __pyx_t_5 = __pyx_memoryview_copy_contents(__pyx_v_msrc, __pyx_v_mdst, __pyx_t_3, __pyx_t_4, __pyx_v_self->dtype_is_object); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 451, __pyx_L1_error)
    9466             : 
    9467             :   /* "View.MemoryView":445
    9468             :  *         return obj
    9469             :  * 
    9470             :  *     cdef setitem_slice_assignment(self, dst, src):             # <<<<<<<<<<<<<<
    9471             :  *         cdef __Pyx_memviewslice dst_slice
    9472             :  *         cdef __Pyx_memviewslice src_slice
    9473             :  */
    9474             : 
    9475             :   /* function exit code */
    9476           0 :   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    9477           0 :   goto __pyx_L0;
    9478           0 :   __pyx_L1_error:;
    9479           0 :   __Pyx_XDECREF(__pyx_t_2);
    9480           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_slice_assignment", __pyx_clineno, __pyx_lineno, __pyx_filename);
    9481           0 :   __pyx_r = 0;
    9482           0 :   __pyx_L0:;
    9483           0 :   __Pyx_XGIVEREF(__pyx_r);
    9484           0 :   __Pyx_RefNannyFinishContext();
    9485           0 :   return __pyx_r;
    9486             : }
    9487             : 
    9488             : /* "View.MemoryView":453
    9489             :  *         memoryview_copy_contents(msrc, mdst, src.ndim, dst.ndim, self.dtype_is_object)
    9490             :  * 
    9491             :  *     cdef setitem_slice_assign_scalar(self, memoryview dst, value):             # <<<<<<<<<<<<<<
    9492             :  *         cdef int array[128]
    9493             :  *         cdef void *tmp = NULL
    9494             :  */
    9495             : 
    9496           0 : static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memoryview_obj *__pyx_v_self, struct __pyx_memoryview_obj *__pyx_v_dst, PyObject *__pyx_v_value) {
    9497           0 :   int __pyx_v_array[0x80];
    9498           0 :   void *__pyx_v_tmp;
    9499           0 :   void *__pyx_v_item;
    9500           0 :   __Pyx_memviewslice *__pyx_v_dst_slice;
    9501           0 :   __Pyx_memviewslice __pyx_v_tmp_slice;
    9502           0 :   PyObject *__pyx_r = NULL;
    9503             :   __Pyx_RefNannyDeclarations
    9504           0 :   __Pyx_memviewslice *__pyx_t_1;
    9505           0 :   int __pyx_t_2;
    9506           0 :   PyObject *__pyx_t_3 = NULL;
    9507           0 :   int __pyx_t_4;
    9508           0 :   int __pyx_t_5;
    9509           0 :   char const *__pyx_t_6;
    9510           0 :   PyObject *__pyx_t_7 = NULL;
    9511           0 :   PyObject *__pyx_t_8 = NULL;
    9512           0 :   PyObject *__pyx_t_9 = NULL;
    9513           0 :   PyObject *__pyx_t_10 = NULL;
    9514           0 :   PyObject *__pyx_t_11 = NULL;
    9515           0 :   PyObject *__pyx_t_12 = NULL;
    9516           0 :   int __pyx_lineno = 0;
    9517           0 :   const char *__pyx_filename = NULL;
    9518           0 :   int __pyx_clineno = 0;
    9519           0 :   __Pyx_RefNannySetupContext("setitem_slice_assign_scalar", 1);
    9520             : 
    9521             :   /* "View.MemoryView":455
    9522             :  *     cdef setitem_slice_assign_scalar(self, memoryview dst, value):
    9523             :  *         cdef int array[128]
    9524             :  *         cdef void *tmp = NULL             # <<<<<<<<<<<<<<
    9525             :  *         cdef void *item
    9526             :  * 
    9527             :  */
    9528           0 :   __pyx_v_tmp = NULL;
    9529             : 
    9530             :   /* "View.MemoryView":460
    9531             :  *         cdef __Pyx_memviewslice *dst_slice
    9532             :  *         cdef __Pyx_memviewslice tmp_slice
    9533             :  *         dst_slice = get_slice_from_memview(dst, &tmp_slice)             # <<<<<<<<<<<<<<
    9534             :  * 
    9535             :  *         if <size_t>self.view.itemsize > sizeof(array):
    9536             :  */
    9537           0 :   __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_dst, (&__pyx_v_tmp_slice)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(1, 460, __pyx_L1_error)
    9538           0 :   __pyx_v_dst_slice = __pyx_t_1;
    9539             : 
    9540             :   /* "View.MemoryView":462
    9541             :  *         dst_slice = get_slice_from_memview(dst, &tmp_slice)
    9542             :  * 
    9543             :  *         if <size_t>self.view.itemsize > sizeof(array):             # <<<<<<<<<<<<<<
    9544             :  *             tmp = PyMem_Malloc(self.view.itemsize)
    9545             :  *             if tmp == NULL:
    9546             :  */
    9547           0 :   __pyx_t_2 = (((size_t)__pyx_v_self->view.itemsize) > (sizeof(__pyx_v_array)));
    9548           0 :   if (__pyx_t_2) {
    9549             : 
    9550             :     /* "View.MemoryView":463
    9551             :  * 
    9552             :  *         if <size_t>self.view.itemsize > sizeof(array):
    9553             :  *             tmp = PyMem_Malloc(self.view.itemsize)             # <<<<<<<<<<<<<<
    9554             :  *             if tmp == NULL:
    9555             :  *                 raise MemoryError
    9556             :  */
    9557           0 :     __pyx_v_tmp = PyMem_Malloc(__pyx_v_self->view.itemsize);
    9558             : 
    9559             :     /* "View.MemoryView":464
    9560             :  *         if <size_t>self.view.itemsize > sizeof(array):
    9561             :  *             tmp = PyMem_Malloc(self.view.itemsize)
    9562             :  *             if tmp == NULL:             # <<<<<<<<<<<<<<
    9563             :  *                 raise MemoryError
    9564             :  *             item = tmp
    9565             :  */
    9566           0 :     __pyx_t_2 = (__pyx_v_tmp == NULL);
    9567           0 :     if (unlikely(__pyx_t_2)) {
    9568             : 
    9569             :       /* "View.MemoryView":465
    9570             :  *             tmp = PyMem_Malloc(self.view.itemsize)
    9571             :  *             if tmp == NULL:
    9572             :  *                 raise MemoryError             # <<<<<<<<<<<<<<
    9573             :  *             item = tmp
    9574             :  *         else:
    9575             :  */
    9576           0 :       PyErr_NoMemory(); __PYX_ERR(1, 465, __pyx_L1_error)
    9577             : 
    9578             :       /* "View.MemoryView":464
    9579             :  *         if <size_t>self.view.itemsize > sizeof(array):
    9580             :  *             tmp = PyMem_Malloc(self.view.itemsize)
    9581             :  *             if tmp == NULL:             # <<<<<<<<<<<<<<
    9582             :  *                 raise MemoryError
    9583             :  *             item = tmp
    9584             :  */
    9585             :     }
    9586             : 
    9587             :     /* "View.MemoryView":466
    9588             :  *             if tmp == NULL:
    9589             :  *                 raise MemoryError
    9590             :  *             item = tmp             # <<<<<<<<<<<<<<
    9591             :  *         else:
    9592             :  *             item = <void *> array
    9593             :  */
    9594           0 :     __pyx_v_item = __pyx_v_tmp;
    9595             : 
    9596             :     /* "View.MemoryView":462
    9597             :  *         dst_slice = get_slice_from_memview(dst, &tmp_slice)
    9598             :  * 
    9599             :  *         if <size_t>self.view.itemsize > sizeof(array):             # <<<<<<<<<<<<<<
    9600             :  *             tmp = PyMem_Malloc(self.view.itemsize)
    9601             :  *             if tmp == NULL:
    9602             :  */
    9603           0 :     goto __pyx_L3;
    9604             :   }
    9605             : 
    9606             :   /* "View.MemoryView":468
    9607             :  *             item = tmp
    9608             :  *         else:
    9609             :  *             item = <void *> array             # <<<<<<<<<<<<<<
    9610             :  * 
    9611             :  *         try:
    9612             :  */
    9613             :   /*else*/ {
    9614             :     __pyx_v_item = ((void *)__pyx_v_array);
    9615             :   }
    9616           0 :   __pyx_L3:;
    9617             : 
    9618             :   /* "View.MemoryView":470
    9619             :  *             item = <void *> array
    9620             :  * 
    9621             :  *         try:             # <<<<<<<<<<<<<<
    9622             :  *             if self.dtype_is_object:
    9623             :  *                 (<PyObject **> item)[0] = <PyObject *> value
    9624             :  */
    9625             :   /*try:*/ {
    9626             : 
    9627             :     /* "View.MemoryView":471
    9628             :  * 
    9629             :  *         try:
    9630             :  *             if self.dtype_is_object:             # <<<<<<<<<<<<<<
    9631             :  *                 (<PyObject **> item)[0] = <PyObject *> value
    9632             :  *             else:
    9633             :  */
    9634           0 :     if (__pyx_v_self->dtype_is_object) {
    9635             : 
    9636             :       /* "View.MemoryView":472
    9637             :  *         try:
    9638             :  *             if self.dtype_is_object:
    9639             :  *                 (<PyObject **> item)[0] = <PyObject *> value             # <<<<<<<<<<<<<<
    9640             :  *             else:
    9641             :  *                 self.assign_item_from_object(<char *> item, value)
    9642             :  */
    9643           0 :       (((PyObject **)__pyx_v_item)[0]) = ((PyObject *)__pyx_v_value);
    9644             : 
    9645             :       /* "View.MemoryView":471
    9646             :  * 
    9647             :  *         try:
    9648             :  *             if self.dtype_is_object:             # <<<<<<<<<<<<<<
    9649             :  *                 (<PyObject **> item)[0] = <PyObject *> value
    9650             :  *             else:
    9651             :  */
    9652           0 :       goto __pyx_L8;
    9653             :     }
    9654             : 
    9655             :     /* "View.MemoryView":474
    9656             :  *                 (<PyObject **> item)[0] = <PyObject *> value
    9657             :  *             else:
    9658             :  *                 self.assign_item_from_object(<char *> item, value)             # <<<<<<<<<<<<<<
    9659             :  * 
    9660             :  * 
    9661             :  */
    9662             :     /*else*/ {
    9663           0 :       __pyx_t_3 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->assign_item_from_object(__pyx_v_self, ((char *)__pyx_v_item), __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 474, __pyx_L6_error)
    9664           0 :       __Pyx_GOTREF(__pyx_t_3);
    9665           0 :       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    9666             :     }
    9667           0 :     __pyx_L8:;
    9668             : 
    9669             :     /* "View.MemoryView":478
    9670             :  * 
    9671             :  * 
    9672             :  *             if self.view.suboffsets != NULL:             # <<<<<<<<<<<<<<
    9673             :  *                 assert_direct_dimensions(self.view.suboffsets, self.view.ndim)
    9674             :  *             slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,
    9675             :  */
    9676           0 :     __pyx_t_2 = (__pyx_v_self->view.suboffsets != NULL);
    9677           0 :     if (__pyx_t_2) {
    9678             : 
    9679             :       /* "View.MemoryView":479
    9680             :  * 
    9681             :  *             if self.view.suboffsets != NULL:
    9682             :  *                 assert_direct_dimensions(self.view.suboffsets, self.view.ndim)             # <<<<<<<<<<<<<<
    9683             :  *             slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,
    9684             :  *                                 item, self.dtype_is_object)
    9685             :  */
    9686           0 :       __pyx_t_4 = assert_direct_dimensions(__pyx_v_self->view.suboffsets, __pyx_v_self->view.ndim); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 479, __pyx_L6_error)
    9687             : 
    9688             :       /* "View.MemoryView":478
    9689             :  * 
    9690             :  * 
    9691             :  *             if self.view.suboffsets != NULL:             # <<<<<<<<<<<<<<
    9692             :  *                 assert_direct_dimensions(self.view.suboffsets, self.view.ndim)
    9693             :  *             slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,
    9694             :  */
    9695             :     }
    9696             : 
    9697             :     /* "View.MemoryView":480
    9698             :  *             if self.view.suboffsets != NULL:
    9699             :  *                 assert_direct_dimensions(self.view.suboffsets, self.view.ndim)
    9700             :  *             slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,             # <<<<<<<<<<<<<<
    9701             :  *                                 item, self.dtype_is_object)
    9702             :  *         finally:
    9703             :  */
    9704           0 :     __pyx_memoryview_slice_assign_scalar(__pyx_v_dst_slice, __pyx_v_dst->view.ndim, __pyx_v_self->view.itemsize, __pyx_v_item, __pyx_v_self->dtype_is_object);
    9705             :   }
    9706             : 
    9707             :   /* "View.MemoryView":483
    9708             :  *                                 item, self.dtype_is_object)
    9709             :  *         finally:
    9710             :  *             PyMem_Free(tmp)             # <<<<<<<<<<<<<<
    9711             :  * 
    9712             :  *     cdef setitem_indexed(self, index, value):
    9713             :  */
    9714             :   /*finally:*/ {
    9715             :     /*normal exit:*/{
    9716           0 :       PyMem_Free(__pyx_v_tmp);
    9717           0 :       goto __pyx_L7;
    9718             :     }
    9719           0 :     __pyx_L6_error:;
    9720             :     /*exception exit:*/{
    9721           0 :       __Pyx_PyThreadState_declare
    9722           0 :       __Pyx_PyThreadState_assign
    9723           0 :       __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0;
    9724           0 :       __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    9725           0 :       if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
    9726           0 :       if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9) < 0)) __Pyx_ErrFetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
    9727           0 :       __Pyx_XGOTREF(__pyx_t_7);
    9728           0 :       __Pyx_XGOTREF(__pyx_t_8);
    9729           0 :       __Pyx_XGOTREF(__pyx_t_9);
    9730           0 :       __Pyx_XGOTREF(__pyx_t_10);
    9731           0 :       __Pyx_XGOTREF(__pyx_t_11);
    9732           0 :       __Pyx_XGOTREF(__pyx_t_12);
    9733           0 :       __pyx_t_4 = __pyx_lineno; __pyx_t_5 = __pyx_clineno; __pyx_t_6 = __pyx_filename;
    9734             :       {
    9735           0 :         PyMem_Free(__pyx_v_tmp);
    9736             :       }
    9737           0 :       if (PY_MAJOR_VERSION >= 3) {
    9738           0 :         __Pyx_XGIVEREF(__pyx_t_10);
    9739           0 :         __Pyx_XGIVEREF(__pyx_t_11);
    9740           0 :         __Pyx_XGIVEREF(__pyx_t_12);
    9741           0 :         __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
    9742             :       }
    9743           0 :       __Pyx_XGIVEREF(__pyx_t_7);
    9744           0 :       __Pyx_XGIVEREF(__pyx_t_8);
    9745           0 :       __Pyx_XGIVEREF(__pyx_t_9);
    9746           0 :       __Pyx_ErrRestore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
    9747           0 :       __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0;
    9748           0 :       __pyx_lineno = __pyx_t_4; __pyx_clineno = __pyx_t_5; __pyx_filename = __pyx_t_6;
    9749           0 :       goto __pyx_L1_error;
    9750             :     }
    9751           0 :     __pyx_L7:;
    9752             :   }
    9753             : 
    9754             :   /* "View.MemoryView":453
    9755             :  *         memoryview_copy_contents(msrc, mdst, src.ndim, dst.ndim, self.dtype_is_object)
    9756             :  * 
    9757             :  *     cdef setitem_slice_assign_scalar(self, memoryview dst, value):             # <<<<<<<<<<<<<<
    9758             :  *         cdef int array[128]
    9759             :  *         cdef void *tmp = NULL
    9760             :  */
    9761             : 
    9762             :   /* function exit code */
    9763           0 :   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    9764           0 :   goto __pyx_L0;
    9765           0 :   __pyx_L1_error:;
    9766           0 :   __Pyx_XDECREF(__pyx_t_3);
    9767           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_slice_assign_scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
    9768           0 :   __pyx_r = 0;
    9769           0 :   __pyx_L0:;
    9770           0 :   __Pyx_XGIVEREF(__pyx_r);
    9771           0 :   __Pyx_RefNannyFinishContext();
    9772           0 :   return __pyx_r;
    9773             : }
    9774             : 
    9775             : /* "View.MemoryView":485
    9776             :  *             PyMem_Free(tmp)
    9777             :  * 
    9778             :  *     cdef setitem_indexed(self, index, value):             # <<<<<<<<<<<<<<
    9779             :  *         cdef char *itemp = self.get_item_pointer(index)
    9780             :  *         self.assign_item_from_object(itemp, value)
    9781             :  */
    9782             : 
    9783           0 : static PyObject *__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
    9784           0 :   char *__pyx_v_itemp;
    9785           0 :   PyObject *__pyx_r = NULL;
    9786             :   __Pyx_RefNannyDeclarations
    9787           0 :   char *__pyx_t_1;
    9788           0 :   PyObject *__pyx_t_2 = NULL;
    9789           0 :   int __pyx_lineno = 0;
    9790           0 :   const char *__pyx_filename = NULL;
    9791           0 :   int __pyx_clineno = 0;
    9792           0 :   __Pyx_RefNannySetupContext("setitem_indexed", 1);
    9793             : 
    9794             :   /* "View.MemoryView":486
    9795             :  * 
    9796             :  *     cdef setitem_indexed(self, index, value):
    9797             :  *         cdef char *itemp = self.get_item_pointer(index)             # <<<<<<<<<<<<<<
    9798             :  *         self.assign_item_from_object(itemp, value)
    9799             :  * 
    9800             :  */
    9801           0 :   __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->get_item_pointer(__pyx_v_self, __pyx_v_index); if (unlikely(__pyx_t_1 == ((char *)NULL))) __PYX_ERR(1, 486, __pyx_L1_error)
    9802           0 :   __pyx_v_itemp = __pyx_t_1;
    9803             : 
    9804             :   /* "View.MemoryView":487
    9805             :  *     cdef setitem_indexed(self, index, value):
    9806             :  *         cdef char *itemp = self.get_item_pointer(index)
    9807             :  *         self.assign_item_from_object(itemp, value)             # <<<<<<<<<<<<<<
    9808             :  * 
    9809             :  *     cdef convert_item_to_object(self, char *itemp):
    9810             :  */
    9811           0 :   __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->assign_item_from_object(__pyx_v_self, __pyx_v_itemp, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 487, __pyx_L1_error)
    9812           0 :   __Pyx_GOTREF(__pyx_t_2);
    9813           0 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    9814             : 
    9815             :   /* "View.MemoryView":485
    9816             :  *             PyMem_Free(tmp)
    9817             :  * 
    9818             :  *     cdef setitem_indexed(self, index, value):             # <<<<<<<<<<<<<<
    9819             :  *         cdef char *itemp = self.get_item_pointer(index)
    9820             :  *         self.assign_item_from_object(itemp, value)
    9821             :  */
    9822             : 
    9823             :   /* function exit code */
    9824           0 :   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    9825           0 :   goto __pyx_L0;
    9826           0 :   __pyx_L1_error:;
    9827           0 :   __Pyx_XDECREF(__pyx_t_2);
    9828           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_indexed", __pyx_clineno, __pyx_lineno, __pyx_filename);
    9829           0 :   __pyx_r = 0;
    9830           0 :   __pyx_L0:;
    9831           0 :   __Pyx_XGIVEREF(__pyx_r);
    9832           0 :   __Pyx_RefNannyFinishContext();
    9833           0 :   return __pyx_r;
    9834             : }
    9835             : 
    9836             : /* "View.MemoryView":489
    9837             :  *         self.assign_item_from_object(itemp, value)
    9838             :  * 
    9839             :  *     cdef convert_item_to_object(self, char *itemp):             # <<<<<<<<<<<<<<
    9840             :  *         """Only used if instantiated manually by the user, or if Cython doesn't
    9841             :  *         know how to convert the type"""
    9842             :  */
    9843             : 
    9844           0 : static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp) {
    9845           0 :   PyObject *__pyx_v_struct = NULL;
    9846           0 :   PyObject *__pyx_v_bytesitem = 0;
    9847           0 :   PyObject *__pyx_v_result = NULL;
    9848           0 :   PyObject *__pyx_r = NULL;
    9849             :   __Pyx_RefNannyDeclarations
    9850           0 :   PyObject *__pyx_t_1 = NULL;
    9851           0 :   PyObject *__pyx_t_2 = NULL;
    9852           0 :   PyObject *__pyx_t_3 = NULL;
    9853           0 :   PyObject *__pyx_t_4 = NULL;
    9854           0 :   PyObject *__pyx_t_5 = NULL;
    9855           0 :   PyObject *__pyx_t_6 = NULL;
    9856           0 :   PyObject *__pyx_t_7 = NULL;
    9857           0 :   unsigned int __pyx_t_8;
    9858           0 :   Py_ssize_t __pyx_t_9;
    9859           0 :   int __pyx_t_10;
    9860           0 :   int __pyx_t_11;
    9861           0 :   int __pyx_lineno = 0;
    9862           0 :   const char *__pyx_filename = NULL;
    9863           0 :   int __pyx_clineno = 0;
    9864           0 :   __Pyx_RefNannySetupContext("convert_item_to_object", 1);
    9865             : 
    9866             :   /* "View.MemoryView":492
    9867             :  *         """Only used if instantiated manually by the user, or if Cython doesn't
    9868             :  *         know how to convert the type"""
    9869             :  *         import struct             # <<<<<<<<<<<<<<
    9870             :  *         cdef bytes bytesitem
    9871             :  * 
    9872             :  */
    9873           0 :   __pyx_t_1 = __Pyx_ImportDottedModule(__pyx_n_s_struct, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 492, __pyx_L1_error)
    9874           0 :   __Pyx_GOTREF(__pyx_t_1);
    9875           0 :   __pyx_v_struct = __pyx_t_1;
    9876           0 :   __pyx_t_1 = 0;
    9877             : 
    9878             :   /* "View.MemoryView":495
    9879             :  *         cdef bytes bytesitem
    9880             :  * 
    9881             :  *         bytesitem = itemp[:self.view.itemsize]             # <<<<<<<<<<<<<<
    9882             :  *         try:
    9883             :  *             result = struct.unpack(self.view.format, bytesitem)
    9884             :  */
    9885           0 :   __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_itemp + 0, __pyx_v_self->view.itemsize - 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 495, __pyx_L1_error)
    9886           0 :   __Pyx_GOTREF(__pyx_t_1);
    9887           0 :   __pyx_v_bytesitem = ((PyObject*)__pyx_t_1);
    9888           0 :   __pyx_t_1 = 0;
    9889             : 
    9890             :   /* "View.MemoryView":496
    9891             :  * 
    9892             :  *         bytesitem = itemp[:self.view.itemsize]
    9893             :  *         try:             # <<<<<<<<<<<<<<
    9894             :  *             result = struct.unpack(self.view.format, bytesitem)
    9895             :  *         except struct.error:
    9896             :  */
    9897             :   {
    9898           0 :     __Pyx_PyThreadState_declare
    9899           0 :     __Pyx_PyThreadState_assign
    9900           0 :     __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
    9901           0 :     __Pyx_XGOTREF(__pyx_t_2);
    9902           0 :     __Pyx_XGOTREF(__pyx_t_3);
    9903           0 :     __Pyx_XGOTREF(__pyx_t_4);
    9904             :     /*try:*/ {
    9905             : 
    9906             :       /* "View.MemoryView":497
    9907             :  *         bytesitem = itemp[:self.view.itemsize]
    9908             :  *         try:
    9909             :  *             result = struct.unpack(self.view.format, bytesitem)             # <<<<<<<<<<<<<<
    9910             :  *         except struct.error:
    9911             :  *             raise ValueError, "Unable to convert item to object"
    9912             :  */
    9913           0 :       __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_unpack); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 497, __pyx_L3_error)
    9914           0 :       __Pyx_GOTREF(__pyx_t_5);
    9915           0 :       __pyx_t_6 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 497, __pyx_L3_error)
    9916           0 :       __Pyx_GOTREF(__pyx_t_6);
    9917           0 :       __pyx_t_7 = NULL;
    9918           0 :       __pyx_t_8 = 0;
    9919             :       #if CYTHON_UNPACK_METHODS
    9920           0 :       if (likely(PyMethod_Check(__pyx_t_5))) {
    9921           0 :         __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
    9922           0 :         if (likely(__pyx_t_7)) {
    9923           0 :           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
    9924           0 :           __Pyx_INCREF(__pyx_t_7);
    9925           0 :           __Pyx_INCREF(function);
    9926           0 :           __Pyx_DECREF_SET(__pyx_t_5, function);
    9927             :           __pyx_t_8 = 1;
    9928             :         }
    9929             :       }
    9930             :       #endif
    9931             :       {
    9932           0 :         PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_bytesitem};
    9933           0 :         __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_8, 2+__pyx_t_8);
    9934           0 :         __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    9935           0 :         __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    9936           0 :         if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 497, __pyx_L3_error)
    9937           0 :         __Pyx_GOTREF(__pyx_t_1);
    9938           0 :         __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    9939             :       }
    9940           0 :       __pyx_v_result = __pyx_t_1;
    9941           0 :       __pyx_t_1 = 0;
    9942             : 
    9943             :       /* "View.MemoryView":496
    9944             :  * 
    9945             :  *         bytesitem = itemp[:self.view.itemsize]
    9946             :  *         try:             # <<<<<<<<<<<<<<
    9947             :  *             result = struct.unpack(self.view.format, bytesitem)
    9948             :  *         except struct.error:
    9949             :  */
    9950             :     }
    9951             : 
    9952             :     /* "View.MemoryView":501
    9953             :  *             raise ValueError, "Unable to convert item to object"
    9954             :  *         else:
    9955             :  *             if len(self.view.format) == 1:             # <<<<<<<<<<<<<<
    9956             :  *                 return result[0]
    9957             :  *             return result
    9958             :  */
    9959             :     /*else:*/ {
    9960           0 :       __pyx_t_9 = __Pyx_ssize_strlen(__pyx_v_self->view.format); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(1, 501, __pyx_L5_except_error)
    9961           0 :       __pyx_t_10 = (__pyx_t_9 == 1);
    9962           0 :       if (__pyx_t_10) {
    9963             : 
    9964             :         /* "View.MemoryView":502
    9965             :  *         else:
    9966             :  *             if len(self.view.format) == 1:
    9967             :  *                 return result[0]             # <<<<<<<<<<<<<<
    9968             :  *             return result
    9969             :  * 
    9970             :  */
    9971           0 :         __Pyx_XDECREF(__pyx_r);
    9972           0 :         __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_result, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 502, __pyx_L5_except_error)
    9973           0 :         __Pyx_GOTREF(__pyx_t_1);
    9974           0 :         __pyx_r = __pyx_t_1;
    9975           0 :         __pyx_t_1 = 0;
    9976           0 :         goto __pyx_L6_except_return;
    9977             : 
    9978             :         /* "View.MemoryView":501
    9979             :  *             raise ValueError, "Unable to convert item to object"
    9980             :  *         else:
    9981             :  *             if len(self.view.format) == 1:             # <<<<<<<<<<<<<<
    9982             :  *                 return result[0]
    9983             :  *             return result
    9984             :  */
    9985             :       }
    9986             : 
    9987             :       /* "View.MemoryView":503
    9988             :  *             if len(self.view.format) == 1:
    9989             :  *                 return result[0]
    9990             :  *             return result             # <<<<<<<<<<<<<<
    9991             :  * 
    9992             :  *     cdef assign_item_from_object(self, char *itemp, object value):
    9993             :  */
    9994           0 :       __Pyx_XDECREF(__pyx_r);
    9995           0 :       __Pyx_INCREF(__pyx_v_result);
    9996           0 :       __pyx_r = __pyx_v_result;
    9997           0 :       goto __pyx_L6_except_return;
    9998             :     }
    9999           0 :     __pyx_L3_error:;
   10000           0 :     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
   10001           0 :     __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
   10002           0 :     __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
   10003           0 :     __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
   10004             : 
   10005             :     /* "View.MemoryView":498
   10006             :  *         try:
   10007             :  *             result = struct.unpack(self.view.format, bytesitem)
   10008             :  *         except struct.error:             # <<<<<<<<<<<<<<
   10009             :  *             raise ValueError, "Unable to convert item to object"
   10010             :  *         else:
   10011             :  */
   10012           0 :     __Pyx_ErrFetch(&__pyx_t_1, &__pyx_t_5, &__pyx_t_6);
   10013           0 :     __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_error); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 498, __pyx_L5_except_error)
   10014           0 :     __Pyx_GOTREF(__pyx_t_7);
   10015           0 :     __pyx_t_11 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_1, __pyx_t_7);
   10016           0 :     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   10017           0 :     __Pyx_ErrRestore(__pyx_t_1, __pyx_t_5, __pyx_t_6);
   10018           0 :     __pyx_t_1 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0;
   10019           0 :     if (__pyx_t_11) {
   10020           0 :       __Pyx_AddTraceback("View.MemoryView.memoryview.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
   10021           0 :       if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_1) < 0) __PYX_ERR(1, 498, __pyx_L5_except_error)
   10022           0 :       __Pyx_XGOTREF(__pyx_t_6);
   10023           0 :       __Pyx_XGOTREF(__pyx_t_5);
   10024           0 :       __Pyx_XGOTREF(__pyx_t_1);
   10025             : 
   10026             :       /* "View.MemoryView":499
   10027             :  *             result = struct.unpack(self.view.format, bytesitem)
   10028             :  *         except struct.error:
   10029             :  *             raise ValueError, "Unable to convert item to object"             # <<<<<<<<<<<<<<
   10030             :  *         else:
   10031             :  *             if len(self.view.format) == 1:
   10032             :  */
   10033           0 :       __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_Unable_to_convert_item_to_object, 0, 0);
   10034           0 :       __PYX_ERR(1, 499, __pyx_L5_except_error)
   10035             :     }
   10036           0 :     goto __pyx_L5_except_error;
   10037             : 
   10038             :     /* "View.MemoryView":496
   10039             :  * 
   10040             :  *         bytesitem = itemp[:self.view.itemsize]
   10041             :  *         try:             # <<<<<<<<<<<<<<
   10042             :  *             result = struct.unpack(self.view.format, bytesitem)
   10043             :  *         except struct.error:
   10044             :  */
   10045           0 :     __pyx_L5_except_error:;
   10046           0 :     __Pyx_XGIVEREF(__pyx_t_2);
   10047           0 :     __Pyx_XGIVEREF(__pyx_t_3);
   10048           0 :     __Pyx_XGIVEREF(__pyx_t_4);
   10049           0 :     __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
   10050           0 :     goto __pyx_L1_error;
   10051           0 :     __pyx_L6_except_return:;
   10052           0 :     __Pyx_XGIVEREF(__pyx_t_2);
   10053           0 :     __Pyx_XGIVEREF(__pyx_t_3);
   10054           0 :     __Pyx_XGIVEREF(__pyx_t_4);
   10055           0 :     __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
   10056           0 :     goto __pyx_L0;
   10057             :   }
   10058             : 
   10059             :   /* "View.MemoryView":489
   10060             :  *         self.assign_item_from_object(itemp, value)
   10061             :  * 
   10062             :  *     cdef convert_item_to_object(self, char *itemp):             # <<<<<<<<<<<<<<
   10063             :  *         """Only used if instantiated manually by the user, or if Cython doesn't
   10064             :  *         know how to convert the type"""
   10065             :  */
   10066             : 
   10067             :   /* function exit code */
   10068           0 :   __pyx_L1_error:;
   10069           0 :   __Pyx_XDECREF(__pyx_t_1);
   10070           0 :   __Pyx_XDECREF(__pyx_t_5);
   10071           0 :   __Pyx_XDECREF(__pyx_t_6);
   10072           0 :   __Pyx_XDECREF(__pyx_t_7);
   10073           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
   10074           0 :   __pyx_r = 0;
   10075           0 :   __pyx_L0:;
   10076           0 :   __Pyx_XDECREF(__pyx_v_struct);
   10077           0 :   __Pyx_XDECREF(__pyx_v_bytesitem);
   10078           0 :   __Pyx_XDECREF(__pyx_v_result);
   10079           0 :   __Pyx_XGIVEREF(__pyx_r);
   10080           0 :   __Pyx_RefNannyFinishContext();
   10081           0 :   return __pyx_r;
   10082             : }
   10083             : 
   10084             : /* "View.MemoryView":505
   10085             :  *             return result
   10086             :  * 
   10087             :  *     cdef assign_item_from_object(self, char *itemp, object value):             # <<<<<<<<<<<<<<
   10088             :  *         """Only used if instantiated manually by the user, or if Cython doesn't
   10089             :  *         know how to convert the type"""
   10090             :  */
   10091             : 
   10092           0 : static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value) {
   10093           0 :   PyObject *__pyx_v_struct = NULL;
   10094           0 :   char __pyx_v_c;
   10095           0 :   PyObject *__pyx_v_bytesvalue = 0;
   10096           0 :   Py_ssize_t __pyx_v_i;
   10097           0 :   PyObject *__pyx_r = NULL;
   10098             :   __Pyx_RefNannyDeclarations
   10099           0 :   PyObject *__pyx_t_1 = NULL;
   10100           0 :   int __pyx_t_2;
   10101           0 :   PyObject *__pyx_t_3 = NULL;
   10102           0 :   PyObject *__pyx_t_4 = NULL;
   10103           0 :   PyObject *__pyx_t_5 = NULL;
   10104           0 :   unsigned int __pyx_t_6;
   10105           0 :   Py_ssize_t __pyx_t_7;
   10106           0 :   PyObject *__pyx_t_8 = NULL;
   10107           0 :   char *__pyx_t_9;
   10108           0 :   char *__pyx_t_10;
   10109           0 :   char *__pyx_t_11;
   10110           0 :   char *__pyx_t_12;
   10111           0 :   int __pyx_lineno = 0;
   10112           0 :   const char *__pyx_filename = NULL;
   10113           0 :   int __pyx_clineno = 0;
   10114           0 :   __Pyx_RefNannySetupContext("assign_item_from_object", 1);
   10115             : 
   10116             :   /* "View.MemoryView":508
   10117             :  *         """Only used if instantiated manually by the user, or if Cython doesn't
   10118             :  *         know how to convert the type"""
   10119             :  *         import struct             # <<<<<<<<<<<<<<
   10120             :  *         cdef char c
   10121             :  *         cdef bytes bytesvalue
   10122             :  */
   10123           0 :   __pyx_t_1 = __Pyx_ImportDottedModule(__pyx_n_s_struct, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 508, __pyx_L1_error)
   10124           0 :   __Pyx_GOTREF(__pyx_t_1);
   10125           0 :   __pyx_v_struct = __pyx_t_1;
   10126           0 :   __pyx_t_1 = 0;
   10127             : 
   10128             :   /* "View.MemoryView":513
   10129             :  *         cdef Py_ssize_t i
   10130             :  * 
   10131             :  *         if isinstance(value, tuple):             # <<<<<<<<<<<<<<
   10132             :  *             bytesvalue = struct.pack(self.view.format, *value)
   10133             :  *         else:
   10134             :  */
   10135           0 :   __pyx_t_2 = PyTuple_Check(__pyx_v_value); 
   10136           0 :   if (__pyx_t_2) {
   10137             : 
   10138             :     /* "View.MemoryView":514
   10139             :  * 
   10140             :  *         if isinstance(value, tuple):
   10141             :  *             bytesvalue = struct.pack(self.view.format, *value)             # <<<<<<<<<<<<<<
   10142             :  *         else:
   10143             :  *             bytesvalue = struct.pack(self.view.format, value)
   10144             :  */
   10145           0 :     __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_pack); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 514, __pyx_L1_error)
   10146           0 :     __Pyx_GOTREF(__pyx_t_1);
   10147           0 :     __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 514, __pyx_L1_error)
   10148           0 :     __Pyx_GOTREF(__pyx_t_3);
   10149           0 :     __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 514, __pyx_L1_error)
   10150           0 :     __Pyx_GOTREF(__pyx_t_4);
   10151           0 :     __Pyx_GIVEREF(__pyx_t_3);
   10152           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(1, 514, __pyx_L1_error);
   10153           0 :     __pyx_t_3 = 0;
   10154           0 :     __pyx_t_3 = __Pyx_PySequence_Tuple(__pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 514, __pyx_L1_error)
   10155           0 :     __Pyx_GOTREF(__pyx_t_3);
   10156           0 :     __pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 514, __pyx_L1_error)
   10157           0 :     __Pyx_GOTREF(__pyx_t_5);
   10158           0 :     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   10159           0 :     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   10160           0 :     __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 514, __pyx_L1_error)
   10161           0 :     __Pyx_GOTREF(__pyx_t_3);
   10162           0 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   10163           0 :     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   10164           0 :     if (!(likely(PyBytes_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_3))) __PYX_ERR(1, 514, __pyx_L1_error)
   10165           0 :     __pyx_v_bytesvalue = ((PyObject*)__pyx_t_3);
   10166           0 :     __pyx_t_3 = 0;
   10167             : 
   10168             :     /* "View.MemoryView":513
   10169             :  *         cdef Py_ssize_t i
   10170             :  * 
   10171             :  *         if isinstance(value, tuple):             # <<<<<<<<<<<<<<
   10172             :  *             bytesvalue = struct.pack(self.view.format, *value)
   10173             :  *         else:
   10174             :  */
   10175           0 :     goto __pyx_L3;
   10176             :   }
   10177             : 
   10178             :   /* "View.MemoryView":516
   10179             :  *             bytesvalue = struct.pack(self.view.format, *value)
   10180             :  *         else:
   10181             :  *             bytesvalue = struct.pack(self.view.format, value)             # <<<<<<<<<<<<<<
   10182             :  * 
   10183             :  *         for i, c in enumerate(bytesvalue):
   10184             :  */
   10185             :   /*else*/ {
   10186           0 :     __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_pack); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 516, __pyx_L1_error)
   10187           0 :     __Pyx_GOTREF(__pyx_t_5);
   10188           0 :     __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 516, __pyx_L1_error)
   10189           0 :     __Pyx_GOTREF(__pyx_t_1);
   10190           0 :     __pyx_t_4 = NULL;
   10191           0 :     __pyx_t_6 = 0;
   10192             :     #if CYTHON_UNPACK_METHODS
   10193           0 :     if (likely(PyMethod_Check(__pyx_t_5))) {
   10194           0 :       __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
   10195           0 :       if (likely(__pyx_t_4)) {
   10196           0 :         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
   10197           0 :         __Pyx_INCREF(__pyx_t_4);
   10198           0 :         __Pyx_INCREF(function);
   10199           0 :         __Pyx_DECREF_SET(__pyx_t_5, function);
   10200             :         __pyx_t_6 = 1;
   10201             :       }
   10202             :     }
   10203             :     #endif
   10204             :     {
   10205           0 :       PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_1, __pyx_v_value};
   10206           0 :       __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6);
   10207           0 :       __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
   10208           0 :       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   10209           0 :       if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 516, __pyx_L1_error)
   10210           0 :       __Pyx_GOTREF(__pyx_t_3);
   10211           0 :       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   10212             :     }
   10213           0 :     if (!(likely(PyBytes_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_3))) __PYX_ERR(1, 516, __pyx_L1_error)
   10214             :     __pyx_v_bytesvalue = ((PyObject*)__pyx_t_3);
   10215             :     __pyx_t_3 = 0;
   10216             :   }
   10217           0 :   __pyx_L3:;
   10218             : 
   10219             :   /* "View.MemoryView":518
   10220             :  *             bytesvalue = struct.pack(self.view.format, value)
   10221             :  * 
   10222             :  *         for i, c in enumerate(bytesvalue):             # <<<<<<<<<<<<<<
   10223             :  *             itemp[i] = c
   10224             :  * 
   10225             :  */
   10226           0 :   __pyx_t_7 = 0;
   10227           0 :   if (unlikely(__pyx_v_bytesvalue == Py_None)) {
   10228           0 :     PyErr_SetString(PyExc_TypeError, "'NoneType' is not iterable");
   10229           0 :     __PYX_ERR(1, 518, __pyx_L1_error)
   10230             :   }
   10231           0 :   __Pyx_INCREF(__pyx_v_bytesvalue);
   10232           0 :   __pyx_t_8 = __pyx_v_bytesvalue;
   10233           0 :   __pyx_t_10 = PyBytes_AS_STRING(__pyx_t_8);
   10234           0 :   __pyx_t_11 = (__pyx_t_10 + PyBytes_GET_SIZE(__pyx_t_8));
   10235           0 :   for (__pyx_t_12 = __pyx_t_10; __pyx_t_12 < __pyx_t_11; __pyx_t_12++) {
   10236           0 :     __pyx_t_9 = __pyx_t_12;
   10237           0 :     __pyx_v_c = (__pyx_t_9[0]);
   10238             : 
   10239             :     /* "View.MemoryView":519
   10240             :  * 
   10241             :  *         for i, c in enumerate(bytesvalue):
   10242             :  *             itemp[i] = c             # <<<<<<<<<<<<<<
   10243             :  * 
   10244             :  *     @cname('getbuffer')
   10245             :  */
   10246           0 :     __pyx_v_i = __pyx_t_7;
   10247             : 
   10248             :     /* "View.MemoryView":518
   10249             :  *             bytesvalue = struct.pack(self.view.format, value)
   10250             :  * 
   10251             :  *         for i, c in enumerate(bytesvalue):             # <<<<<<<<<<<<<<
   10252             :  *             itemp[i] = c
   10253             :  * 
   10254             :  */
   10255           0 :     __pyx_t_7 = (__pyx_t_7 + 1);
   10256             : 
   10257             :     /* "View.MemoryView":519
   10258             :  * 
   10259             :  *         for i, c in enumerate(bytesvalue):
   10260             :  *             itemp[i] = c             # <<<<<<<<<<<<<<
   10261             :  * 
   10262             :  *     @cname('getbuffer')
   10263             :  */
   10264           0 :     (__pyx_v_itemp[__pyx_v_i]) = __pyx_v_c;
   10265             :   }
   10266           0 :   __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   10267             : 
   10268             :   /* "View.MemoryView":505
   10269             :  *             return result
   10270             :  * 
   10271             :  *     cdef assign_item_from_object(self, char *itemp, object value):             # <<<<<<<<<<<<<<
   10272             :  *         """Only used if instantiated manually by the user, or if Cython doesn't
   10273             :  *         know how to convert the type"""
   10274             :  */
   10275             : 
   10276             :   /* function exit code */
   10277           0 :   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   10278           0 :   goto __pyx_L0;
   10279           0 :   __pyx_L1_error:;
   10280           0 :   __Pyx_XDECREF(__pyx_t_1);
   10281           0 :   __Pyx_XDECREF(__pyx_t_3);
   10282           0 :   __Pyx_XDECREF(__pyx_t_4);
   10283           0 :   __Pyx_XDECREF(__pyx_t_5);
   10284           0 :   __Pyx_XDECREF(__pyx_t_8);
   10285           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.assign_item_from_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
   10286           0 :   __pyx_r = 0;
   10287           0 :   __pyx_L0:;
   10288           0 :   __Pyx_XDECREF(__pyx_v_struct);
   10289           0 :   __Pyx_XDECREF(__pyx_v_bytesvalue);
   10290           0 :   __Pyx_XGIVEREF(__pyx_r);
   10291           0 :   __Pyx_RefNannyFinishContext();
   10292           0 :   return __pyx_r;
   10293             : }
   10294             : 
   10295             : /* "View.MemoryView":521
   10296             :  *             itemp[i] = c
   10297             :  * 
   10298             :  *     @cname('getbuffer')             # <<<<<<<<<<<<<<
   10299             :  *     def __getbuffer__(self, Py_buffer *info, int flags):
   10300             :  *         if flags & PyBUF_WRITABLE and self.view.readonly:
   10301             :  */
   10302             : 
   10303             : /* Python wrapper */
   10304             : CYTHON_UNUSED static int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
   10305          94 : CYTHON_UNUSED static int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
   10306          94 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   10307          94 :   int __pyx_r;
   10308             :   __Pyx_RefNannyDeclarations
   10309          94 :   __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
   10310          94 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
   10311          94 :   __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));
   10312             : 
   10313             :   /* function exit code */
   10314          94 :   __Pyx_RefNannyFinishContext();
   10315          94 :   return __pyx_r;
   10316             : }
   10317             : 
   10318          94 : static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(struct __pyx_memoryview_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
   10319          94 :   int __pyx_r;
   10320             :   __Pyx_RefNannyDeclarations
   10321          94 :   int __pyx_t_1;
   10322          94 :   int __pyx_t_2;
   10323          94 :   Py_ssize_t *__pyx_t_3;
   10324          94 :   char *__pyx_t_4;
   10325          94 :   void *__pyx_t_5;
   10326          94 :   int __pyx_t_6;
   10327          94 :   Py_ssize_t __pyx_t_7;
   10328          94 :   int __pyx_lineno = 0;
   10329          94 :   const char *__pyx_filename = NULL;
   10330          94 :   int __pyx_clineno = 0;
   10331          94 :   if (unlikely(__pyx_v_info == NULL)) {
   10332           0 :     PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
   10333           0 :     return -1;
   10334             :   }
   10335          94 :   __Pyx_RefNannySetupContext("__getbuffer__", 0);
   10336          94 :   __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
   10337          94 :   __Pyx_GIVEREF(__pyx_v_info->obj);
   10338             : 
   10339             :   /* "View.MemoryView":523
   10340             :  *     @cname('getbuffer')
   10341             :  *     def __getbuffer__(self, Py_buffer *info, int flags):
   10342             :  *         if flags & PyBUF_WRITABLE and self.view.readonly:             # <<<<<<<<<<<<<<
   10343             :  *             raise ValueError, "Cannot create writable memory view from read-only memoryview"
   10344             :  * 
   10345             :  */
   10346          94 :   __pyx_t_2 = ((__pyx_v_flags & PyBUF_WRITABLE) != 0);
   10347          94 :   if (__pyx_t_2) {
   10348           0 :   } else {
   10349          94 :     __pyx_t_1 = __pyx_t_2;
   10350          94 :     goto __pyx_L4_bool_binop_done;
   10351             :   }
   10352           0 :   __pyx_t_1 = __pyx_v_self->view.readonly;
   10353          94 :   __pyx_L4_bool_binop_done:;
   10354          94 :   if (unlikely(__pyx_t_1)) {
   10355             : 
   10356             :     /* "View.MemoryView":524
   10357             :  *     def __getbuffer__(self, Py_buffer *info, int flags):
   10358             :  *         if flags & PyBUF_WRITABLE and self.view.readonly:
   10359             :  *             raise ValueError, "Cannot create writable memory view from read-only memoryview"             # <<<<<<<<<<<<<<
   10360             :  * 
   10361             :  *         if flags & PyBUF_ND:
   10362             :  */
   10363           0 :     __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_Cannot_create_writable_memory_vi, 0, 0);
   10364           0 :     __PYX_ERR(1, 524, __pyx_L1_error)
   10365             : 
   10366             :     /* "View.MemoryView":523
   10367             :  *     @cname('getbuffer')
   10368             :  *     def __getbuffer__(self, Py_buffer *info, int flags):
   10369             :  *         if flags & PyBUF_WRITABLE and self.view.readonly:             # <<<<<<<<<<<<<<
   10370             :  *             raise ValueError, "Cannot create writable memory view from read-only memoryview"
   10371             :  * 
   10372             :  */
   10373             :   }
   10374             : 
   10375             :   /* "View.MemoryView":526
   10376             :  *             raise ValueError, "Cannot create writable memory view from read-only memoryview"
   10377             :  * 
   10378             :  *         if flags & PyBUF_ND:             # <<<<<<<<<<<<<<
   10379             :  *             info.shape = self.view.shape
   10380             :  *         else:
   10381             :  */
   10382          94 :   __pyx_t_1 = ((__pyx_v_flags & PyBUF_ND) != 0);
   10383          94 :   if (__pyx_t_1) {
   10384             : 
   10385             :     /* "View.MemoryView":527
   10386             :  * 
   10387             :  *         if flags & PyBUF_ND:
   10388             :  *             info.shape = self.view.shape             # <<<<<<<<<<<<<<
   10389             :  *         else:
   10390             :  *             info.shape = NULL
   10391             :  */
   10392          94 :     __pyx_t_3 = __pyx_v_self->view.shape;
   10393          94 :     __pyx_v_info->shape = __pyx_t_3;
   10394             : 
   10395             :     /* "View.MemoryView":526
   10396             :  *             raise ValueError, "Cannot create writable memory view from read-only memoryview"
   10397             :  * 
   10398             :  *         if flags & PyBUF_ND:             # <<<<<<<<<<<<<<
   10399             :  *             info.shape = self.view.shape
   10400             :  *         else:
   10401             :  */
   10402          94 :     goto __pyx_L6;
   10403             :   }
   10404             : 
   10405             :   /* "View.MemoryView":529
   10406             :  *             info.shape = self.view.shape
   10407             :  *         else:
   10408             :  *             info.shape = NULL             # <<<<<<<<<<<<<<
   10409             :  * 
   10410             :  *         if flags & PyBUF_STRIDES:
   10411             :  */
   10412             :   /*else*/ {
   10413           0 :     __pyx_v_info->shape = NULL;
   10414             :   }
   10415          94 :   __pyx_L6:;
   10416             : 
   10417             :   /* "View.MemoryView":531
   10418             :  *             info.shape = NULL
   10419             :  * 
   10420             :  *         if flags & PyBUF_STRIDES:             # <<<<<<<<<<<<<<
   10421             :  *             info.strides = self.view.strides
   10422             :  *         else:
   10423             :  */
   10424          94 :   __pyx_t_1 = ((__pyx_v_flags & PyBUF_STRIDES) != 0);
   10425          94 :   if (__pyx_t_1) {
   10426             : 
   10427             :     /* "View.MemoryView":532
   10428             :  * 
   10429             :  *         if flags & PyBUF_STRIDES:
   10430             :  *             info.strides = self.view.strides             # <<<<<<<<<<<<<<
   10431             :  *         else:
   10432             :  *             info.strides = NULL
   10433             :  */
   10434          94 :     __pyx_t_3 = __pyx_v_self->view.strides;
   10435          94 :     __pyx_v_info->strides = __pyx_t_3;
   10436             : 
   10437             :     /* "View.MemoryView":531
   10438             :  *             info.shape = NULL
   10439             :  * 
   10440             :  *         if flags & PyBUF_STRIDES:             # <<<<<<<<<<<<<<
   10441             :  *             info.strides = self.view.strides
   10442             :  *         else:
   10443             :  */
   10444          94 :     goto __pyx_L7;
   10445             :   }
   10446             : 
   10447             :   /* "View.MemoryView":534
   10448             :  *             info.strides = self.view.strides
   10449             :  *         else:
   10450             :  *             info.strides = NULL             # <<<<<<<<<<<<<<
   10451             :  * 
   10452             :  *         if flags & PyBUF_INDIRECT:
   10453             :  */
   10454             :   /*else*/ {
   10455           0 :     __pyx_v_info->strides = NULL;
   10456             :   }
   10457          94 :   __pyx_L7:;
   10458             : 
   10459             :   /* "View.MemoryView":536
   10460             :  *             info.strides = NULL
   10461             :  * 
   10462             :  *         if flags & PyBUF_INDIRECT:             # <<<<<<<<<<<<<<
   10463             :  *             info.suboffsets = self.view.suboffsets
   10464             :  *         else:
   10465             :  */
   10466          94 :   __pyx_t_1 = ((__pyx_v_flags & PyBUF_INDIRECT) != 0);
   10467          94 :   if (__pyx_t_1) {
   10468             : 
   10469             :     /* "View.MemoryView":537
   10470             :  * 
   10471             :  *         if flags & PyBUF_INDIRECT:
   10472             :  *             info.suboffsets = self.view.suboffsets             # <<<<<<<<<<<<<<
   10473             :  *         else:
   10474             :  *             info.suboffsets = NULL
   10475             :  */
   10476          94 :     __pyx_t_3 = __pyx_v_self->view.suboffsets;
   10477          94 :     __pyx_v_info->suboffsets = __pyx_t_3;
   10478             : 
   10479             :     /* "View.MemoryView":536
   10480             :  *             info.strides = NULL
   10481             :  * 
   10482             :  *         if flags & PyBUF_INDIRECT:             # <<<<<<<<<<<<<<
   10483             :  *             info.suboffsets = self.view.suboffsets
   10484             :  *         else:
   10485             :  */
   10486          94 :     goto __pyx_L8;
   10487             :   }
   10488             : 
   10489             :   /* "View.MemoryView":539
   10490             :  *             info.suboffsets = self.view.suboffsets
   10491             :  *         else:
   10492             :  *             info.suboffsets = NULL             # <<<<<<<<<<<<<<
   10493             :  * 
   10494             :  *         if flags & PyBUF_FORMAT:
   10495             :  */
   10496             :   /*else*/ {
   10497           0 :     __pyx_v_info->suboffsets = NULL;
   10498             :   }
   10499          94 :   __pyx_L8:;
   10500             : 
   10501             :   /* "View.MemoryView":541
   10502             :  *             info.suboffsets = NULL
   10503             :  * 
   10504             :  *         if flags & PyBUF_FORMAT:             # <<<<<<<<<<<<<<
   10505             :  *             info.format = self.view.format
   10506             :  *         else:
   10507             :  */
   10508          94 :   __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
   10509          94 :   if (__pyx_t_1) {
   10510             : 
   10511             :     /* "View.MemoryView":542
   10512             :  * 
   10513             :  *         if flags & PyBUF_FORMAT:
   10514             :  *             info.format = self.view.format             # <<<<<<<<<<<<<<
   10515             :  *         else:
   10516             :  *             info.format = NULL
   10517             :  */
   10518          94 :     __pyx_t_4 = __pyx_v_self->view.format;
   10519          94 :     __pyx_v_info->format = __pyx_t_4;
   10520             : 
   10521             :     /* "View.MemoryView":541
   10522             :  *             info.suboffsets = NULL
   10523             :  * 
   10524             :  *         if flags & PyBUF_FORMAT:             # <<<<<<<<<<<<<<
   10525             :  *             info.format = self.view.format
   10526             :  *         else:
   10527             :  */
   10528          94 :     goto __pyx_L9;
   10529             :   }
   10530             : 
   10531             :   /* "View.MemoryView":544
   10532             :  *             info.format = self.view.format
   10533             :  *         else:
   10534             :  *             info.format = NULL             # <<<<<<<<<<<<<<
   10535             :  * 
   10536             :  *         info.buf = self.view.buf
   10537             :  */
   10538             :   /*else*/ {
   10539           0 :     __pyx_v_info->format = NULL;
   10540             :   }
   10541          94 :   __pyx_L9:;
   10542             : 
   10543             :   /* "View.MemoryView":546
   10544             :  *             info.format = NULL
   10545             :  * 
   10546             :  *         info.buf = self.view.buf             # <<<<<<<<<<<<<<
   10547             :  *         info.ndim = self.view.ndim
   10548             :  *         info.itemsize = self.view.itemsize
   10549             :  */
   10550          94 :   __pyx_t_5 = __pyx_v_self->view.buf;
   10551          94 :   __pyx_v_info->buf = __pyx_t_5;
   10552             : 
   10553             :   /* "View.MemoryView":547
   10554             :  * 
   10555             :  *         info.buf = self.view.buf
   10556             :  *         info.ndim = self.view.ndim             # <<<<<<<<<<<<<<
   10557             :  *         info.itemsize = self.view.itemsize
   10558             :  *         info.len = self.view.len
   10559             :  */
   10560          94 :   __pyx_t_6 = __pyx_v_self->view.ndim;
   10561          94 :   __pyx_v_info->ndim = __pyx_t_6;
   10562             : 
   10563             :   /* "View.MemoryView":548
   10564             :  *         info.buf = self.view.buf
   10565             :  *         info.ndim = self.view.ndim
   10566             :  *         info.itemsize = self.view.itemsize             # <<<<<<<<<<<<<<
   10567             :  *         info.len = self.view.len
   10568             :  *         info.readonly = self.view.readonly
   10569             :  */
   10570          94 :   __pyx_t_7 = __pyx_v_self->view.itemsize;
   10571          94 :   __pyx_v_info->itemsize = __pyx_t_7;
   10572             : 
   10573             :   /* "View.MemoryView":549
   10574             :  *         info.ndim = self.view.ndim
   10575             :  *         info.itemsize = self.view.itemsize
   10576             :  *         info.len = self.view.len             # <<<<<<<<<<<<<<
   10577             :  *         info.readonly = self.view.readonly
   10578             :  *         info.obj = self
   10579             :  */
   10580          94 :   __pyx_t_7 = __pyx_v_self->view.len;
   10581          94 :   __pyx_v_info->len = __pyx_t_7;
   10582             : 
   10583             :   /* "View.MemoryView":550
   10584             :  *         info.itemsize = self.view.itemsize
   10585             :  *         info.len = self.view.len
   10586             :  *         info.readonly = self.view.readonly             # <<<<<<<<<<<<<<
   10587             :  *         info.obj = self
   10588             :  * 
   10589             :  */
   10590          94 :   __pyx_t_1 = __pyx_v_self->view.readonly;
   10591          94 :   __pyx_v_info->readonly = __pyx_t_1;
   10592             : 
   10593             :   /* "View.MemoryView":551
   10594             :  *         info.len = self.view.len
   10595             :  *         info.readonly = self.view.readonly
   10596             :  *         info.obj = self             # <<<<<<<<<<<<<<
   10597             :  * 
   10598             :  * 
   10599             :  */
   10600          94 :   __Pyx_INCREF((PyObject *)__pyx_v_self);
   10601          94 :   __Pyx_GIVEREF((PyObject *)__pyx_v_self);
   10602          94 :   __Pyx_GOTREF(__pyx_v_info->obj);
   10603          94 :   __Pyx_DECREF(__pyx_v_info->obj);
   10604          94 :   __pyx_v_info->obj = ((PyObject *)__pyx_v_self);
   10605             : 
   10606             :   /* "View.MemoryView":521
   10607             :  *             itemp[i] = c
   10608             :  * 
   10609             :  *     @cname('getbuffer')             # <<<<<<<<<<<<<<
   10610             :  *     def __getbuffer__(self, Py_buffer *info, int flags):
   10611             :  *         if flags & PyBUF_WRITABLE and self.view.readonly:
   10612             :  */
   10613             : 
   10614             :   /* function exit code */
   10615          94 :   __pyx_r = 0;
   10616          94 :   goto __pyx_L0;
   10617           0 :   __pyx_L1_error:;
   10618           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   10619           0 :   __pyx_r = -1;
   10620           0 :   if (__pyx_v_info->obj != NULL) {
   10621           0 :     __Pyx_GOTREF(__pyx_v_info->obj);
   10622           0 :     __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
   10623             :   }
   10624           0 :   goto __pyx_L2;
   10625          94 :   __pyx_L0:;
   10626          94 :   if (__pyx_v_info->obj == Py_None) {
   10627           0 :     __Pyx_GOTREF(__pyx_v_info->obj);
   10628           0 :     __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
   10629             :   }
   10630          94 :   __pyx_L2:;
   10631             :   __Pyx_RefNannyFinishContext();
   10632             :   return __pyx_r;
   10633             : }
   10634             : 
   10635             : /* "View.MemoryView":554
   10636             :  * 
   10637             :  * 
   10638             :  *     @property             # <<<<<<<<<<<<<<
   10639             :  *     def T(self):
   10640             :  *         cdef _memoryviewslice result = memoryview_copy(self)
   10641             :  */
   10642             : 
   10643             : /* Python wrapper */
   10644             : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(PyObject *__pyx_v_self); /*proto*/
   10645           0 : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(PyObject *__pyx_v_self) {
   10646           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   10647           0 :   PyObject *__pyx_r = 0;
   10648             :   __Pyx_RefNannyDeclarations
   10649           0 :   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
   10650           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
   10651           0 :   __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
   10652             : 
   10653             :   /* function exit code */
   10654           0 :   __Pyx_RefNannyFinishContext();
   10655           0 :   return __pyx_r;
   10656             : }
   10657             : 
   10658           0 : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
   10659           0 :   struct __pyx_memoryviewslice_obj *__pyx_v_result = 0;
   10660           0 :   PyObject *__pyx_r = NULL;
   10661             :   __Pyx_RefNannyDeclarations
   10662           0 :   PyObject *__pyx_t_1 = NULL;
   10663           0 :   int __pyx_t_2;
   10664           0 :   int __pyx_lineno = 0;
   10665           0 :   const char *__pyx_filename = NULL;
   10666           0 :   int __pyx_clineno = 0;
   10667           0 :   __Pyx_RefNannySetupContext("__get__", 1);
   10668             : 
   10669             :   /* "View.MemoryView":556
   10670             :  *     @property
   10671             :  *     def T(self):
   10672             :  *         cdef _memoryviewslice result = memoryview_copy(self)             # <<<<<<<<<<<<<<
   10673             :  *         transpose_memslice(&result.from_slice)
   10674             :  *         return result
   10675             :  */
   10676           0 :   __pyx_t_1 = __pyx_memoryview_copy_object(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 556, __pyx_L1_error)
   10677           0 :   __Pyx_GOTREF(__pyx_t_1);
   10678           0 :   if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_memoryviewslice_type))))) __PYX_ERR(1, 556, __pyx_L1_error)
   10679           0 :   __pyx_v_result = ((struct __pyx_memoryviewslice_obj *)__pyx_t_1);
   10680           0 :   __pyx_t_1 = 0;
   10681             : 
   10682             :   /* "View.MemoryView":557
   10683             :  *     def T(self):
   10684             :  *         cdef _memoryviewslice result = memoryview_copy(self)
   10685             :  *         transpose_memslice(&result.from_slice)             # <<<<<<<<<<<<<<
   10686             :  *         return result
   10687             :  * 
   10688             :  */
   10689           0 :   __pyx_t_2 = __pyx_memslice_transpose((&__pyx_v_result->from_slice)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 557, __pyx_L1_error)
   10690             : 
   10691             :   /* "View.MemoryView":558
   10692             :  *         cdef _memoryviewslice result = memoryview_copy(self)
   10693             :  *         transpose_memslice(&result.from_slice)
   10694             :  *         return result             # <<<<<<<<<<<<<<
   10695             :  * 
   10696             :  *     @property
   10697             :  */
   10698           0 :   __Pyx_XDECREF(__pyx_r);
   10699           0 :   __Pyx_INCREF((PyObject *)__pyx_v_result);
   10700           0 :   __pyx_r = ((PyObject *)__pyx_v_result);
   10701           0 :   goto __pyx_L0;
   10702             : 
   10703             :   /* "View.MemoryView":554
   10704             :  * 
   10705             :  * 
   10706             :  *     @property             # <<<<<<<<<<<<<<
   10707             :  *     def T(self):
   10708             :  *         cdef _memoryviewslice result = memoryview_copy(self)
   10709             :  */
   10710             : 
   10711             :   /* function exit code */
   10712           0 :   __pyx_L1_error:;
   10713           0 :   __Pyx_XDECREF(__pyx_t_1);
   10714           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.T.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   10715           0 :   __pyx_r = NULL;
   10716           0 :   __pyx_L0:;
   10717           0 :   __Pyx_XDECREF((PyObject *)__pyx_v_result);
   10718           0 :   __Pyx_XGIVEREF(__pyx_r);
   10719           0 :   __Pyx_RefNannyFinishContext();
   10720           0 :   return __pyx_r;
   10721             : }
   10722             : 
   10723             : /* "View.MemoryView":560
   10724             :  *         return result
   10725             :  * 
   10726             :  *     @property             # <<<<<<<<<<<<<<
   10727             :  *     def base(self):
   10728             :  *         return self._get_base()
   10729             :  */
   10730             : 
   10731             : /* Python wrapper */
   10732             : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(PyObject *__pyx_v_self); /*proto*/
   10733           0 : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(PyObject *__pyx_v_self) {
   10734           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   10735           0 :   PyObject *__pyx_r = 0;
   10736             :   __Pyx_RefNannyDeclarations
   10737           0 :   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
   10738           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
   10739           0 :   __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
   10740             : 
   10741             :   /* function exit code */
   10742           0 :   __Pyx_RefNannyFinishContext();
   10743           0 :   return __pyx_r;
   10744             : }
   10745             : 
   10746           0 : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
   10747           0 :   PyObject *__pyx_r = NULL;
   10748             :   __Pyx_RefNannyDeclarations
   10749           0 :   PyObject *__pyx_t_1 = NULL;
   10750           0 :   int __pyx_lineno = 0;
   10751           0 :   const char *__pyx_filename = NULL;
   10752           0 :   int __pyx_clineno = 0;
   10753           0 :   __Pyx_RefNannySetupContext("__get__", 1);
   10754             : 
   10755             :   /* "View.MemoryView":562
   10756             :  *     @property
   10757             :  *     def base(self):
   10758             :  *         return self._get_base()             # <<<<<<<<<<<<<<
   10759             :  * 
   10760             :  *     cdef _get_base(self):
   10761             :  */
   10762           0 :   __Pyx_XDECREF(__pyx_r);
   10763           0 :   __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->_get_base(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 562, __pyx_L1_error)
   10764           0 :   __Pyx_GOTREF(__pyx_t_1);
   10765           0 :   __pyx_r = __pyx_t_1;
   10766           0 :   __pyx_t_1 = 0;
   10767           0 :   goto __pyx_L0;
   10768             : 
   10769             :   /* "View.MemoryView":560
   10770             :  *         return result
   10771             :  * 
   10772             :  *     @property             # <<<<<<<<<<<<<<
   10773             :  *     def base(self):
   10774             :  *         return self._get_base()
   10775             :  */
   10776             : 
   10777             :   /* function exit code */
   10778           0 :   __pyx_L1_error:;
   10779           0 :   __Pyx_XDECREF(__pyx_t_1);
   10780           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.base.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   10781           0 :   __pyx_r = NULL;
   10782           0 :   __pyx_L0:;
   10783           0 :   __Pyx_XGIVEREF(__pyx_r);
   10784           0 :   __Pyx_RefNannyFinishContext();
   10785           0 :   return __pyx_r;
   10786             : }
   10787             : 
   10788             : /* "View.MemoryView":564
   10789             :  *         return self._get_base()
   10790             :  * 
   10791             :  *     cdef _get_base(self):             # <<<<<<<<<<<<<<
   10792             :  *         return self.obj
   10793             :  * 
   10794             :  */
   10795             : 
   10796          94 : static PyObject *__pyx_memoryview__get_base(struct __pyx_memoryview_obj *__pyx_v_self) {
   10797          94 :   PyObject *__pyx_r = NULL;
   10798             :   __Pyx_RefNannyDeclarations
   10799          94 :   __Pyx_RefNannySetupContext("_get_base", 1);
   10800             : 
   10801             :   /* "View.MemoryView":565
   10802             :  * 
   10803             :  *     cdef _get_base(self):
   10804             :  *         return self.obj             # <<<<<<<<<<<<<<
   10805             :  * 
   10806             :  *     @property
   10807             :  */
   10808          94 :   __Pyx_XDECREF(__pyx_r);
   10809          94 :   __Pyx_INCREF(__pyx_v_self->obj);
   10810          94 :   __pyx_r = __pyx_v_self->obj;
   10811          94 :   goto __pyx_L0;
   10812             : 
   10813             :   /* "View.MemoryView":564
   10814             :  *         return self._get_base()
   10815             :  * 
   10816             :  *     cdef _get_base(self):             # <<<<<<<<<<<<<<
   10817             :  *         return self.obj
   10818             :  * 
   10819             :  */
   10820             : 
   10821             :   /* function exit code */
   10822          94 :   __pyx_L0:;
   10823          94 :   __Pyx_XGIVEREF(__pyx_r);
   10824          94 :   __Pyx_RefNannyFinishContext();
   10825          94 :   return __pyx_r;
   10826             : }
   10827             : 
   10828             : /* "View.MemoryView":567
   10829             :  *         return self.obj
   10830             :  * 
   10831             :  *     @property             # <<<<<<<<<<<<<<
   10832             :  *     def shape(self):
   10833             :  *         return tuple([length for length in self.view.shape[:self.view.ndim]])
   10834             :  */
   10835             : 
   10836             : /* Python wrapper */
   10837             : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(PyObject *__pyx_v_self); /*proto*/
   10838           0 : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(PyObject *__pyx_v_self) {
   10839           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   10840           0 :   PyObject *__pyx_r = 0;
   10841             :   __Pyx_RefNannyDeclarations
   10842           0 :   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
   10843           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
   10844           0 :   __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
   10845             : 
   10846             :   /* function exit code */
   10847           0 :   __Pyx_RefNannyFinishContext();
   10848           0 :   return __pyx_r;
   10849             : }
   10850             : 
   10851           0 : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
   10852           0 :   Py_ssize_t __pyx_7genexpr__pyx_v_length;
   10853           0 :   PyObject *__pyx_r = NULL;
   10854             :   __Pyx_RefNannyDeclarations
   10855           0 :   PyObject *__pyx_t_1 = NULL;
   10856           0 :   Py_ssize_t *__pyx_t_2;
   10857           0 :   Py_ssize_t *__pyx_t_3;
   10858           0 :   Py_ssize_t *__pyx_t_4;
   10859           0 :   PyObject *__pyx_t_5 = NULL;
   10860           0 :   int __pyx_lineno = 0;
   10861           0 :   const char *__pyx_filename = NULL;
   10862           0 :   int __pyx_clineno = 0;
   10863           0 :   __Pyx_RefNannySetupContext("__get__", 1);
   10864             : 
   10865             :   /* "View.MemoryView":569
   10866             :  *     @property
   10867             :  *     def shape(self):
   10868             :  *         return tuple([length for length in self.view.shape[:self.view.ndim]])             # <<<<<<<<<<<<<<
   10869             :  * 
   10870             :  *     @property
   10871             :  */
   10872           0 :   __Pyx_XDECREF(__pyx_r);
   10873             :   { /* enter inner scope */
   10874           0 :     __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 569, __pyx_L1_error)
   10875           0 :     __Pyx_GOTREF(__pyx_t_1);
   10876           0 :     __pyx_t_3 = (__pyx_v_self->view.shape + __pyx_v_self->view.ndim);
   10877           0 :     for (__pyx_t_4 = __pyx_v_self->view.shape; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) {
   10878           0 :       __pyx_t_2 = __pyx_t_4;
   10879           0 :       __pyx_7genexpr__pyx_v_length = (__pyx_t_2[0]);
   10880           0 :       __pyx_t_5 = PyInt_FromSsize_t(__pyx_7genexpr__pyx_v_length); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 569, __pyx_L1_error)
   10881           0 :       __Pyx_GOTREF(__pyx_t_5);
   10882           0 :       if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(1, 569, __pyx_L1_error)
   10883           0 :       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   10884             :     }
   10885             :   } /* exit inner scope */
   10886           0 :   __pyx_t_5 = PyList_AsTuple(((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 569, __pyx_L1_error)
   10887           0 :   __Pyx_GOTREF(__pyx_t_5);
   10888           0 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   10889           0 :   __pyx_r = __pyx_t_5;
   10890           0 :   __pyx_t_5 = 0;
   10891           0 :   goto __pyx_L0;
   10892             : 
   10893             :   /* "View.MemoryView":567
   10894             :  *         return self.obj
   10895             :  * 
   10896             :  *     @property             # <<<<<<<<<<<<<<
   10897             :  *     def shape(self):
   10898             :  *         return tuple([length for length in self.view.shape[:self.view.ndim]])
   10899             :  */
   10900             : 
   10901             :   /* function exit code */
   10902           0 :   __pyx_L1_error:;
   10903           0 :   __Pyx_XDECREF(__pyx_t_1);
   10904           0 :   __Pyx_XDECREF(__pyx_t_5);
   10905           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.shape.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   10906           0 :   __pyx_r = NULL;
   10907           0 :   __pyx_L0:;
   10908           0 :   __Pyx_XGIVEREF(__pyx_r);
   10909           0 :   __Pyx_RefNannyFinishContext();
   10910           0 :   return __pyx_r;
   10911             : }
   10912             : 
   10913             : /* "View.MemoryView":571
   10914             :  *         return tuple([length for length in self.view.shape[:self.view.ndim]])
   10915             :  * 
   10916             :  *     @property             # <<<<<<<<<<<<<<
   10917             :  *     def strides(self):
   10918             :  *         if self.view.strides == NULL:
   10919             :  */
   10920             : 
   10921             : /* Python wrapper */
   10922             : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(PyObject *__pyx_v_self); /*proto*/
   10923           0 : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(PyObject *__pyx_v_self) {
   10924           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   10925           0 :   PyObject *__pyx_r = 0;
   10926             :   __Pyx_RefNannyDeclarations
   10927           0 :   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
   10928           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
   10929           0 :   __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
   10930             : 
   10931             :   /* function exit code */
   10932           0 :   __Pyx_RefNannyFinishContext();
   10933           0 :   return __pyx_r;
   10934             : }
   10935             : 
   10936           0 : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
   10937           0 :   Py_ssize_t __pyx_8genexpr1__pyx_v_stride;
   10938           0 :   PyObject *__pyx_r = NULL;
   10939             :   __Pyx_RefNannyDeclarations
   10940           0 :   int __pyx_t_1;
   10941           0 :   PyObject *__pyx_t_2 = NULL;
   10942           0 :   Py_ssize_t *__pyx_t_3;
   10943           0 :   Py_ssize_t *__pyx_t_4;
   10944           0 :   Py_ssize_t *__pyx_t_5;
   10945           0 :   PyObject *__pyx_t_6 = NULL;
   10946           0 :   int __pyx_lineno = 0;
   10947           0 :   const char *__pyx_filename = NULL;
   10948           0 :   int __pyx_clineno = 0;
   10949           0 :   __Pyx_RefNannySetupContext("__get__", 1);
   10950             : 
   10951             :   /* "View.MemoryView":573
   10952             :  *     @property
   10953             :  *     def strides(self):
   10954             :  *         if self.view.strides == NULL:             # <<<<<<<<<<<<<<
   10955             :  * 
   10956             :  *             raise ValueError, "Buffer view does not expose strides"
   10957             :  */
   10958           0 :   __pyx_t_1 = (__pyx_v_self->view.strides == NULL);
   10959           0 :   if (unlikely(__pyx_t_1)) {
   10960             : 
   10961             :     /* "View.MemoryView":575
   10962             :  *         if self.view.strides == NULL:
   10963             :  * 
   10964             :  *             raise ValueError, "Buffer view does not expose strides"             # <<<<<<<<<<<<<<
   10965             :  * 
   10966             :  *         return tuple([stride for stride in self.view.strides[:self.view.ndim]])
   10967             :  */
   10968           0 :     __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_Buffer_view_does_not_expose_stri, 0, 0);
   10969           0 :     __PYX_ERR(1, 575, __pyx_L1_error)
   10970             : 
   10971             :     /* "View.MemoryView":573
   10972             :  *     @property
   10973             :  *     def strides(self):
   10974             :  *         if self.view.strides == NULL:             # <<<<<<<<<<<<<<
   10975             :  * 
   10976             :  *             raise ValueError, "Buffer view does not expose strides"
   10977             :  */
   10978             :   }
   10979             : 
   10980             :   /* "View.MemoryView":577
   10981             :  *             raise ValueError, "Buffer view does not expose strides"
   10982             :  * 
   10983             :  *         return tuple([stride for stride in self.view.strides[:self.view.ndim]])             # <<<<<<<<<<<<<<
   10984             :  * 
   10985             :  *     @property
   10986             :  */
   10987           0 :   __Pyx_XDECREF(__pyx_r);
   10988             :   { /* enter inner scope */
   10989           0 :     __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 577, __pyx_L1_error)
   10990           0 :     __Pyx_GOTREF(__pyx_t_2);
   10991           0 :     __pyx_t_4 = (__pyx_v_self->view.strides + __pyx_v_self->view.ndim);
   10992           0 :     for (__pyx_t_5 = __pyx_v_self->view.strides; __pyx_t_5 < __pyx_t_4; __pyx_t_5++) {
   10993           0 :       __pyx_t_3 = __pyx_t_5;
   10994           0 :       __pyx_8genexpr1__pyx_v_stride = (__pyx_t_3[0]);
   10995           0 :       __pyx_t_6 = PyInt_FromSsize_t(__pyx_8genexpr1__pyx_v_stride); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 577, __pyx_L1_error)
   10996           0 :       __Pyx_GOTREF(__pyx_t_6);
   10997           0 :       if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_6))) __PYX_ERR(1, 577, __pyx_L1_error)
   10998           0 :       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
   10999             :     }
   11000             :   } /* exit inner scope */
   11001           0 :   __pyx_t_6 = PyList_AsTuple(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 577, __pyx_L1_error)
   11002           0 :   __Pyx_GOTREF(__pyx_t_6);
   11003           0 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   11004           0 :   __pyx_r = __pyx_t_6;
   11005           0 :   __pyx_t_6 = 0;
   11006           0 :   goto __pyx_L0;
   11007             : 
   11008             :   /* "View.MemoryView":571
   11009             :  *         return tuple([length for length in self.view.shape[:self.view.ndim]])
   11010             :  * 
   11011             :  *     @property             # <<<<<<<<<<<<<<
   11012             :  *     def strides(self):
   11013             :  *         if self.view.strides == NULL:
   11014             :  */
   11015             : 
   11016             :   /* function exit code */
   11017           0 :   __pyx_L1_error:;
   11018           0 :   __Pyx_XDECREF(__pyx_t_2);
   11019           0 :   __Pyx_XDECREF(__pyx_t_6);
   11020           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.strides.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   11021           0 :   __pyx_r = NULL;
   11022           0 :   __pyx_L0:;
   11023           0 :   __Pyx_XGIVEREF(__pyx_r);
   11024           0 :   __Pyx_RefNannyFinishContext();
   11025           0 :   return __pyx_r;
   11026             : }
   11027             : 
   11028             : /* "View.MemoryView":579
   11029             :  *         return tuple([stride for stride in self.view.strides[:self.view.ndim]])
   11030             :  * 
   11031             :  *     @property             # <<<<<<<<<<<<<<
   11032             :  *     def suboffsets(self):
   11033             :  *         if self.view.suboffsets == NULL:
   11034             :  */
   11035             : 
   11036             : /* Python wrapper */
   11037             : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(PyObject *__pyx_v_self); /*proto*/
   11038           0 : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(PyObject *__pyx_v_self) {
   11039           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   11040           0 :   PyObject *__pyx_r = 0;
   11041             :   __Pyx_RefNannyDeclarations
   11042           0 :   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
   11043           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
   11044           0 :   __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
   11045             : 
   11046             :   /* function exit code */
   11047           0 :   __Pyx_RefNannyFinishContext();
   11048           0 :   return __pyx_r;
   11049             : }
   11050             : 
   11051           0 : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
   11052           0 :   Py_ssize_t __pyx_8genexpr2__pyx_v_suboffset;
   11053           0 :   PyObject *__pyx_r = NULL;
   11054             :   __Pyx_RefNannyDeclarations
   11055           0 :   int __pyx_t_1;
   11056           0 :   PyObject *__pyx_t_2 = NULL;
   11057           0 :   Py_ssize_t *__pyx_t_3;
   11058           0 :   Py_ssize_t *__pyx_t_4;
   11059           0 :   Py_ssize_t *__pyx_t_5;
   11060           0 :   PyObject *__pyx_t_6 = NULL;
   11061           0 :   int __pyx_lineno = 0;
   11062           0 :   const char *__pyx_filename = NULL;
   11063           0 :   int __pyx_clineno = 0;
   11064           0 :   __Pyx_RefNannySetupContext("__get__", 1);
   11065             : 
   11066             :   /* "View.MemoryView":581
   11067             :  *     @property
   11068             :  *     def suboffsets(self):
   11069             :  *         if self.view.suboffsets == NULL:             # <<<<<<<<<<<<<<
   11070             :  *             return (-1,) * self.view.ndim
   11071             :  * 
   11072             :  */
   11073           0 :   __pyx_t_1 = (__pyx_v_self->view.suboffsets == NULL);
   11074           0 :   if (__pyx_t_1) {
   11075             : 
   11076             :     /* "View.MemoryView":582
   11077             :  *     def suboffsets(self):
   11078             :  *         if self.view.suboffsets == NULL:
   11079             :  *             return (-1,) * self.view.ndim             # <<<<<<<<<<<<<<
   11080             :  * 
   11081             :  *         return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])
   11082             :  */
   11083           0 :     __Pyx_XDECREF(__pyx_r);
   11084           0 :     __pyx_t_2 = __Pyx_PySequence_Multiply(__pyx_tuple__4, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 582, __pyx_L1_error)
   11085           0 :     __Pyx_GOTREF(__pyx_t_2);
   11086           0 :     __pyx_r = __pyx_t_2;
   11087           0 :     __pyx_t_2 = 0;
   11088           0 :     goto __pyx_L0;
   11089             : 
   11090             :     /* "View.MemoryView":581
   11091             :  *     @property
   11092             :  *     def suboffsets(self):
   11093             :  *         if self.view.suboffsets == NULL:             # <<<<<<<<<<<<<<
   11094             :  *             return (-1,) * self.view.ndim
   11095             :  * 
   11096             :  */
   11097             :   }
   11098             : 
   11099             :   /* "View.MemoryView":584
   11100             :  *             return (-1,) * self.view.ndim
   11101             :  * 
   11102             :  *         return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])             # <<<<<<<<<<<<<<
   11103             :  * 
   11104             :  *     @property
   11105             :  */
   11106           0 :   __Pyx_XDECREF(__pyx_r);
   11107             :   { /* enter inner scope */
   11108           0 :     __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 584, __pyx_L1_error)
   11109           0 :     __Pyx_GOTREF(__pyx_t_2);
   11110           0 :     __pyx_t_4 = (__pyx_v_self->view.suboffsets + __pyx_v_self->view.ndim);
   11111           0 :     for (__pyx_t_5 = __pyx_v_self->view.suboffsets; __pyx_t_5 < __pyx_t_4; __pyx_t_5++) {
   11112           0 :       __pyx_t_3 = __pyx_t_5;
   11113           0 :       __pyx_8genexpr2__pyx_v_suboffset = (__pyx_t_3[0]);
   11114           0 :       __pyx_t_6 = PyInt_FromSsize_t(__pyx_8genexpr2__pyx_v_suboffset); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 584, __pyx_L1_error)
   11115           0 :       __Pyx_GOTREF(__pyx_t_6);
   11116           0 :       if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_6))) __PYX_ERR(1, 584, __pyx_L1_error)
   11117           0 :       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
   11118             :     }
   11119             :   } /* exit inner scope */
   11120           0 :   __pyx_t_6 = PyList_AsTuple(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 584, __pyx_L1_error)
   11121           0 :   __Pyx_GOTREF(__pyx_t_6);
   11122           0 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   11123           0 :   __pyx_r = __pyx_t_6;
   11124           0 :   __pyx_t_6 = 0;
   11125           0 :   goto __pyx_L0;
   11126             : 
   11127             :   /* "View.MemoryView":579
   11128             :  *         return tuple([stride for stride in self.view.strides[:self.view.ndim]])
   11129             :  * 
   11130             :  *     @property             # <<<<<<<<<<<<<<
   11131             :  *     def suboffsets(self):
   11132             :  *         if self.view.suboffsets == NULL:
   11133             :  */
   11134             : 
   11135             :   /* function exit code */
   11136           0 :   __pyx_L1_error:;
   11137           0 :   __Pyx_XDECREF(__pyx_t_2);
   11138           0 :   __Pyx_XDECREF(__pyx_t_6);
   11139           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.suboffsets.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   11140           0 :   __pyx_r = NULL;
   11141           0 :   __pyx_L0:;
   11142           0 :   __Pyx_XGIVEREF(__pyx_r);
   11143           0 :   __Pyx_RefNannyFinishContext();
   11144           0 :   return __pyx_r;
   11145             : }
   11146             : 
   11147             : /* "View.MemoryView":586
   11148             :  *         return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])
   11149             :  * 
   11150             :  *     @property             # <<<<<<<<<<<<<<
   11151             :  *     def ndim(self):
   11152             :  *         return self.view.ndim
   11153             :  */
   11154             : 
   11155             : /* Python wrapper */
   11156             : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(PyObject *__pyx_v_self); /*proto*/
   11157           0 : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(PyObject *__pyx_v_self) {
   11158           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   11159           0 :   PyObject *__pyx_r = 0;
   11160             :   __Pyx_RefNannyDeclarations
   11161           0 :   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
   11162           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
   11163           0 :   __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
   11164             : 
   11165             :   /* function exit code */
   11166           0 :   __Pyx_RefNannyFinishContext();
   11167           0 :   return __pyx_r;
   11168             : }
   11169             : 
   11170           0 : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
   11171           0 :   PyObject *__pyx_r = NULL;
   11172             :   __Pyx_RefNannyDeclarations
   11173           0 :   PyObject *__pyx_t_1 = NULL;
   11174           0 :   int __pyx_lineno = 0;
   11175           0 :   const char *__pyx_filename = NULL;
   11176           0 :   int __pyx_clineno = 0;
   11177           0 :   __Pyx_RefNannySetupContext("__get__", 1);
   11178             : 
   11179             :   /* "View.MemoryView":588
   11180             :  *     @property
   11181             :  *     def ndim(self):
   11182             :  *         return self.view.ndim             # <<<<<<<<<<<<<<
   11183             :  * 
   11184             :  *     @property
   11185             :  */
   11186           0 :   __Pyx_XDECREF(__pyx_r);
   11187           0 :   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->view.ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 588, __pyx_L1_error)
   11188           0 :   __Pyx_GOTREF(__pyx_t_1);
   11189           0 :   __pyx_r = __pyx_t_1;
   11190           0 :   __pyx_t_1 = 0;
   11191           0 :   goto __pyx_L0;
   11192             : 
   11193             :   /* "View.MemoryView":586
   11194             :  *         return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])
   11195             :  * 
   11196             :  *     @property             # <<<<<<<<<<<<<<
   11197             :  *     def ndim(self):
   11198             :  *         return self.view.ndim
   11199             :  */
   11200             : 
   11201             :   /* function exit code */
   11202           0 :   __pyx_L1_error:;
   11203           0 :   __Pyx_XDECREF(__pyx_t_1);
   11204           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.ndim.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   11205           0 :   __pyx_r = NULL;
   11206           0 :   __pyx_L0:;
   11207           0 :   __Pyx_XGIVEREF(__pyx_r);
   11208           0 :   __Pyx_RefNannyFinishContext();
   11209           0 :   return __pyx_r;
   11210             : }
   11211             : 
   11212             : /* "View.MemoryView":590
   11213             :  *         return self.view.ndim
   11214             :  * 
   11215             :  *     @property             # <<<<<<<<<<<<<<
   11216             :  *     def itemsize(self):
   11217             :  *         return self.view.itemsize
   11218             :  */
   11219             : 
   11220             : /* Python wrapper */
   11221             : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(PyObject *__pyx_v_self); /*proto*/
   11222           0 : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(PyObject *__pyx_v_self) {
   11223           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   11224           0 :   PyObject *__pyx_r = 0;
   11225             :   __Pyx_RefNannyDeclarations
   11226           0 :   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
   11227           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
   11228           0 :   __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
   11229             : 
   11230             :   /* function exit code */
   11231           0 :   __Pyx_RefNannyFinishContext();
   11232           0 :   return __pyx_r;
   11233             : }
   11234             : 
   11235           0 : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
   11236           0 :   PyObject *__pyx_r = NULL;
   11237             :   __Pyx_RefNannyDeclarations
   11238           0 :   PyObject *__pyx_t_1 = NULL;
   11239           0 :   int __pyx_lineno = 0;
   11240           0 :   const char *__pyx_filename = NULL;
   11241           0 :   int __pyx_clineno = 0;
   11242           0 :   __Pyx_RefNannySetupContext("__get__", 1);
   11243             : 
   11244             :   /* "View.MemoryView":592
   11245             :  *     @property
   11246             :  *     def itemsize(self):
   11247             :  *         return self.view.itemsize             # <<<<<<<<<<<<<<
   11248             :  * 
   11249             :  *     @property
   11250             :  */
   11251           0 :   __Pyx_XDECREF(__pyx_r);
   11252           0 :   __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_self->view.itemsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 592, __pyx_L1_error)
   11253           0 :   __Pyx_GOTREF(__pyx_t_1);
   11254           0 :   __pyx_r = __pyx_t_1;
   11255           0 :   __pyx_t_1 = 0;
   11256           0 :   goto __pyx_L0;
   11257             : 
   11258             :   /* "View.MemoryView":590
   11259             :  *         return self.view.ndim
   11260             :  * 
   11261             :  *     @property             # <<<<<<<<<<<<<<
   11262             :  *     def itemsize(self):
   11263             :  *         return self.view.itemsize
   11264             :  */
   11265             : 
   11266             :   /* function exit code */
   11267           0 :   __pyx_L1_error:;
   11268           0 :   __Pyx_XDECREF(__pyx_t_1);
   11269           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.itemsize.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   11270           0 :   __pyx_r = NULL;
   11271           0 :   __pyx_L0:;
   11272           0 :   __Pyx_XGIVEREF(__pyx_r);
   11273           0 :   __Pyx_RefNannyFinishContext();
   11274           0 :   return __pyx_r;
   11275             : }
   11276             : 
   11277             : /* "View.MemoryView":594
   11278             :  *         return self.view.itemsize
   11279             :  * 
   11280             :  *     @property             # <<<<<<<<<<<<<<
   11281             :  *     def nbytes(self):
   11282             :  *         return self.size * self.view.itemsize
   11283             :  */
   11284             : 
   11285             : /* Python wrapper */
   11286             : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(PyObject *__pyx_v_self); /*proto*/
   11287           0 : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(PyObject *__pyx_v_self) {
   11288           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   11289           0 :   PyObject *__pyx_r = 0;
   11290             :   __Pyx_RefNannyDeclarations
   11291           0 :   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
   11292           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
   11293           0 :   __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
   11294             : 
   11295             :   /* function exit code */
   11296           0 :   __Pyx_RefNannyFinishContext();
   11297           0 :   return __pyx_r;
   11298             : }
   11299             : 
   11300           0 : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
   11301           0 :   PyObject *__pyx_r = NULL;
   11302             :   __Pyx_RefNannyDeclarations
   11303           0 :   PyObject *__pyx_t_1 = NULL;
   11304           0 :   PyObject *__pyx_t_2 = NULL;
   11305           0 :   PyObject *__pyx_t_3 = NULL;
   11306           0 :   int __pyx_lineno = 0;
   11307           0 :   const char *__pyx_filename = NULL;
   11308           0 :   int __pyx_clineno = 0;
   11309           0 :   __Pyx_RefNannySetupContext("__get__", 1);
   11310             : 
   11311             :   /* "View.MemoryView":596
   11312             :  *     @property
   11313             :  *     def nbytes(self):
   11314             :  *         return self.size * self.view.itemsize             # <<<<<<<<<<<<<<
   11315             :  * 
   11316             :  *     @property
   11317             :  */
   11318           0 :   __Pyx_XDECREF(__pyx_r);
   11319           0 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 596, __pyx_L1_error)
   11320           0 :   __Pyx_GOTREF(__pyx_t_1);
   11321           0 :   __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_self->view.itemsize); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 596, __pyx_L1_error)
   11322           0 :   __Pyx_GOTREF(__pyx_t_2);
   11323           0 :   __pyx_t_3 = PyNumber_Multiply(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 596, __pyx_L1_error)
   11324           0 :   __Pyx_GOTREF(__pyx_t_3);
   11325           0 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   11326           0 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   11327           0 :   __pyx_r = __pyx_t_3;
   11328           0 :   __pyx_t_3 = 0;
   11329           0 :   goto __pyx_L0;
   11330             : 
   11331             :   /* "View.MemoryView":594
   11332             :  *         return self.view.itemsize
   11333             :  * 
   11334             :  *     @property             # <<<<<<<<<<<<<<
   11335             :  *     def nbytes(self):
   11336             :  *         return self.size * self.view.itemsize
   11337             :  */
   11338             : 
   11339             :   /* function exit code */
   11340           0 :   __pyx_L1_error:;
   11341           0 :   __Pyx_XDECREF(__pyx_t_1);
   11342           0 :   __Pyx_XDECREF(__pyx_t_2);
   11343           0 :   __Pyx_XDECREF(__pyx_t_3);
   11344           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.nbytes.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   11345           0 :   __pyx_r = NULL;
   11346           0 :   __pyx_L0:;
   11347           0 :   __Pyx_XGIVEREF(__pyx_r);
   11348           0 :   __Pyx_RefNannyFinishContext();
   11349           0 :   return __pyx_r;
   11350             : }
   11351             : 
   11352             : /* "View.MemoryView":598
   11353             :  *         return self.size * self.view.itemsize
   11354             :  * 
   11355             :  *     @property             # <<<<<<<<<<<<<<
   11356             :  *     def size(self):
   11357             :  *         if self._size is None:
   11358             :  */
   11359             : 
   11360             : /* Python wrapper */
   11361             : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(PyObject *__pyx_v_self); /*proto*/
   11362           0 : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(PyObject *__pyx_v_self) {
   11363           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   11364           0 :   PyObject *__pyx_r = 0;
   11365             :   __Pyx_RefNannyDeclarations
   11366           0 :   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
   11367           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
   11368           0 :   __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
   11369             : 
   11370             :   /* function exit code */
   11371           0 :   __Pyx_RefNannyFinishContext();
   11372           0 :   return __pyx_r;
   11373             : }
   11374             : 
   11375           0 : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
   11376           0 :   PyObject *__pyx_v_result = NULL;
   11377           0 :   PyObject *__pyx_v_length = NULL;
   11378           0 :   PyObject *__pyx_r = NULL;
   11379             :   __Pyx_RefNannyDeclarations
   11380           0 :   int __pyx_t_1;
   11381           0 :   Py_ssize_t *__pyx_t_2;
   11382           0 :   Py_ssize_t *__pyx_t_3;
   11383           0 :   Py_ssize_t *__pyx_t_4;
   11384           0 :   PyObject *__pyx_t_5 = NULL;
   11385           0 :   int __pyx_lineno = 0;
   11386           0 :   const char *__pyx_filename = NULL;
   11387           0 :   int __pyx_clineno = 0;
   11388           0 :   __Pyx_RefNannySetupContext("__get__", 1);
   11389             : 
   11390             :   /* "View.MemoryView":600
   11391             :  *     @property
   11392             :  *     def size(self):
   11393             :  *         if self._size is None:             # <<<<<<<<<<<<<<
   11394             :  *             result = 1
   11395             :  * 
   11396             :  */
   11397           0 :   __pyx_t_1 = (__pyx_v_self->_size == Py_None);
   11398           0 :   if (__pyx_t_1) {
   11399             : 
   11400             :     /* "View.MemoryView":601
   11401             :  *     def size(self):
   11402             :  *         if self._size is None:
   11403             :  *             result = 1             # <<<<<<<<<<<<<<
   11404             :  * 
   11405             :  *             for length in self.view.shape[:self.view.ndim]:
   11406             :  */
   11407           0 :     __Pyx_INCREF(__pyx_int_1);
   11408           0 :     __pyx_v_result = __pyx_int_1;
   11409             : 
   11410             :     /* "View.MemoryView":603
   11411             :  *             result = 1
   11412             :  * 
   11413             :  *             for length in self.view.shape[:self.view.ndim]:             # <<<<<<<<<<<<<<
   11414             :  *                 result *= length
   11415             :  * 
   11416             :  */
   11417           0 :     __pyx_t_3 = (__pyx_v_self->view.shape + __pyx_v_self->view.ndim);
   11418           0 :     for (__pyx_t_4 = __pyx_v_self->view.shape; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) {
   11419           0 :       __pyx_t_2 = __pyx_t_4;
   11420           0 :       __pyx_t_5 = PyInt_FromSsize_t((__pyx_t_2[0])); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 603, __pyx_L1_error)
   11421           0 :       __Pyx_GOTREF(__pyx_t_5);
   11422           0 :       __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_5);
   11423           0 :       __pyx_t_5 = 0;
   11424             : 
   11425             :       /* "View.MemoryView":604
   11426             :  * 
   11427             :  *             for length in self.view.shape[:self.view.ndim]:
   11428             :  *                 result *= length             # <<<<<<<<<<<<<<
   11429             :  * 
   11430             :  *             self._size = result
   11431             :  */
   11432           0 :       __pyx_t_5 = PyNumber_InPlaceMultiply(__pyx_v_result, __pyx_v_length); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 604, __pyx_L1_error)
   11433           0 :       __Pyx_GOTREF(__pyx_t_5);
   11434           0 :       __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_5);
   11435           0 :       __pyx_t_5 = 0;
   11436             :     }
   11437             : 
   11438             :     /* "View.MemoryView":606
   11439             :  *                 result *= length
   11440             :  * 
   11441             :  *             self._size = result             # <<<<<<<<<<<<<<
   11442             :  * 
   11443             :  *         return self._size
   11444             :  */
   11445           0 :     __Pyx_INCREF(__pyx_v_result);
   11446           0 :     __Pyx_GIVEREF(__pyx_v_result);
   11447           0 :     __Pyx_GOTREF(__pyx_v_self->_size);
   11448           0 :     __Pyx_DECREF(__pyx_v_self->_size);
   11449           0 :     __pyx_v_self->_size = __pyx_v_result;
   11450             : 
   11451             :     /* "View.MemoryView":600
   11452             :  *     @property
   11453             :  *     def size(self):
   11454             :  *         if self._size is None:             # <<<<<<<<<<<<<<
   11455             :  *             result = 1
   11456             :  * 
   11457             :  */
   11458             :   }
   11459             : 
   11460             :   /* "View.MemoryView":608
   11461             :  *             self._size = result
   11462             :  * 
   11463             :  *         return self._size             # <<<<<<<<<<<<<<
   11464             :  * 
   11465             :  *     def __len__(self):
   11466             :  */
   11467           0 :   __Pyx_XDECREF(__pyx_r);
   11468           0 :   __Pyx_INCREF(__pyx_v_self->_size);
   11469           0 :   __pyx_r = __pyx_v_self->_size;
   11470           0 :   goto __pyx_L0;
   11471             : 
   11472             :   /* "View.MemoryView":598
   11473             :  *         return self.size * self.view.itemsize
   11474             :  * 
   11475             :  *     @property             # <<<<<<<<<<<<<<
   11476             :  *     def size(self):
   11477             :  *         if self._size is None:
   11478             :  */
   11479             : 
   11480             :   /* function exit code */
   11481           0 :   __pyx_L1_error:;
   11482           0 :   __Pyx_XDECREF(__pyx_t_5);
   11483           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   11484           0 :   __pyx_r = NULL;
   11485           0 :   __pyx_L0:;
   11486           0 :   __Pyx_XDECREF(__pyx_v_result);
   11487           0 :   __Pyx_XDECREF(__pyx_v_length);
   11488           0 :   __Pyx_XGIVEREF(__pyx_r);
   11489           0 :   __Pyx_RefNannyFinishContext();
   11490           0 :   return __pyx_r;
   11491             : }
   11492             : 
   11493             : /* "View.MemoryView":610
   11494             :  *         return self._size
   11495             :  * 
   11496             :  *     def __len__(self):             # <<<<<<<<<<<<<<
   11497             :  *         if self.view.ndim >= 1:
   11498             :  *             return self.view.shape[0]
   11499             :  */
   11500             : 
   11501             : /* Python wrapper */
   11502             : static Py_ssize_t __pyx_memoryview___len__(PyObject *__pyx_v_self); /*proto*/
   11503           0 : static Py_ssize_t __pyx_memoryview___len__(PyObject *__pyx_v_self) {
   11504           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   11505           0 :   Py_ssize_t __pyx_r;
   11506             :   __Pyx_RefNannyDeclarations
   11507           0 :   __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
   11508           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
   11509           0 :   __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(((struct __pyx_memoryview_obj *)__pyx_v_self));
   11510             : 
   11511             :   /* function exit code */
   11512           0 :   __Pyx_RefNannyFinishContext();
   11513           0 :   return __pyx_r;
   11514             : }
   11515             : 
   11516           0 : static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(struct __pyx_memoryview_obj *__pyx_v_self) {
   11517           0 :   Py_ssize_t __pyx_r;
   11518           0 :   int __pyx_t_1;
   11519             : 
   11520             :   /* "View.MemoryView":611
   11521             :  * 
   11522             :  *     def __len__(self):
   11523             :  *         if self.view.ndim >= 1:             # <<<<<<<<<<<<<<
   11524             :  *             return self.view.shape[0]
   11525             :  * 
   11526             :  */
   11527           0 :   __pyx_t_1 = (__pyx_v_self->view.ndim >= 1);
   11528           0 :   if (__pyx_t_1) {
   11529             : 
   11530             :     /* "View.MemoryView":612
   11531             :  *     def __len__(self):
   11532             :  *         if self.view.ndim >= 1:
   11533             :  *             return self.view.shape[0]             # <<<<<<<<<<<<<<
   11534             :  * 
   11535             :  *         return 0
   11536             :  */
   11537           0 :     __pyx_r = (__pyx_v_self->view.shape[0]);
   11538           0 :     goto __pyx_L0;
   11539             : 
   11540             :     /* "View.MemoryView":611
   11541             :  * 
   11542             :  *     def __len__(self):
   11543             :  *         if self.view.ndim >= 1:             # <<<<<<<<<<<<<<
   11544             :  *             return self.view.shape[0]
   11545             :  * 
   11546             :  */
   11547             :   }
   11548             : 
   11549             :   /* "View.MemoryView":614
   11550             :  *             return self.view.shape[0]
   11551             :  * 
   11552             :  *         return 0             # <<<<<<<<<<<<<<
   11553             :  * 
   11554             :  *     def __repr__(self):
   11555             :  */
   11556           0 :   __pyx_r = 0;
   11557           0 :   goto __pyx_L0;
   11558             : 
   11559             :   /* "View.MemoryView":610
   11560             :  *         return self._size
   11561             :  * 
   11562             :  *     def __len__(self):             # <<<<<<<<<<<<<<
   11563             :  *         if self.view.ndim >= 1:
   11564             :  *             return self.view.shape[0]
   11565             :  */
   11566             : 
   11567             :   /* function exit code */
   11568           0 :   __pyx_L0:;
   11569           0 :   return __pyx_r;
   11570             : }
   11571             : 
   11572             : /* "View.MemoryView":616
   11573             :  *         return 0
   11574             :  * 
   11575             :  *     def __repr__(self):             # <<<<<<<<<<<<<<
   11576             :  *         return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,
   11577             :  *                                                id(self))
   11578             :  */
   11579             : 
   11580             : /* Python wrapper */
   11581             : static PyObject *__pyx_memoryview___repr__(PyObject *__pyx_v_self); /*proto*/
   11582           0 : static PyObject *__pyx_memoryview___repr__(PyObject *__pyx_v_self) {
   11583           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   11584           0 :   PyObject *__pyx_r = 0;
   11585             :   __Pyx_RefNannyDeclarations
   11586           0 :   __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
   11587           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
   11588           0 :   __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(((struct __pyx_memoryview_obj *)__pyx_v_self));
   11589             : 
   11590             :   /* function exit code */
   11591           0 :   __Pyx_RefNannyFinishContext();
   11592           0 :   return __pyx_r;
   11593             : }
   11594             : 
   11595           0 : static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(struct __pyx_memoryview_obj *__pyx_v_self) {
   11596           0 :   PyObject *__pyx_r = NULL;
   11597             :   __Pyx_RefNannyDeclarations
   11598           0 :   PyObject *__pyx_t_1 = NULL;
   11599           0 :   PyObject *__pyx_t_2 = NULL;
   11600           0 :   PyObject *__pyx_t_3 = NULL;
   11601           0 :   int __pyx_lineno = 0;
   11602           0 :   const char *__pyx_filename = NULL;
   11603           0 :   int __pyx_clineno = 0;
   11604           0 :   __Pyx_RefNannySetupContext("__repr__", 1);
   11605             : 
   11606             :   /* "View.MemoryView":617
   11607             :  * 
   11608             :  *     def __repr__(self):
   11609             :  *         return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,             # <<<<<<<<<<<<<<
   11610             :  *                                                id(self))
   11611             :  * 
   11612             :  */
   11613           0 :   __Pyx_XDECREF(__pyx_r);
   11614           0 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 617, __pyx_L1_error)
   11615           0 :   __Pyx_GOTREF(__pyx_t_1);
   11616           0 :   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 617, __pyx_L1_error)
   11617           0 :   __Pyx_GOTREF(__pyx_t_2);
   11618           0 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   11619           0 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 617, __pyx_L1_error)
   11620           0 :   __Pyx_GOTREF(__pyx_t_1);
   11621           0 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   11622             : 
   11623             :   /* "View.MemoryView":618
   11624             :  *     def __repr__(self):
   11625             :  *         return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,
   11626             :  *                                                id(self))             # <<<<<<<<<<<<<<
   11627             :  * 
   11628             :  *     def __str__(self):
   11629             :  */
   11630           0 :   __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 618, __pyx_L1_error)
   11631           0 :   __Pyx_GOTREF(__pyx_t_2);
   11632             : 
   11633             :   /* "View.MemoryView":617
   11634             :  * 
   11635             :  *     def __repr__(self):
   11636             :  *         return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,             # <<<<<<<<<<<<<<
   11637             :  *                                                id(self))
   11638             :  * 
   11639             :  */
   11640           0 :   __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 617, __pyx_L1_error)
   11641           0 :   __Pyx_GOTREF(__pyx_t_3);
   11642           0 :   __Pyx_GIVEREF(__pyx_t_1);
   11643           0 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(1, 617, __pyx_L1_error);
   11644           0 :   __Pyx_GIVEREF(__pyx_t_2);
   11645           0 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(1, 617, __pyx_L1_error);
   11646           0 :   __pyx_t_1 = 0;
   11647           0 :   __pyx_t_2 = 0;
   11648           0 :   __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_MemoryView_of_r_at_0x_x, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 617, __pyx_L1_error)
   11649           0 :   __Pyx_GOTREF(__pyx_t_2);
   11650           0 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   11651           0 :   __pyx_r = __pyx_t_2;
   11652           0 :   __pyx_t_2 = 0;
   11653           0 :   goto __pyx_L0;
   11654             : 
   11655             :   /* "View.MemoryView":616
   11656             :  *         return 0
   11657             :  * 
   11658             :  *     def __repr__(self):             # <<<<<<<<<<<<<<
   11659             :  *         return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,
   11660             :  *                                                id(self))
   11661             :  */
   11662             : 
   11663             :   /* function exit code */
   11664           0 :   __pyx_L1_error:;
   11665           0 :   __Pyx_XDECREF(__pyx_t_1);
   11666           0 :   __Pyx_XDECREF(__pyx_t_2);
   11667           0 :   __Pyx_XDECREF(__pyx_t_3);
   11668           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   11669           0 :   __pyx_r = NULL;
   11670           0 :   __pyx_L0:;
   11671           0 :   __Pyx_XGIVEREF(__pyx_r);
   11672           0 :   __Pyx_RefNannyFinishContext();
   11673           0 :   return __pyx_r;
   11674             : }
   11675             : 
   11676             : /* "View.MemoryView":620
   11677             :  *                                                id(self))
   11678             :  * 
   11679             :  *     def __str__(self):             # <<<<<<<<<<<<<<
   11680             :  *         return "<MemoryView of %r object>" % (self.base.__class__.__name__,)
   11681             :  * 
   11682             :  */
   11683             : 
   11684             : /* Python wrapper */
   11685             : static PyObject *__pyx_memoryview___str__(PyObject *__pyx_v_self); /*proto*/
   11686           0 : static PyObject *__pyx_memoryview___str__(PyObject *__pyx_v_self) {
   11687           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   11688           0 :   PyObject *__pyx_r = 0;
   11689             :   __Pyx_RefNannyDeclarations
   11690           0 :   __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
   11691           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
   11692           0 :   __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(((struct __pyx_memoryview_obj *)__pyx_v_self));
   11693             : 
   11694             :   /* function exit code */
   11695           0 :   __Pyx_RefNannyFinishContext();
   11696           0 :   return __pyx_r;
   11697             : }
   11698             : 
   11699           0 : static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(struct __pyx_memoryview_obj *__pyx_v_self) {
   11700           0 :   PyObject *__pyx_r = NULL;
   11701             :   __Pyx_RefNannyDeclarations
   11702           0 :   PyObject *__pyx_t_1 = NULL;
   11703           0 :   PyObject *__pyx_t_2 = NULL;
   11704           0 :   int __pyx_lineno = 0;
   11705           0 :   const char *__pyx_filename = NULL;
   11706           0 :   int __pyx_clineno = 0;
   11707           0 :   __Pyx_RefNannySetupContext("__str__", 1);
   11708             : 
   11709             :   /* "View.MemoryView":621
   11710             :  * 
   11711             :  *     def __str__(self):
   11712             :  *         return "<MemoryView of %r object>" % (self.base.__class__.__name__,)             # <<<<<<<<<<<<<<
   11713             :  * 
   11714             :  * 
   11715             :  */
   11716           0 :   __Pyx_XDECREF(__pyx_r);
   11717           0 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 621, __pyx_L1_error)
   11718           0 :   __Pyx_GOTREF(__pyx_t_1);
   11719           0 :   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 621, __pyx_L1_error)
   11720           0 :   __Pyx_GOTREF(__pyx_t_2);
   11721           0 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   11722           0 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 621, __pyx_L1_error)
   11723           0 :   __Pyx_GOTREF(__pyx_t_1);
   11724           0 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   11725           0 :   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 621, __pyx_L1_error)
   11726           0 :   __Pyx_GOTREF(__pyx_t_2);
   11727           0 :   __Pyx_GIVEREF(__pyx_t_1);
   11728           0 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(1, 621, __pyx_L1_error);
   11729           0 :   __pyx_t_1 = 0;
   11730           0 :   __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_MemoryView_of_r_object, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 621, __pyx_L1_error)
   11731           0 :   __Pyx_GOTREF(__pyx_t_1);
   11732           0 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   11733           0 :   __pyx_r = __pyx_t_1;
   11734           0 :   __pyx_t_1 = 0;
   11735           0 :   goto __pyx_L0;
   11736             : 
   11737             :   /* "View.MemoryView":620
   11738             :  *                                                id(self))
   11739             :  * 
   11740             :  *     def __str__(self):             # <<<<<<<<<<<<<<
   11741             :  *         return "<MemoryView of %r object>" % (self.base.__class__.__name__,)
   11742             :  * 
   11743             :  */
   11744             : 
   11745             :   /* function exit code */
   11746           0 :   __pyx_L1_error:;
   11747           0 :   __Pyx_XDECREF(__pyx_t_1);
   11748           0 :   __Pyx_XDECREF(__pyx_t_2);
   11749           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   11750           0 :   __pyx_r = NULL;
   11751           0 :   __pyx_L0:;
   11752           0 :   __Pyx_XGIVEREF(__pyx_r);
   11753           0 :   __Pyx_RefNannyFinishContext();
   11754           0 :   return __pyx_r;
   11755             : }
   11756             : 
   11757             : /* "View.MemoryView":624
   11758             :  * 
   11759             :  * 
   11760             :  *     def is_c_contig(self):             # <<<<<<<<<<<<<<
   11761             :  *         cdef __Pyx_memviewslice *mslice
   11762             :  *         cdef __Pyx_memviewslice tmp
   11763             :  */
   11764             : 
   11765             : /* Python wrapper */
   11766             : static PyObject *__pyx_memoryview_is_c_contig(PyObject *__pyx_v_self, 
   11767             : #if CYTHON_METH_FASTCALL
   11768             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   11769             : #else
   11770             : PyObject *__pyx_args, PyObject *__pyx_kwds
   11771             : #endif
   11772             : ); /*proto*/
   11773           0 : static PyObject *__pyx_memoryview_is_c_contig(PyObject *__pyx_v_self, 
   11774             : #if CYTHON_METH_FASTCALL
   11775             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   11776             : #else
   11777             : PyObject *__pyx_args, PyObject *__pyx_kwds
   11778             : #endif
   11779             : ) {
   11780             :   #if !CYTHON_METH_FASTCALL
   11781             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
   11782             :   #endif
   11783           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   11784           0 :   PyObject *__pyx_r = 0;
   11785             :   __Pyx_RefNannyDeclarations
   11786           0 :   __Pyx_RefNannySetupContext("is_c_contig (wrapper)", 0);
   11787             :   #if !CYTHON_METH_FASTCALL
   11788             :   #if CYTHON_ASSUME_SAFE_MACROS
   11789             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
   11790             :   #else
   11791             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
   11792             :   #endif
   11793             :   #endif
   11794           0 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
   11795           0 :   if (unlikely(__pyx_nargs > 0)) {
   11796           0 :     __Pyx_RaiseArgtupleInvalid("is_c_contig", 1, 0, 0, __pyx_nargs); return NULL;}
   11797           0 :   if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "is_c_contig", 0))) return NULL;
   11798           0 :   __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(((struct __pyx_memoryview_obj *)__pyx_v_self));
   11799             : 
   11800             :   /* function exit code */
   11801           0 :   __Pyx_RefNannyFinishContext();
   11802           0 :   return __pyx_r;
   11803             : }
   11804             : 
   11805           0 : static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(struct __pyx_memoryview_obj *__pyx_v_self) {
   11806           0 :   __Pyx_memviewslice *__pyx_v_mslice;
   11807           0 :   __Pyx_memviewslice __pyx_v_tmp;
   11808           0 :   PyObject *__pyx_r = NULL;
   11809             :   __Pyx_RefNannyDeclarations
   11810           0 :   __Pyx_memviewslice *__pyx_t_1;
   11811           0 :   PyObject *__pyx_t_2 = NULL;
   11812           0 :   int __pyx_lineno = 0;
   11813           0 :   const char *__pyx_filename = NULL;
   11814           0 :   int __pyx_clineno = 0;
   11815           0 :   __Pyx_RefNannySetupContext("is_c_contig", 1);
   11816             : 
   11817             :   /* "View.MemoryView":627
   11818             :  *         cdef __Pyx_memviewslice *mslice
   11819             :  *         cdef __Pyx_memviewslice tmp
   11820             :  *         mslice = get_slice_from_memview(self, &tmp)             # <<<<<<<<<<<<<<
   11821             :  *         return slice_is_contig(mslice[0], 'C', self.view.ndim)
   11822             :  * 
   11823             :  */
   11824           0 :   __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_self, (&__pyx_v_tmp)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(1, 627, __pyx_L1_error)
   11825           0 :   __pyx_v_mslice = __pyx_t_1;
   11826             : 
   11827             :   /* "View.MemoryView":628
   11828             :  *         cdef __Pyx_memviewslice tmp
   11829             :  *         mslice = get_slice_from_memview(self, &tmp)
   11830             :  *         return slice_is_contig(mslice[0], 'C', self.view.ndim)             # <<<<<<<<<<<<<<
   11831             :  * 
   11832             :  *     def is_f_contig(self):
   11833             :  */
   11834           0 :   __Pyx_XDECREF(__pyx_r);
   11835           0 :   __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_memviewslice_is_contig((__pyx_v_mslice[0]), 'C', __pyx_v_self->view.ndim)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 628, __pyx_L1_error)
   11836           0 :   __Pyx_GOTREF(__pyx_t_2);
   11837           0 :   __pyx_r = __pyx_t_2;
   11838           0 :   __pyx_t_2 = 0;
   11839           0 :   goto __pyx_L0;
   11840             : 
   11841             :   /* "View.MemoryView":624
   11842             :  * 
   11843             :  * 
   11844             :  *     def is_c_contig(self):             # <<<<<<<<<<<<<<
   11845             :  *         cdef __Pyx_memviewslice *mslice
   11846             :  *         cdef __Pyx_memviewslice tmp
   11847             :  */
   11848             : 
   11849             :   /* function exit code */
   11850           0 :   __pyx_L1_error:;
   11851           0 :   __Pyx_XDECREF(__pyx_t_2);
   11852           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.is_c_contig", __pyx_clineno, __pyx_lineno, __pyx_filename);
   11853           0 :   __pyx_r = NULL;
   11854           0 :   __pyx_L0:;
   11855           0 :   __Pyx_XGIVEREF(__pyx_r);
   11856           0 :   __Pyx_RefNannyFinishContext();
   11857           0 :   return __pyx_r;
   11858             : }
   11859             : 
   11860             : /* "View.MemoryView":630
   11861             :  *         return slice_is_contig(mslice[0], 'C', self.view.ndim)
   11862             :  * 
   11863             :  *     def is_f_contig(self):             # <<<<<<<<<<<<<<
   11864             :  *         cdef __Pyx_memviewslice *mslice
   11865             :  *         cdef __Pyx_memviewslice tmp
   11866             :  */
   11867             : 
   11868             : /* Python wrapper */
   11869             : static PyObject *__pyx_memoryview_is_f_contig(PyObject *__pyx_v_self, 
   11870             : #if CYTHON_METH_FASTCALL
   11871             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   11872             : #else
   11873             : PyObject *__pyx_args, PyObject *__pyx_kwds
   11874             : #endif
   11875             : ); /*proto*/
   11876           0 : static PyObject *__pyx_memoryview_is_f_contig(PyObject *__pyx_v_self, 
   11877             : #if CYTHON_METH_FASTCALL
   11878             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   11879             : #else
   11880             : PyObject *__pyx_args, PyObject *__pyx_kwds
   11881             : #endif
   11882             : ) {
   11883             :   #if !CYTHON_METH_FASTCALL
   11884             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
   11885             :   #endif
   11886           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   11887           0 :   PyObject *__pyx_r = 0;
   11888             :   __Pyx_RefNannyDeclarations
   11889           0 :   __Pyx_RefNannySetupContext("is_f_contig (wrapper)", 0);
   11890             :   #if !CYTHON_METH_FASTCALL
   11891             :   #if CYTHON_ASSUME_SAFE_MACROS
   11892             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
   11893             :   #else
   11894             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
   11895             :   #endif
   11896             :   #endif
   11897           0 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
   11898           0 :   if (unlikely(__pyx_nargs > 0)) {
   11899           0 :     __Pyx_RaiseArgtupleInvalid("is_f_contig", 1, 0, 0, __pyx_nargs); return NULL;}
   11900           0 :   if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "is_f_contig", 0))) return NULL;
   11901           0 :   __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(((struct __pyx_memoryview_obj *)__pyx_v_self));
   11902             : 
   11903             :   /* function exit code */
   11904           0 :   __Pyx_RefNannyFinishContext();
   11905           0 :   return __pyx_r;
   11906             : }
   11907             : 
   11908           0 : static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(struct __pyx_memoryview_obj *__pyx_v_self) {
   11909           0 :   __Pyx_memviewslice *__pyx_v_mslice;
   11910           0 :   __Pyx_memviewslice __pyx_v_tmp;
   11911           0 :   PyObject *__pyx_r = NULL;
   11912             :   __Pyx_RefNannyDeclarations
   11913           0 :   __Pyx_memviewslice *__pyx_t_1;
   11914           0 :   PyObject *__pyx_t_2 = NULL;
   11915           0 :   int __pyx_lineno = 0;
   11916           0 :   const char *__pyx_filename = NULL;
   11917           0 :   int __pyx_clineno = 0;
   11918           0 :   __Pyx_RefNannySetupContext("is_f_contig", 1);
   11919             : 
   11920             :   /* "View.MemoryView":633
   11921             :  *         cdef __Pyx_memviewslice *mslice
   11922             :  *         cdef __Pyx_memviewslice tmp
   11923             :  *         mslice = get_slice_from_memview(self, &tmp)             # <<<<<<<<<<<<<<
   11924             :  *         return slice_is_contig(mslice[0], 'F', self.view.ndim)
   11925             :  * 
   11926             :  */
   11927           0 :   __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_self, (&__pyx_v_tmp)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(1, 633, __pyx_L1_error)
   11928           0 :   __pyx_v_mslice = __pyx_t_1;
   11929             : 
   11930             :   /* "View.MemoryView":634
   11931             :  *         cdef __Pyx_memviewslice tmp
   11932             :  *         mslice = get_slice_from_memview(self, &tmp)
   11933             :  *         return slice_is_contig(mslice[0], 'F', self.view.ndim)             # <<<<<<<<<<<<<<
   11934             :  * 
   11935             :  *     def copy(self):
   11936             :  */
   11937           0 :   __Pyx_XDECREF(__pyx_r);
   11938           0 :   __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_memviewslice_is_contig((__pyx_v_mslice[0]), 'F', __pyx_v_self->view.ndim)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 634, __pyx_L1_error)
   11939           0 :   __Pyx_GOTREF(__pyx_t_2);
   11940           0 :   __pyx_r = __pyx_t_2;
   11941           0 :   __pyx_t_2 = 0;
   11942           0 :   goto __pyx_L0;
   11943             : 
   11944             :   /* "View.MemoryView":630
   11945             :  *         return slice_is_contig(mslice[0], 'C', self.view.ndim)
   11946             :  * 
   11947             :  *     def is_f_contig(self):             # <<<<<<<<<<<<<<
   11948             :  *         cdef __Pyx_memviewslice *mslice
   11949             :  *         cdef __Pyx_memviewslice tmp
   11950             :  */
   11951             : 
   11952             :   /* function exit code */
   11953           0 :   __pyx_L1_error:;
   11954           0 :   __Pyx_XDECREF(__pyx_t_2);
   11955           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.is_f_contig", __pyx_clineno, __pyx_lineno, __pyx_filename);
   11956           0 :   __pyx_r = NULL;
   11957           0 :   __pyx_L0:;
   11958           0 :   __Pyx_XGIVEREF(__pyx_r);
   11959           0 :   __Pyx_RefNannyFinishContext();
   11960           0 :   return __pyx_r;
   11961             : }
   11962             : 
   11963             : /* "View.MemoryView":636
   11964             :  *         return slice_is_contig(mslice[0], 'F', self.view.ndim)
   11965             :  * 
   11966             :  *     def copy(self):             # <<<<<<<<<<<<<<
   11967             :  *         cdef __Pyx_memviewslice mslice
   11968             :  *         cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS
   11969             :  */
   11970             : 
   11971             : /* Python wrapper */
   11972             : static PyObject *__pyx_memoryview_copy(PyObject *__pyx_v_self, 
   11973             : #if CYTHON_METH_FASTCALL
   11974             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   11975             : #else
   11976             : PyObject *__pyx_args, PyObject *__pyx_kwds
   11977             : #endif
   11978             : ); /*proto*/
   11979           0 : static PyObject *__pyx_memoryview_copy(PyObject *__pyx_v_self, 
   11980             : #if CYTHON_METH_FASTCALL
   11981             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   11982             : #else
   11983             : PyObject *__pyx_args, PyObject *__pyx_kwds
   11984             : #endif
   11985             : ) {
   11986             :   #if !CYTHON_METH_FASTCALL
   11987             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
   11988             :   #endif
   11989           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   11990           0 :   PyObject *__pyx_r = 0;
   11991             :   __Pyx_RefNannyDeclarations
   11992           0 :   __Pyx_RefNannySetupContext("copy (wrapper)", 0);
   11993             :   #if !CYTHON_METH_FASTCALL
   11994             :   #if CYTHON_ASSUME_SAFE_MACROS
   11995             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
   11996             :   #else
   11997             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
   11998             :   #endif
   11999             :   #endif
   12000           0 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
   12001           0 :   if (unlikely(__pyx_nargs > 0)) {
   12002           0 :     __Pyx_RaiseArgtupleInvalid("copy", 1, 0, 0, __pyx_nargs); return NULL;}
   12003           0 :   if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "copy", 0))) return NULL;
   12004           0 :   __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(((struct __pyx_memoryview_obj *)__pyx_v_self));
   12005             : 
   12006             :   /* function exit code */
   12007           0 :   __Pyx_RefNannyFinishContext();
   12008           0 :   return __pyx_r;
   12009             : }
   12010             : 
   12011           0 : static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(struct __pyx_memoryview_obj *__pyx_v_self) {
   12012           0 :   __Pyx_memviewslice __pyx_v_mslice;
   12013           0 :   int __pyx_v_flags;
   12014           0 :   PyObject *__pyx_r = NULL;
   12015             :   __Pyx_RefNannyDeclarations
   12016           0 :   __Pyx_memviewslice __pyx_t_1;
   12017           0 :   PyObject *__pyx_t_2 = NULL;
   12018           0 :   int __pyx_lineno = 0;
   12019           0 :   const char *__pyx_filename = NULL;
   12020           0 :   int __pyx_clineno = 0;
   12021           0 :   __Pyx_RefNannySetupContext("copy", 1);
   12022             : 
   12023             :   /* "View.MemoryView":638
   12024             :  *     def copy(self):
   12025             :  *         cdef __Pyx_memviewslice mslice
   12026             :  *         cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS             # <<<<<<<<<<<<<<
   12027             :  * 
   12028             :  *         slice_copy(self, &mslice)
   12029             :  */
   12030           0 :   __pyx_v_flags = (__pyx_v_self->flags & (~PyBUF_F_CONTIGUOUS));
   12031             : 
   12032             :   /* "View.MemoryView":640
   12033             :  *         cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS
   12034             :  * 
   12035             :  *         slice_copy(self, &mslice)             # <<<<<<<<<<<<<<
   12036             :  *         mslice = slice_copy_contig(&mslice, "c", self.view.ndim,
   12037             :  *                                    self.view.itemsize,
   12038             :  */
   12039           0 :   __pyx_memoryview_slice_copy(__pyx_v_self, (&__pyx_v_mslice));
   12040             : 
   12041             :   /* "View.MemoryView":641
   12042             :  * 
   12043             :  *         slice_copy(self, &mslice)
   12044             :  *         mslice = slice_copy_contig(&mslice, "c", self.view.ndim,             # <<<<<<<<<<<<<<
   12045             :  *                                    self.view.itemsize,
   12046             :  *                                    flags|PyBUF_C_CONTIGUOUS,
   12047             :  */
   12048           0 :   __pyx_t_1 = __pyx_memoryview_copy_new_contig((&__pyx_v_mslice), ((char *)"c"), __pyx_v_self->view.ndim, __pyx_v_self->view.itemsize, (__pyx_v_flags | PyBUF_C_CONTIGUOUS), __pyx_v_self->dtype_is_object); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 641, __pyx_L1_error)
   12049           0 :   __pyx_v_mslice = __pyx_t_1;
   12050             : 
   12051             :   /* "View.MemoryView":646
   12052             :  *                                    self.dtype_is_object)
   12053             :  * 
   12054             :  *         return memoryview_copy_from_slice(self, &mslice)             # <<<<<<<<<<<<<<
   12055             :  * 
   12056             :  *     def copy_fortran(self):
   12057             :  */
   12058           0 :   __Pyx_XDECREF(__pyx_r);
   12059           0 :   __pyx_t_2 = __pyx_memoryview_copy_object_from_slice(__pyx_v_self, (&__pyx_v_mslice)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 646, __pyx_L1_error)
   12060           0 :   __Pyx_GOTREF(__pyx_t_2);
   12061           0 :   __pyx_r = __pyx_t_2;
   12062           0 :   __pyx_t_2 = 0;
   12063           0 :   goto __pyx_L0;
   12064             : 
   12065             :   /* "View.MemoryView":636
   12066             :  *         return slice_is_contig(mslice[0], 'F', self.view.ndim)
   12067             :  * 
   12068             :  *     def copy(self):             # <<<<<<<<<<<<<<
   12069             :  *         cdef __Pyx_memviewslice mslice
   12070             :  *         cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS
   12071             :  */
   12072             : 
   12073             :   /* function exit code */
   12074           0 :   __pyx_L1_error:;
   12075           0 :   __Pyx_XDECREF(__pyx_t_2);
   12076           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
   12077           0 :   __pyx_r = NULL;
   12078           0 :   __pyx_L0:;
   12079           0 :   __Pyx_XGIVEREF(__pyx_r);
   12080           0 :   __Pyx_RefNannyFinishContext();
   12081           0 :   return __pyx_r;
   12082             : }
   12083             : 
   12084             : /* "View.MemoryView":648
   12085             :  *         return memoryview_copy_from_slice(self, &mslice)
   12086             :  * 
   12087             :  *     def copy_fortran(self):             # <<<<<<<<<<<<<<
   12088             :  *         cdef __Pyx_memviewslice src, dst
   12089             :  *         cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS
   12090             :  */
   12091             : 
   12092             : /* Python wrapper */
   12093             : static PyObject *__pyx_memoryview_copy_fortran(PyObject *__pyx_v_self, 
   12094             : #if CYTHON_METH_FASTCALL
   12095             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   12096             : #else
   12097             : PyObject *__pyx_args, PyObject *__pyx_kwds
   12098             : #endif
   12099             : ); /*proto*/
   12100           0 : static PyObject *__pyx_memoryview_copy_fortran(PyObject *__pyx_v_self, 
   12101             : #if CYTHON_METH_FASTCALL
   12102             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   12103             : #else
   12104             : PyObject *__pyx_args, PyObject *__pyx_kwds
   12105             : #endif
   12106             : ) {
   12107             :   #if !CYTHON_METH_FASTCALL
   12108             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
   12109             :   #endif
   12110           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   12111           0 :   PyObject *__pyx_r = 0;
   12112             :   __Pyx_RefNannyDeclarations
   12113           0 :   __Pyx_RefNannySetupContext("copy_fortran (wrapper)", 0);
   12114             :   #if !CYTHON_METH_FASTCALL
   12115             :   #if CYTHON_ASSUME_SAFE_MACROS
   12116             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
   12117             :   #else
   12118             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
   12119             :   #endif
   12120             :   #endif
   12121           0 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
   12122           0 :   if (unlikely(__pyx_nargs > 0)) {
   12123           0 :     __Pyx_RaiseArgtupleInvalid("copy_fortran", 1, 0, 0, __pyx_nargs); return NULL;}
   12124           0 :   if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "copy_fortran", 0))) return NULL;
   12125           0 :   __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(((struct __pyx_memoryview_obj *)__pyx_v_self));
   12126             : 
   12127             :   /* function exit code */
   12128           0 :   __Pyx_RefNannyFinishContext();
   12129           0 :   return __pyx_r;
   12130             : }
   12131             : 
   12132           0 : static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(struct __pyx_memoryview_obj *__pyx_v_self) {
   12133           0 :   __Pyx_memviewslice __pyx_v_src;
   12134           0 :   __Pyx_memviewslice __pyx_v_dst;
   12135           0 :   int __pyx_v_flags;
   12136           0 :   PyObject *__pyx_r = NULL;
   12137             :   __Pyx_RefNannyDeclarations
   12138           0 :   __Pyx_memviewslice __pyx_t_1;
   12139           0 :   PyObject *__pyx_t_2 = NULL;
   12140           0 :   int __pyx_lineno = 0;
   12141           0 :   const char *__pyx_filename = NULL;
   12142           0 :   int __pyx_clineno = 0;
   12143           0 :   __Pyx_RefNannySetupContext("copy_fortran", 1);
   12144             : 
   12145             :   /* "View.MemoryView":650
   12146             :  *     def copy_fortran(self):
   12147             :  *         cdef __Pyx_memviewslice src, dst
   12148             :  *         cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS             # <<<<<<<<<<<<<<
   12149             :  * 
   12150             :  *         slice_copy(self, &src)
   12151             :  */
   12152           0 :   __pyx_v_flags = (__pyx_v_self->flags & (~PyBUF_C_CONTIGUOUS));
   12153             : 
   12154             :   /* "View.MemoryView":652
   12155             :  *         cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS
   12156             :  * 
   12157             :  *         slice_copy(self, &src)             # <<<<<<<<<<<<<<
   12158             :  *         dst = slice_copy_contig(&src, "fortran", self.view.ndim,
   12159             :  *                                 self.view.itemsize,
   12160             :  */
   12161           0 :   __pyx_memoryview_slice_copy(__pyx_v_self, (&__pyx_v_src));
   12162             : 
   12163             :   /* "View.MemoryView":653
   12164             :  * 
   12165             :  *         slice_copy(self, &src)
   12166             :  *         dst = slice_copy_contig(&src, "fortran", self.view.ndim,             # <<<<<<<<<<<<<<
   12167             :  *                                 self.view.itemsize,
   12168             :  *                                 flags|PyBUF_F_CONTIGUOUS,
   12169             :  */
   12170           0 :   __pyx_t_1 = __pyx_memoryview_copy_new_contig((&__pyx_v_src), ((char *)"fortran"), __pyx_v_self->view.ndim, __pyx_v_self->view.itemsize, (__pyx_v_flags | PyBUF_F_CONTIGUOUS), __pyx_v_self->dtype_is_object); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 653, __pyx_L1_error)
   12171           0 :   __pyx_v_dst = __pyx_t_1;
   12172             : 
   12173             :   /* "View.MemoryView":658
   12174             :  *                                 self.dtype_is_object)
   12175             :  * 
   12176             :  *         return memoryview_copy_from_slice(self, &dst)             # <<<<<<<<<<<<<<
   12177             :  * 
   12178             :  * 
   12179             :  */
   12180           0 :   __Pyx_XDECREF(__pyx_r);
   12181           0 :   __pyx_t_2 = __pyx_memoryview_copy_object_from_slice(__pyx_v_self, (&__pyx_v_dst)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 658, __pyx_L1_error)
   12182           0 :   __Pyx_GOTREF(__pyx_t_2);
   12183           0 :   __pyx_r = __pyx_t_2;
   12184           0 :   __pyx_t_2 = 0;
   12185           0 :   goto __pyx_L0;
   12186             : 
   12187             :   /* "View.MemoryView":648
   12188             :  *         return memoryview_copy_from_slice(self, &mslice)
   12189             :  * 
   12190             :  *     def copy_fortran(self):             # <<<<<<<<<<<<<<
   12191             :  *         cdef __Pyx_memviewslice src, dst
   12192             :  *         cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS
   12193             :  */
   12194             : 
   12195             :   /* function exit code */
   12196           0 :   __pyx_L1_error:;
   12197           0 :   __Pyx_XDECREF(__pyx_t_2);
   12198           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.copy_fortran", __pyx_clineno, __pyx_lineno, __pyx_filename);
   12199           0 :   __pyx_r = NULL;
   12200           0 :   __pyx_L0:;
   12201           0 :   __Pyx_XGIVEREF(__pyx_r);
   12202           0 :   __Pyx_RefNannyFinishContext();
   12203           0 :   return __pyx_r;
   12204             : }
   12205             : 
   12206             : /* "(tree fragment)":1
   12207             :  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
   12208             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
   12209             :  * def __setstate_cython__(self, __pyx_state):
   12210             :  */
   12211             : 
   12212             : /* Python wrapper */
   12213             : static PyObject *__pyx_pw___pyx_memoryview_1__reduce_cython__(PyObject *__pyx_v_self, 
   12214             : #if CYTHON_METH_FASTCALL
   12215             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   12216             : #else
   12217             : PyObject *__pyx_args, PyObject *__pyx_kwds
   12218             : #endif
   12219             : ); /*proto*/
   12220           0 : static PyObject *__pyx_pw___pyx_memoryview_1__reduce_cython__(PyObject *__pyx_v_self, 
   12221             : #if CYTHON_METH_FASTCALL
   12222             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   12223             : #else
   12224             : PyObject *__pyx_args, PyObject *__pyx_kwds
   12225             : #endif
   12226             : ) {
   12227             :   #if !CYTHON_METH_FASTCALL
   12228             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
   12229             :   #endif
   12230           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   12231           0 :   PyObject *__pyx_r = 0;
   12232             :   __Pyx_RefNannyDeclarations
   12233           0 :   __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
   12234             :   #if !CYTHON_METH_FASTCALL
   12235             :   #if CYTHON_ASSUME_SAFE_MACROS
   12236             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
   12237             :   #else
   12238             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
   12239             :   #endif
   12240             :   #endif
   12241           0 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
   12242           0 :   if (unlikely(__pyx_nargs > 0)) {
   12243           0 :     __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
   12244           0 :   if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
   12245           0 :   __pyx_r = __pyx_pf___pyx_memoryview___reduce_cython__(((struct __pyx_memoryview_obj *)__pyx_v_self));
   12246             : 
   12247             :   /* function exit code */
   12248           0 :   __Pyx_RefNannyFinishContext();
   12249           0 :   return __pyx_r;
   12250             : }
   12251             : 
   12252           0 : static PyObject *__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self) {
   12253           0 :   PyObject *__pyx_r = NULL;
   12254             :   __Pyx_RefNannyDeclarations
   12255           0 :   int __pyx_lineno = 0;
   12256           0 :   const char *__pyx_filename = NULL;
   12257           0 :   int __pyx_clineno = 0;
   12258           0 :   __Pyx_RefNannySetupContext("__reduce_cython__", 1);
   12259             : 
   12260             :   /* "(tree fragment)":2
   12261             :  * def __reduce_cython__(self):
   12262             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
   12263             :  * def __setstate_cython__(self, __pyx_state):
   12264             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
   12265             :  */
   12266           0 :   __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
   12267           0 :   __PYX_ERR(1, 2, __pyx_L1_error)
   12268             : 
   12269             :   /* "(tree fragment)":1
   12270             :  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
   12271             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
   12272             :  * def __setstate_cython__(self, __pyx_state):
   12273             :  */
   12274             : 
   12275             :   /* function exit code */
   12276           0 :   __pyx_L1_error:;
   12277           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   12278           0 :   __pyx_r = NULL;
   12279           0 :   __Pyx_XGIVEREF(__pyx_r);
   12280           0 :   __Pyx_RefNannyFinishContext();
   12281           0 :   return __pyx_r;
   12282             : }
   12283             : 
   12284             : /* "(tree fragment)":3
   12285             :  * def __reduce_cython__(self):
   12286             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
   12287             :  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
   12288             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
   12289             :  */
   12290             : 
   12291             : /* Python wrapper */
   12292             : static PyObject *__pyx_pw___pyx_memoryview_3__setstate_cython__(PyObject *__pyx_v_self, 
   12293             : #if CYTHON_METH_FASTCALL
   12294             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   12295             : #else
   12296             : PyObject *__pyx_args, PyObject *__pyx_kwds
   12297             : #endif
   12298             : ); /*proto*/
   12299           0 : static PyObject *__pyx_pw___pyx_memoryview_3__setstate_cython__(PyObject *__pyx_v_self, 
   12300             : #if CYTHON_METH_FASTCALL
   12301             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   12302             : #else
   12303             : PyObject *__pyx_args, PyObject *__pyx_kwds
   12304             : #endif
   12305             : ) {
   12306           0 :   CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
   12307             :   #if !CYTHON_METH_FASTCALL
   12308             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
   12309             :   #endif
   12310           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   12311           0 :   PyObject* values[1] = {0};
   12312           0 :   int __pyx_lineno = 0;
   12313           0 :   const char *__pyx_filename = NULL;
   12314           0 :   int __pyx_clineno = 0;
   12315           0 :   PyObject *__pyx_r = 0;
   12316             :   __Pyx_RefNannyDeclarations
   12317           0 :   __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
   12318             :   #if !CYTHON_METH_FASTCALL
   12319             :   #if CYTHON_ASSUME_SAFE_MACROS
   12320             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
   12321             :   #else
   12322             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
   12323             :   #endif
   12324             :   #endif
   12325           0 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
   12326             :   {
   12327           0 :     PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
   12328           0 :     if (__pyx_kwds) {
   12329           0 :       Py_ssize_t kw_args;
   12330           0 :       switch (__pyx_nargs) {
   12331           0 :         case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
   12332           0 :         CYTHON_FALLTHROUGH;
   12333           0 :         case  0: break;
   12334           0 :         default: goto __pyx_L5_argtuple_error;
   12335             :       }
   12336           0 :       kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
   12337           0 :       switch (__pyx_nargs) {
   12338             :         case  0:
   12339           0 :         if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
   12340           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
   12341           0 :           kw_args--;
   12342             :         }
   12343           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
   12344           0 :         else goto __pyx_L5_argtuple_error;
   12345             :       }
   12346           0 :       if (unlikely(kw_args > 0)) {
   12347           0 :         const Py_ssize_t kwd_pos_args = __pyx_nargs;
   12348           0 :         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
   12349             :       }
   12350           0 :     } else if (unlikely(__pyx_nargs != 1)) {
   12351           0 :       goto __pyx_L5_argtuple_error;
   12352             :     } else {
   12353           0 :       values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
   12354             :     }
   12355           0 :     __pyx_v___pyx_state = values[0];
   12356             :   }
   12357           0 :   goto __pyx_L6_skip;
   12358           0 :   __pyx_L5_argtuple_error:;
   12359           0 :   __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
   12360           0 :   __pyx_L6_skip:;
   12361           0 :   goto __pyx_L4_argument_unpacking_done;
   12362           0 :   __pyx_L3_error:;
   12363             :   {
   12364           0 :     Py_ssize_t __pyx_temp;
   12365           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   12366             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
   12367             :     }
   12368             :   }
   12369           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   12370           0 :   __Pyx_RefNannyFinishContext();
   12371           0 :   return NULL;
   12372           0 :   __pyx_L4_argument_unpacking_done:;
   12373           0 :   __pyx_r = __pyx_pf___pyx_memoryview_2__setstate_cython__(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v___pyx_state);
   12374             : 
   12375             :   /* function exit code */
   12376             :   {
   12377           0 :     Py_ssize_t __pyx_temp;
   12378           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   12379             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
   12380             :     }
   12381             :   }
   12382             :   __Pyx_RefNannyFinishContext();
   12383             :   return __pyx_r;
   12384             : }
   12385             : 
   12386           0 : static PyObject *__pyx_pf___pyx_memoryview_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
   12387           0 :   PyObject *__pyx_r = NULL;
   12388             :   __Pyx_RefNannyDeclarations
   12389           0 :   int __pyx_lineno = 0;
   12390           0 :   const char *__pyx_filename = NULL;
   12391           0 :   int __pyx_clineno = 0;
   12392           0 :   __Pyx_RefNannySetupContext("__setstate_cython__", 1);
   12393             : 
   12394             :   /* "(tree fragment)":4
   12395             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
   12396             :  * def __setstate_cython__(self, __pyx_state):
   12397             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
   12398             :  */
   12399           0 :   __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
   12400           0 :   __PYX_ERR(1, 4, __pyx_L1_error)
   12401             : 
   12402             :   /* "(tree fragment)":3
   12403             :  * def __reduce_cython__(self):
   12404             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
   12405             :  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
   12406             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
   12407             :  */
   12408             : 
   12409             :   /* function exit code */
   12410           0 :   __pyx_L1_error:;
   12411           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   12412           0 :   __pyx_r = NULL;
   12413           0 :   __Pyx_XGIVEREF(__pyx_r);
   12414           0 :   __Pyx_RefNannyFinishContext();
   12415           0 :   return __pyx_r;
   12416             : }
   12417             : 
   12418             : /* "View.MemoryView":662
   12419             :  * 
   12420             :  * @cname('__pyx_memoryview_new')
   12421             :  * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo):             # <<<<<<<<<<<<<<
   12422             :  *     cdef memoryview result = memoryview(o, flags, dtype_is_object)
   12423             :  *     result.typeinfo = typeinfo
   12424             :  */
   12425             : 
   12426         579 : static PyObject *__pyx_memoryview_new(PyObject *__pyx_v_o, int __pyx_v_flags, int __pyx_v_dtype_is_object, __Pyx_TypeInfo *__pyx_v_typeinfo) {
   12427         579 :   struct __pyx_memoryview_obj *__pyx_v_result = 0;
   12428         579 :   PyObject *__pyx_r = NULL;
   12429             :   __Pyx_RefNannyDeclarations
   12430         579 :   PyObject *__pyx_t_1 = NULL;
   12431         579 :   PyObject *__pyx_t_2 = NULL;
   12432         579 :   PyObject *__pyx_t_3 = NULL;
   12433         579 :   int __pyx_lineno = 0;
   12434         579 :   const char *__pyx_filename = NULL;
   12435         579 :   int __pyx_clineno = 0;
   12436         579 :   __Pyx_RefNannySetupContext("memoryview_cwrapper", 1);
   12437             : 
   12438             :   /* "View.MemoryView":663
   12439             :  * @cname('__pyx_memoryview_new')
   12440             :  * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo):
   12441             :  *     cdef memoryview result = memoryview(o, flags, dtype_is_object)             # <<<<<<<<<<<<<<
   12442             :  *     result.typeinfo = typeinfo
   12443             :  *     return result
   12444             :  */
   12445         579 :   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 663, __pyx_L1_error)
   12446         579 :   __Pyx_GOTREF(__pyx_t_1);
   12447         579 :   __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 663, __pyx_L1_error)
   12448         579 :   __Pyx_GOTREF(__pyx_t_2);
   12449         579 :   __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 663, __pyx_L1_error)
   12450         579 :   __Pyx_GOTREF(__pyx_t_3);
   12451         579 :   __Pyx_INCREF(__pyx_v_o);
   12452         579 :   __Pyx_GIVEREF(__pyx_v_o);
   12453         579 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_o)) __PYX_ERR(1, 663, __pyx_L1_error);
   12454         579 :   __Pyx_GIVEREF(__pyx_t_1);
   12455         579 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1)) __PYX_ERR(1, 663, __pyx_L1_error);
   12456         579 :   __Pyx_GIVEREF(__pyx_t_2);
   12457         579 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2)) __PYX_ERR(1, 663, __pyx_L1_error);
   12458         579 :   __pyx_t_1 = 0;
   12459         579 :   __pyx_t_2 = 0;
   12460         579 :   __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 663, __pyx_L1_error)
   12461         579 :   __Pyx_GOTREF(__pyx_t_2);
   12462         579 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   12463         579 :   __pyx_v_result = ((struct __pyx_memoryview_obj *)__pyx_t_2);
   12464         579 :   __pyx_t_2 = 0;
   12465             : 
   12466             :   /* "View.MemoryView":664
   12467             :  * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo):
   12468             :  *     cdef memoryview result = memoryview(o, flags, dtype_is_object)
   12469             :  *     result.typeinfo = typeinfo             # <<<<<<<<<<<<<<
   12470             :  *     return result
   12471             :  * 
   12472             :  */
   12473         579 :   __pyx_v_result->typeinfo = __pyx_v_typeinfo;
   12474             : 
   12475             :   /* "View.MemoryView":665
   12476             :  *     cdef memoryview result = memoryview(o, flags, dtype_is_object)
   12477             :  *     result.typeinfo = typeinfo
   12478             :  *     return result             # <<<<<<<<<<<<<<
   12479             :  * 
   12480             :  * @cname('__pyx_memoryview_check')
   12481             :  */
   12482         579 :   __Pyx_XDECREF(__pyx_r);
   12483         579 :   __Pyx_INCREF((PyObject *)__pyx_v_result);
   12484         579 :   __pyx_r = ((PyObject *)__pyx_v_result);
   12485         579 :   goto __pyx_L0;
   12486             : 
   12487             :   /* "View.MemoryView":662
   12488             :  * 
   12489             :  * @cname('__pyx_memoryview_new')
   12490             :  * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo):             # <<<<<<<<<<<<<<
   12491             :  *     cdef memoryview result = memoryview(o, flags, dtype_is_object)
   12492             :  *     result.typeinfo = typeinfo
   12493             :  */
   12494             : 
   12495             :   /* function exit code */
   12496           0 :   __pyx_L1_error:;
   12497           0 :   __Pyx_XDECREF(__pyx_t_1);
   12498           0 :   __Pyx_XDECREF(__pyx_t_2);
   12499           0 :   __Pyx_XDECREF(__pyx_t_3);
   12500           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview_cwrapper", __pyx_clineno, __pyx_lineno, __pyx_filename);
   12501           0 :   __pyx_r = 0;
   12502         579 :   __pyx_L0:;
   12503         579 :   __Pyx_XDECREF((PyObject *)__pyx_v_result);
   12504         579 :   __Pyx_XGIVEREF(__pyx_r);
   12505         579 :   __Pyx_RefNannyFinishContext();
   12506         579 :   return __pyx_r;
   12507             : }
   12508             : 
   12509             : /* "View.MemoryView":668
   12510             :  * 
   12511             :  * @cname('__pyx_memoryview_check')
   12512             :  * cdef inline bint memoryview_check(object o) noexcept:             # <<<<<<<<<<<<<<
   12513             :  *     return isinstance(o, memoryview)
   12514             :  * 
   12515             :  */
   12516             : 
   12517         579 : static CYTHON_INLINE int __pyx_memoryview_check(PyObject *__pyx_v_o) {
   12518         579 :   int __pyx_r;
   12519         579 :   int __pyx_t_1;
   12520             : 
   12521             :   /* "View.MemoryView":669
   12522             :  * @cname('__pyx_memoryview_check')
   12523             :  * cdef inline bint memoryview_check(object o) noexcept:
   12524             :  *     return isinstance(o, memoryview)             # <<<<<<<<<<<<<<
   12525             :  * 
   12526             :  * cdef tuple _unellipsify(object index, int ndim):
   12527             :  */
   12528         579 :   __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_o, __pyx_memoryview_type); 
   12529         579 :   __pyx_r = __pyx_t_1;
   12530         579 :   goto __pyx_L0;
   12531             : 
   12532             :   /* "View.MemoryView":668
   12533             :  * 
   12534             :  * @cname('__pyx_memoryview_check')
   12535             :  * cdef inline bint memoryview_check(object o) noexcept:             # <<<<<<<<<<<<<<
   12536             :  *     return isinstance(o, memoryview)
   12537             :  * 
   12538             :  */
   12539             : 
   12540             :   /* function exit code */
   12541         579 :   __pyx_L0:;
   12542         579 :   return __pyx_r;
   12543             : }
   12544             : 
   12545             : /* "View.MemoryView":671
   12546             :  *     return isinstance(o, memoryview)
   12547             :  * 
   12548             :  * cdef tuple _unellipsify(object index, int ndim):             # <<<<<<<<<<<<<<
   12549             :  *     """
   12550             :  *     Replace all ellipses with full slices and fill incomplete indices with
   12551             :  */
   12552             : 
   12553           0 : static PyObject *_unellipsify(PyObject *__pyx_v_index, int __pyx_v_ndim) {
   12554           0 :   Py_ssize_t __pyx_v_idx;
   12555           0 :   PyObject *__pyx_v_tup = NULL;
   12556           0 :   PyObject *__pyx_v_result = NULL;
   12557           0 :   int __pyx_v_have_slices;
   12558           0 :   int __pyx_v_seen_ellipsis;
   12559           0 :   PyObject *__pyx_v_item = NULL;
   12560           0 :   Py_ssize_t __pyx_v_nslices;
   12561           0 :   PyObject *__pyx_r = NULL;
   12562             :   __Pyx_RefNannyDeclarations
   12563           0 :   PyObject *__pyx_t_1 = NULL;
   12564           0 :   int __pyx_t_2;
   12565           0 :   PyObject *__pyx_t_3 = NULL;
   12566           0 :   Py_ssize_t __pyx_t_4;
   12567           0 :   Py_ssize_t __pyx_t_5;
   12568           0 :   Py_UCS4 __pyx_t_6;
   12569           0 :   PyObject *__pyx_t_7 = NULL;
   12570           0 :   int __pyx_lineno = 0;
   12571           0 :   const char *__pyx_filename = NULL;
   12572           0 :   int __pyx_clineno = 0;
   12573           0 :   __Pyx_RefNannySetupContext("_unellipsify", 1);
   12574             : 
   12575             :   /* "View.MemoryView":677
   12576             :  *     """
   12577             :  *     cdef Py_ssize_t idx
   12578             :  *     tup = <tuple>index if isinstance(index, tuple) else (index,)             # <<<<<<<<<<<<<<
   12579             :  * 
   12580             :  *     result = [slice(None)] * ndim
   12581             :  */
   12582           0 :   __pyx_t_2 = PyTuple_Check(__pyx_v_index); 
   12583           0 :   if (__pyx_t_2) {
   12584           0 :     __Pyx_INCREF(((PyObject*)__pyx_v_index));
   12585             :     __pyx_t_1 = __pyx_v_index;
   12586             :   } else {
   12587           0 :     __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 677, __pyx_L1_error)
   12588           0 :     __Pyx_GOTREF(__pyx_t_3);
   12589           0 :     __Pyx_INCREF(__pyx_v_index);
   12590           0 :     __Pyx_GIVEREF(__pyx_v_index);
   12591           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_index)) __PYX_ERR(1, 677, __pyx_L1_error);
   12592           0 :     __pyx_t_1 = __pyx_t_3;
   12593           0 :     __pyx_t_3 = 0;
   12594             :   }
   12595           0 :   __pyx_v_tup = ((PyObject*)__pyx_t_1);
   12596           0 :   __pyx_t_1 = 0;
   12597             : 
   12598             :   /* "View.MemoryView":679
   12599             :  *     tup = <tuple>index if isinstance(index, tuple) else (index,)
   12600             :  * 
   12601             :  *     result = [slice(None)] * ndim             # <<<<<<<<<<<<<<
   12602             :  *     have_slices = False
   12603             :  *     seen_ellipsis = False
   12604             :  */
   12605           0 :   __pyx_t_1 = PyList_New(1 * ((__pyx_v_ndim<0) ? 0:__pyx_v_ndim)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 679, __pyx_L1_error)
   12606             :   __Pyx_GOTREF(__pyx_t_1);
   12607             :   { Py_ssize_t __pyx_temp;
   12608           0 :     for (__pyx_temp=0; __pyx_temp < __pyx_v_ndim; __pyx_temp++) {
   12609           0 :       __Pyx_INCREF(__pyx_slice__5);
   12610           0 :       __Pyx_GIVEREF(__pyx_slice__5);
   12611           0 :       if (__Pyx_PyList_SET_ITEM(__pyx_t_1, __pyx_temp, __pyx_slice__5)) __PYX_ERR(1, 679, __pyx_L1_error);
   12612             :     }
   12613             :   }
   12614           0 :   __pyx_v_result = ((PyObject*)__pyx_t_1);
   12615           0 :   __pyx_t_1 = 0;
   12616             : 
   12617             :   /* "View.MemoryView":680
   12618             :  * 
   12619             :  *     result = [slice(None)] * ndim
   12620             :  *     have_slices = False             # <<<<<<<<<<<<<<
   12621             :  *     seen_ellipsis = False
   12622             :  *     idx = 0
   12623             :  */
   12624           0 :   __pyx_v_have_slices = 0;
   12625             : 
   12626             :   /* "View.MemoryView":681
   12627             :  *     result = [slice(None)] * ndim
   12628             :  *     have_slices = False
   12629             :  *     seen_ellipsis = False             # <<<<<<<<<<<<<<
   12630             :  *     idx = 0
   12631             :  *     for item in tup:
   12632             :  */
   12633           0 :   __pyx_v_seen_ellipsis = 0;
   12634             : 
   12635             :   /* "View.MemoryView":682
   12636             :  *     have_slices = False
   12637             :  *     seen_ellipsis = False
   12638             :  *     idx = 0             # <<<<<<<<<<<<<<
   12639             :  *     for item in tup:
   12640             :  *         if item is Ellipsis:
   12641             :  */
   12642           0 :   __pyx_v_idx = 0;
   12643             : 
   12644             :   /* "View.MemoryView":683
   12645             :  *     seen_ellipsis = False
   12646             :  *     idx = 0
   12647             :  *     for item in tup:             # <<<<<<<<<<<<<<
   12648             :  *         if item is Ellipsis:
   12649             :  *             if not seen_ellipsis:
   12650             :  */
   12651           0 :   if (unlikely(__pyx_v_tup == Py_None)) {
   12652           0 :     PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
   12653           0 :     __PYX_ERR(1, 683, __pyx_L1_error)
   12654             :   }
   12655           0 :   __pyx_t_1 = __pyx_v_tup; __Pyx_INCREF(__pyx_t_1);
   12656             :   __pyx_t_4 = 0;
   12657           0 :   for (;;) {
   12658           0 :     {
   12659           0 :       Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
   12660             :       #if !CYTHON_ASSUME_SAFE_MACROS
   12661             :       if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 683, __pyx_L1_error)
   12662             :       #endif
   12663           0 :       if (__pyx_t_4 >= __pyx_temp) break;
   12664             :     }
   12665             :     #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
   12666           0 :     __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(1, 683, __pyx_L1_error)
   12667             :     #else
   12668             :     __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 683, __pyx_L1_error)
   12669             :     __Pyx_GOTREF(__pyx_t_3);
   12670             :     #endif
   12671           0 :     __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_3);
   12672           0 :     __pyx_t_3 = 0;
   12673             : 
   12674             :     /* "View.MemoryView":684
   12675             :  *     idx = 0
   12676             :  *     for item in tup:
   12677             :  *         if item is Ellipsis:             # <<<<<<<<<<<<<<
   12678             :  *             if not seen_ellipsis:
   12679             :  *                 idx += ndim - len(tup)
   12680             :  */
   12681           0 :     __pyx_t_2 = (__pyx_v_item == __pyx_builtin_Ellipsis);
   12682           0 :     if (__pyx_t_2) {
   12683             : 
   12684             :       /* "View.MemoryView":685
   12685             :  *     for item in tup:
   12686             :  *         if item is Ellipsis:
   12687             :  *             if not seen_ellipsis:             # <<<<<<<<<<<<<<
   12688             :  *                 idx += ndim - len(tup)
   12689             :  *                 seen_ellipsis = True
   12690             :  */
   12691           0 :       __pyx_t_2 = (!__pyx_v_seen_ellipsis);
   12692           0 :       if (__pyx_t_2) {
   12693             : 
   12694             :         /* "View.MemoryView":686
   12695             :  *         if item is Ellipsis:
   12696             :  *             if not seen_ellipsis:
   12697             :  *                 idx += ndim - len(tup)             # <<<<<<<<<<<<<<
   12698             :  *                 seen_ellipsis = True
   12699             :  *             have_slices = True
   12700             :  */
   12701           0 :         if (unlikely(__pyx_v_tup == Py_None)) {
   12702             :           PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
   12703             :           __PYX_ERR(1, 686, __pyx_L1_error)
   12704             :         }
   12705           0 :         __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(__pyx_v_tup); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(1, 686, __pyx_L1_error)
   12706           0 :         __pyx_v_idx = (__pyx_v_idx + (__pyx_v_ndim - __pyx_t_5));
   12707             : 
   12708             :         /* "View.MemoryView":687
   12709             :  *             if not seen_ellipsis:
   12710             :  *                 idx += ndim - len(tup)
   12711             :  *                 seen_ellipsis = True             # <<<<<<<<<<<<<<
   12712             :  *             have_slices = True
   12713             :  *         else:
   12714             :  */
   12715           0 :         __pyx_v_seen_ellipsis = 1;
   12716             : 
   12717             :         /* "View.MemoryView":685
   12718             :  *     for item in tup:
   12719             :  *         if item is Ellipsis:
   12720             :  *             if not seen_ellipsis:             # <<<<<<<<<<<<<<
   12721             :  *                 idx += ndim - len(tup)
   12722             :  *                 seen_ellipsis = True
   12723             :  */
   12724             :       }
   12725             : 
   12726             :       /* "View.MemoryView":688
   12727             :  *                 idx += ndim - len(tup)
   12728             :  *                 seen_ellipsis = True
   12729             :  *             have_slices = True             # <<<<<<<<<<<<<<
   12730             :  *         else:
   12731             :  *             if isinstance(item, slice):
   12732             :  */
   12733           0 :       __pyx_v_have_slices = 1;
   12734             : 
   12735             :       /* "View.MemoryView":684
   12736             :  *     idx = 0
   12737             :  *     for item in tup:
   12738             :  *         if item is Ellipsis:             # <<<<<<<<<<<<<<
   12739             :  *             if not seen_ellipsis:
   12740             :  *                 idx += ndim - len(tup)
   12741             :  */
   12742           0 :       goto __pyx_L5;
   12743             :     }
   12744             : 
   12745             :     /* "View.MemoryView":690
   12746             :  *             have_slices = True
   12747             :  *         else:
   12748             :  *             if isinstance(item, slice):             # <<<<<<<<<<<<<<
   12749             :  *                 have_slices = True
   12750             :  *             elif not PyIndex_Check(item):
   12751             :  */
   12752             :     /*else*/ {
   12753           0 :       __pyx_t_2 = PySlice_Check(__pyx_v_item); 
   12754           0 :       if (__pyx_t_2) {
   12755             : 
   12756             :         /* "View.MemoryView":691
   12757             :  *         else:
   12758             :  *             if isinstance(item, slice):
   12759             :  *                 have_slices = True             # <<<<<<<<<<<<<<
   12760             :  *             elif not PyIndex_Check(item):
   12761             :  *                 raise TypeError, f"Cannot index with type '{type(item)}'"
   12762             :  */
   12763           0 :         __pyx_v_have_slices = 1;
   12764             : 
   12765             :         /* "View.MemoryView":690
   12766             :  *             have_slices = True
   12767             :  *         else:
   12768             :  *             if isinstance(item, slice):             # <<<<<<<<<<<<<<
   12769             :  *                 have_slices = True
   12770             :  *             elif not PyIndex_Check(item):
   12771             :  */
   12772           0 :         goto __pyx_L7;
   12773             :       }
   12774             : 
   12775             :       /* "View.MemoryView":692
   12776             :  *             if isinstance(item, slice):
   12777             :  *                 have_slices = True
   12778             :  *             elif not PyIndex_Check(item):             # <<<<<<<<<<<<<<
   12779             :  *                 raise TypeError, f"Cannot index with type '{type(item)}'"
   12780             :  *             result[idx] = item
   12781             :  */
   12782           0 :       __pyx_t_2 = (!(PyIndex_Check(__pyx_v_item) != 0));
   12783           0 :       if (unlikely(__pyx_t_2)) {
   12784             : 
   12785             :         /* "View.MemoryView":693
   12786             :  *                 have_slices = True
   12787             :  *             elif not PyIndex_Check(item):
   12788             :  *                 raise TypeError, f"Cannot index with type '{type(item)}'"             # <<<<<<<<<<<<<<
   12789             :  *             result[idx] = item
   12790             :  *         idx += 1
   12791             :  */
   12792           0 :         __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 693, __pyx_L1_error)
   12793           0 :         __Pyx_GOTREF(__pyx_t_3);
   12794           0 :         __pyx_t_5 = 0;
   12795           0 :         __pyx_t_6 = 127;
   12796           0 :         __Pyx_INCREF(__pyx_kp_u_Cannot_index_with_type);
   12797           0 :         __pyx_t_5 += 24;
   12798           0 :         __Pyx_GIVEREF(__pyx_kp_u_Cannot_index_with_type);
   12799           0 :         PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_Cannot_index_with_type);
   12800           0 :         __pyx_t_7 = __Pyx_PyObject_FormatSimple(((PyObject *)Py_TYPE(__pyx_v_item)), __pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 693, __pyx_L1_error)
   12801           0 :         __Pyx_GOTREF(__pyx_t_7);
   12802           0 :         __pyx_t_6 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) > __pyx_t_6) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) : __pyx_t_6;
   12803           0 :         __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7);
   12804           0 :         __Pyx_GIVEREF(__pyx_t_7);
   12805           0 :         PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_7);
   12806           0 :         __pyx_t_7 = 0;
   12807           0 :         __Pyx_INCREF(__pyx_kp_u__6);
   12808           0 :         __pyx_t_5 += 1;
   12809           0 :         __Pyx_GIVEREF(__pyx_kp_u__6);
   12810           0 :         PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u__6);
   12811           0 :         __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_3, 3, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 693, __pyx_L1_error)
   12812           0 :         __Pyx_GOTREF(__pyx_t_7);
   12813           0 :         __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   12814           0 :         __Pyx_Raise(__pyx_builtin_TypeError, __pyx_t_7, 0, 0);
   12815           0 :         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   12816           0 :         __PYX_ERR(1, 693, __pyx_L1_error)
   12817             : 
   12818             :         /* "View.MemoryView":692
   12819             :  *             if isinstance(item, slice):
   12820             :  *                 have_slices = True
   12821             :  *             elif not PyIndex_Check(item):             # <<<<<<<<<<<<<<
   12822             :  *                 raise TypeError, f"Cannot index with type '{type(item)}'"
   12823             :  *             result[idx] = item
   12824             :  */
   12825             :       }
   12826           0 :       __pyx_L7:;
   12827             : 
   12828             :       /* "View.MemoryView":694
   12829             :  *             elif not PyIndex_Check(item):
   12830             :  *                 raise TypeError, f"Cannot index with type '{type(item)}'"
   12831             :  *             result[idx] = item             # <<<<<<<<<<<<<<
   12832             :  *         idx += 1
   12833             :  * 
   12834             :  */
   12835           0 :       if (unlikely((__Pyx_SetItemInt(__pyx_v_result, __pyx_v_idx, __pyx_v_item, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1) < 0))) __PYX_ERR(1, 694, __pyx_L1_error)
   12836             :     }
   12837           0 :     __pyx_L5:;
   12838             : 
   12839             :     /* "View.MemoryView":695
   12840             :  *                 raise TypeError, f"Cannot index with type '{type(item)}'"
   12841             :  *             result[idx] = item
   12842             :  *         idx += 1             # <<<<<<<<<<<<<<
   12843             :  * 
   12844             :  *     nslices = ndim - idx
   12845             :  */
   12846           0 :     __pyx_v_idx = (__pyx_v_idx + 1);
   12847             : 
   12848             :     /* "View.MemoryView":683
   12849             :  *     seen_ellipsis = False
   12850             :  *     idx = 0
   12851             :  *     for item in tup:             # <<<<<<<<<<<<<<
   12852             :  *         if item is Ellipsis:
   12853             :  *             if not seen_ellipsis:
   12854             :  */
   12855             :   }
   12856           0 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   12857             : 
   12858             :   /* "View.MemoryView":697
   12859             :  *         idx += 1
   12860             :  * 
   12861             :  *     nslices = ndim - idx             # <<<<<<<<<<<<<<
   12862             :  *     return have_slices or nslices, tuple(result)
   12863             :  * 
   12864             :  */
   12865           0 :   __pyx_v_nslices = (__pyx_v_ndim - __pyx_v_idx);
   12866             : 
   12867             :   /* "View.MemoryView":698
   12868             :  * 
   12869             :  *     nslices = ndim - idx
   12870             :  *     return have_slices or nslices, tuple(result)             # <<<<<<<<<<<<<<
   12871             :  * 
   12872             :  * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1:
   12873             :  */
   12874           0 :   __Pyx_XDECREF(__pyx_r);
   12875           0 :   if (!__pyx_v_have_slices) {
   12876           0 :   } else {
   12877           0 :     __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_have_slices); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 698, __pyx_L1_error)
   12878           0 :     __Pyx_GOTREF(__pyx_t_7);
   12879           0 :     __pyx_t_1 = __pyx_t_7;
   12880           0 :     __pyx_t_7 = 0;
   12881           0 :     goto __pyx_L9_bool_binop_done;
   12882             :   }
   12883           0 :   __pyx_t_7 = PyInt_FromSsize_t(__pyx_v_nslices); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 698, __pyx_L1_error)
   12884             :   __Pyx_GOTREF(__pyx_t_7);
   12885             :   __pyx_t_1 = __pyx_t_7;
   12886           0 :   __pyx_t_7 = 0;
   12887           0 :   __pyx_L9_bool_binop_done:;
   12888           0 :   __pyx_t_7 = PyList_AsTuple(__pyx_v_result); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 698, __pyx_L1_error)
   12889           0 :   __Pyx_GOTREF(__pyx_t_7);
   12890           0 :   __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 698, __pyx_L1_error)
   12891           0 :   __Pyx_GOTREF(__pyx_t_3);
   12892           0 :   __Pyx_GIVEREF(__pyx_t_1);
   12893           0 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(1, 698, __pyx_L1_error);
   12894           0 :   __Pyx_GIVEREF(__pyx_t_7);
   12895           0 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_7)) __PYX_ERR(1, 698, __pyx_L1_error);
   12896           0 :   __pyx_t_1 = 0;
   12897           0 :   __pyx_t_7 = 0;
   12898           0 :   __pyx_r = ((PyObject*)__pyx_t_3);
   12899           0 :   __pyx_t_3 = 0;
   12900           0 :   goto __pyx_L0;
   12901             : 
   12902             :   /* "View.MemoryView":671
   12903             :  *     return isinstance(o, memoryview)
   12904             :  * 
   12905             :  * cdef tuple _unellipsify(object index, int ndim):             # <<<<<<<<<<<<<<
   12906             :  *     """
   12907             :  *     Replace all ellipses with full slices and fill incomplete indices with
   12908             :  */
   12909             : 
   12910             :   /* function exit code */
   12911           0 :   __pyx_L1_error:;
   12912           0 :   __Pyx_XDECREF(__pyx_t_1);
   12913           0 :   __Pyx_XDECREF(__pyx_t_3);
   12914           0 :   __Pyx_XDECREF(__pyx_t_7);
   12915           0 :   __Pyx_AddTraceback("View.MemoryView._unellipsify", __pyx_clineno, __pyx_lineno, __pyx_filename);
   12916           0 :   __pyx_r = 0;
   12917           0 :   __pyx_L0:;
   12918           0 :   __Pyx_XDECREF(__pyx_v_tup);
   12919           0 :   __Pyx_XDECREF(__pyx_v_result);
   12920           0 :   __Pyx_XDECREF(__pyx_v_item);
   12921           0 :   __Pyx_XGIVEREF(__pyx_r);
   12922           0 :   __Pyx_RefNannyFinishContext();
   12923           0 :   return __pyx_r;
   12924             : }
   12925             : 
   12926             : /* "View.MemoryView":700
   12927             :  *     return have_slices or nslices, tuple(result)
   12928             :  * 
   12929             :  * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1:             # <<<<<<<<<<<<<<
   12930             :  *     for suboffset in suboffsets[:ndim]:
   12931             :  *         if suboffset >= 0:
   12932             :  */
   12933             : 
   12934           0 : static int assert_direct_dimensions(Py_ssize_t *__pyx_v_suboffsets, int __pyx_v_ndim) {
   12935           0 :   Py_ssize_t __pyx_v_suboffset;
   12936           0 :   int __pyx_r;
   12937           0 :   Py_ssize_t *__pyx_t_1;
   12938           0 :   Py_ssize_t *__pyx_t_2;
   12939           0 :   Py_ssize_t *__pyx_t_3;
   12940           0 :   int __pyx_t_4;
   12941           0 :   int __pyx_lineno = 0;
   12942           0 :   const char *__pyx_filename = NULL;
   12943           0 :   int __pyx_clineno = 0;
   12944             : 
   12945             :   /* "View.MemoryView":701
   12946             :  * 
   12947             :  * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1:
   12948             :  *     for suboffset in suboffsets[:ndim]:             # <<<<<<<<<<<<<<
   12949             :  *         if suboffset >= 0:
   12950             :  *             raise ValueError, "Indirect dimensions not supported"
   12951             :  */
   12952           0 :   __pyx_t_2 = (__pyx_v_suboffsets + __pyx_v_ndim);
   12953           0 :   for (__pyx_t_3 = __pyx_v_suboffsets; __pyx_t_3 < __pyx_t_2; __pyx_t_3++) {
   12954           0 :     __pyx_t_1 = __pyx_t_3;
   12955           0 :     __pyx_v_suboffset = (__pyx_t_1[0]);
   12956             : 
   12957             :     /* "View.MemoryView":702
   12958             :  * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1:
   12959             :  *     for suboffset in suboffsets[:ndim]:
   12960             :  *         if suboffset >= 0:             # <<<<<<<<<<<<<<
   12961             :  *             raise ValueError, "Indirect dimensions not supported"
   12962             :  *     return 0  # return type just used as an error flag
   12963             :  */
   12964           0 :     __pyx_t_4 = (__pyx_v_suboffset >= 0);
   12965           0 :     if (unlikely(__pyx_t_4)) {
   12966             : 
   12967             :       /* "View.MemoryView":703
   12968             :  *     for suboffset in suboffsets[:ndim]:
   12969             :  *         if suboffset >= 0:
   12970             :  *             raise ValueError, "Indirect dimensions not supported"             # <<<<<<<<<<<<<<
   12971             :  *     return 0  # return type just used as an error flag
   12972             :  * 
   12973             :  */
   12974           0 :       __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_Indirect_dimensions_not_supporte, 0, 0);
   12975           0 :       __PYX_ERR(1, 703, __pyx_L1_error)
   12976             : 
   12977             :       /* "View.MemoryView":702
   12978             :  * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1:
   12979             :  *     for suboffset in suboffsets[:ndim]:
   12980             :  *         if suboffset >= 0:             # <<<<<<<<<<<<<<
   12981             :  *             raise ValueError, "Indirect dimensions not supported"
   12982             :  *     return 0  # return type just used as an error flag
   12983             :  */
   12984             :     }
   12985             :   }
   12986             : 
   12987             :   /* "View.MemoryView":704
   12988             :  *         if suboffset >= 0:
   12989             :  *             raise ValueError, "Indirect dimensions not supported"
   12990             :  *     return 0  # return type just used as an error flag             # <<<<<<<<<<<<<<
   12991             :  * 
   12992             :  * 
   12993             :  */
   12994           0 :   __pyx_r = 0;
   12995           0 :   goto __pyx_L0;
   12996             : 
   12997             :   /* "View.MemoryView":700
   12998             :  *     return have_slices or nslices, tuple(result)
   12999             :  * 
   13000             :  * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1:             # <<<<<<<<<<<<<<
   13001             :  *     for suboffset in suboffsets[:ndim]:
   13002             :  *         if suboffset >= 0:
   13003             :  */
   13004             : 
   13005             :   /* function exit code */
   13006           0 :   __pyx_L1_error:;
   13007           0 :   __Pyx_AddTraceback("View.MemoryView.assert_direct_dimensions", __pyx_clineno, __pyx_lineno, __pyx_filename);
   13008           0 :   __pyx_r = -1;
   13009           0 :   __pyx_L0:;
   13010           0 :   return __pyx_r;
   13011             : }
   13012             : 
   13013             : /* "View.MemoryView":711
   13014             :  * 
   13015             :  * @cname('__pyx_memview_slice')
   13016             :  * cdef memoryview memview_slice(memoryview memview, object indices):             # <<<<<<<<<<<<<<
   13017             :  *     cdef int new_ndim = 0, suboffset_dim = -1, dim
   13018             :  *     cdef bint negative_step
   13019             :  */
   13020             : 
   13021           0 : static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_obj *__pyx_v_memview, PyObject *__pyx_v_indices) {
   13022           0 :   int __pyx_v_new_ndim;
   13023           0 :   int __pyx_v_suboffset_dim;
   13024           0 :   int __pyx_v_dim;
   13025           0 :   __Pyx_memviewslice __pyx_v_src;
   13026           0 :   __Pyx_memviewslice __pyx_v_dst;
   13027           0 :   __Pyx_memviewslice *__pyx_v_p_src;
   13028           0 :   struct __pyx_memoryviewslice_obj *__pyx_v_memviewsliceobj = 0;
   13029           0 :   __Pyx_memviewslice *__pyx_v_p_dst;
   13030           0 :   int *__pyx_v_p_suboffset_dim;
   13031           0 :   Py_ssize_t __pyx_v_start;
   13032           0 :   Py_ssize_t __pyx_v_stop;
   13033           0 :   Py_ssize_t __pyx_v_step;
   13034           0 :   Py_ssize_t __pyx_v_cindex;
   13035           0 :   int __pyx_v_have_start;
   13036           0 :   int __pyx_v_have_stop;
   13037           0 :   int __pyx_v_have_step;
   13038           0 :   PyObject *__pyx_v_index = NULL;
   13039           0 :   struct __pyx_memoryview_obj *__pyx_r = NULL;
   13040             :   __Pyx_RefNannyDeclarations
   13041           0 :   int __pyx_t_1;
   13042           0 :   PyObject *__pyx_t_2 = NULL;
   13043           0 :   struct __pyx_memoryview_obj *__pyx_t_3;
   13044           0 :   char *__pyx_t_4;
   13045           0 :   int __pyx_t_5;
   13046           0 :   Py_ssize_t __pyx_t_6;
   13047           0 :   PyObject *(*__pyx_t_7)(PyObject *);
   13048           0 :   PyObject *__pyx_t_8 = NULL;
   13049           0 :   Py_ssize_t __pyx_t_9;
   13050           0 :   int __pyx_t_10;
   13051           0 :   Py_ssize_t __pyx_t_11;
   13052           0 :   int __pyx_lineno = 0;
   13053           0 :   const char *__pyx_filename = NULL;
   13054           0 :   int __pyx_clineno = 0;
   13055           0 :   __Pyx_RefNannySetupContext("memview_slice", 1);
   13056             : 
   13057             :   /* "View.MemoryView":712
   13058             :  * @cname('__pyx_memview_slice')
   13059             :  * cdef memoryview memview_slice(memoryview memview, object indices):
   13060             :  *     cdef int new_ndim = 0, suboffset_dim = -1, dim             # <<<<<<<<<<<<<<
   13061             :  *     cdef bint negative_step
   13062             :  *     cdef __Pyx_memviewslice src, dst
   13063             :  */
   13064           0 :   __pyx_v_new_ndim = 0;
   13065           0 :   __pyx_v_suboffset_dim = -1;
   13066             : 
   13067             :   /* "View.MemoryView":719
   13068             :  * 
   13069             :  * 
   13070             :  *     memset(&dst, 0, sizeof(dst))             # <<<<<<<<<<<<<<
   13071             :  * 
   13072             :  *     cdef _memoryviewslice memviewsliceobj
   13073             :  */
   13074           0 :   (void)(memset((&__pyx_v_dst), 0, (sizeof(__pyx_v_dst))));
   13075             : 
   13076             :   /* "View.MemoryView":723
   13077             :  *     cdef _memoryviewslice memviewsliceobj
   13078             :  * 
   13079             :  *     assert memview.view.ndim > 0             # <<<<<<<<<<<<<<
   13080             :  * 
   13081             :  *     if isinstance(memview, _memoryviewslice):
   13082             :  */
   13083             :   #ifndef CYTHON_WITHOUT_ASSERTIONS
   13084           0 :   if (unlikely(__pyx_assertions_enabled())) {
   13085           0 :     __pyx_t_1 = (__pyx_v_memview->view.ndim > 0);
   13086           0 :     if (unlikely(!__pyx_t_1)) {
   13087           0 :       __Pyx_Raise(__pyx_builtin_AssertionError, 0, 0, 0);
   13088           0 :       __PYX_ERR(1, 723, __pyx_L1_error)
   13089             :     }
   13090             :   }
   13091             :   #else
   13092             :   if ((1)); else __PYX_ERR(1, 723, __pyx_L1_error)
   13093             :   #endif
   13094             : 
   13095             :   /* "View.MemoryView":725
   13096             :  *     assert memview.view.ndim > 0
   13097             :  * 
   13098             :  *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
   13099             :  *         memviewsliceobj = memview
   13100             :  *         p_src = &memviewsliceobj.from_slice
   13101             :  */
   13102           0 :   __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type); 
   13103           0 :   if (__pyx_t_1) {
   13104             : 
   13105             :     /* "View.MemoryView":726
   13106             :  * 
   13107             :  *     if isinstance(memview, _memoryviewslice):
   13108             :  *         memviewsliceobj = memview             # <<<<<<<<<<<<<<
   13109             :  *         p_src = &memviewsliceobj.from_slice
   13110             :  *     else:
   13111             :  */
   13112           0 :     if (!(likely(((((PyObject *)__pyx_v_memview)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type))))) __PYX_ERR(1, 726, __pyx_L1_error)
   13113           0 :     __pyx_t_2 = ((PyObject *)__pyx_v_memview);
   13114           0 :     __Pyx_INCREF(__pyx_t_2);
   13115           0 :     __pyx_v_memviewsliceobj = ((struct __pyx_memoryviewslice_obj *)__pyx_t_2);
   13116           0 :     __pyx_t_2 = 0;
   13117             : 
   13118             :     /* "View.MemoryView":727
   13119             :  *     if isinstance(memview, _memoryviewslice):
   13120             :  *         memviewsliceobj = memview
   13121             :  *         p_src = &memviewsliceobj.from_slice             # <<<<<<<<<<<<<<
   13122             :  *     else:
   13123             :  *         slice_copy(memview, &src)
   13124             :  */
   13125           0 :     __pyx_v_p_src = (&__pyx_v_memviewsliceobj->from_slice);
   13126             : 
   13127             :     /* "View.MemoryView":725
   13128             :  *     assert memview.view.ndim > 0
   13129             :  * 
   13130             :  *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
   13131             :  *         memviewsliceobj = memview
   13132             :  *         p_src = &memviewsliceobj.from_slice
   13133             :  */
   13134           0 :     goto __pyx_L3;
   13135             :   }
   13136             : 
   13137             :   /* "View.MemoryView":729
   13138             :  *         p_src = &memviewsliceobj.from_slice
   13139             :  *     else:
   13140             :  *         slice_copy(memview, &src)             # <<<<<<<<<<<<<<
   13141             :  *         p_src = &src
   13142             :  * 
   13143             :  */
   13144             :   /*else*/ {
   13145           0 :     __pyx_memoryview_slice_copy(__pyx_v_memview, (&__pyx_v_src));
   13146             : 
   13147             :     /* "View.MemoryView":730
   13148             :  *     else:
   13149             :  *         slice_copy(memview, &src)
   13150             :  *         p_src = &src             # <<<<<<<<<<<<<<
   13151             :  * 
   13152             :  * 
   13153             :  */
   13154           0 :     __pyx_v_p_src = (&__pyx_v_src);
   13155             :   }
   13156           0 :   __pyx_L3:;
   13157             : 
   13158             :   /* "View.MemoryView":736
   13159             :  * 
   13160             :  * 
   13161             :  *     dst.memview = p_src.memview             # <<<<<<<<<<<<<<
   13162             :  *     dst.data = p_src.data
   13163             :  * 
   13164             :  */
   13165           0 :   __pyx_t_3 = __pyx_v_p_src->memview;
   13166           0 :   __pyx_v_dst.memview = __pyx_t_3;
   13167             : 
   13168             :   /* "View.MemoryView":737
   13169             :  * 
   13170             :  *     dst.memview = p_src.memview
   13171             :  *     dst.data = p_src.data             # <<<<<<<<<<<<<<
   13172             :  * 
   13173             :  * 
   13174             :  */
   13175           0 :   __pyx_t_4 = __pyx_v_p_src->data;
   13176           0 :   __pyx_v_dst.data = __pyx_t_4;
   13177             : 
   13178             :   /* "View.MemoryView":742
   13179             :  * 
   13180             :  * 
   13181             :  *     cdef __Pyx_memviewslice *p_dst = &dst             # <<<<<<<<<<<<<<
   13182             :  *     cdef int *p_suboffset_dim = &suboffset_dim
   13183             :  *     cdef Py_ssize_t start, stop, step, cindex
   13184             :  */
   13185           0 :   __pyx_v_p_dst = (&__pyx_v_dst);
   13186             : 
   13187             :   /* "View.MemoryView":743
   13188             :  * 
   13189             :  *     cdef __Pyx_memviewslice *p_dst = &dst
   13190             :  *     cdef int *p_suboffset_dim = &suboffset_dim             # <<<<<<<<<<<<<<
   13191             :  *     cdef Py_ssize_t start, stop, step, cindex
   13192             :  *     cdef bint have_start, have_stop, have_step
   13193             :  */
   13194           0 :   __pyx_v_p_suboffset_dim = (&__pyx_v_suboffset_dim);
   13195             : 
   13196             :   /* "View.MemoryView":747
   13197             :  *     cdef bint have_start, have_stop, have_step
   13198             :  * 
   13199             :  *     for dim, index in enumerate(indices):             # <<<<<<<<<<<<<<
   13200             :  *         if PyIndex_Check(index):
   13201             :  *             cindex = index
   13202             :  */
   13203           0 :   __pyx_t_5 = 0;
   13204           0 :   if (likely(PyList_CheckExact(__pyx_v_indices)) || PyTuple_CheckExact(__pyx_v_indices)) {
   13205           0 :     __pyx_t_2 = __pyx_v_indices; __Pyx_INCREF(__pyx_t_2);
   13206           0 :     __pyx_t_6 = 0;
   13207           0 :     __pyx_t_7 = NULL;
   13208             :   } else {
   13209           0 :     __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_indices); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 747, __pyx_L1_error)
   13210           0 :     __Pyx_GOTREF(__pyx_t_2);
   13211           0 :     __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 747, __pyx_L1_error)
   13212             :   }
   13213           0 :   for (;;) {
   13214           0 :     if (likely(!__pyx_t_7)) {
   13215           0 :       if (likely(PyList_CheckExact(__pyx_t_2))) {
   13216             :         {
   13217           0 :           Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
   13218             :           #if !CYTHON_ASSUME_SAFE_MACROS
   13219             :           if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 747, __pyx_L1_error)
   13220             :           #endif
   13221           0 :           if (__pyx_t_6 >= __pyx_temp) break;
   13222             :         }
   13223             :         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
   13224           0 :         __pyx_t_8 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(1, 747, __pyx_L1_error)
   13225             :         #else
   13226             :         __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 747, __pyx_L1_error)
   13227             :         __Pyx_GOTREF(__pyx_t_8);
   13228             :         #endif
   13229             :       } else {
   13230             :         {
   13231           0 :           Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
   13232             :           #if !CYTHON_ASSUME_SAFE_MACROS
   13233             :           if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 747, __pyx_L1_error)
   13234             :           #endif
   13235           0 :           if (__pyx_t_6 >= __pyx_temp) break;
   13236             :         }
   13237             :         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
   13238           0 :         __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(1, 747, __pyx_L1_error)
   13239             :         #else
   13240             :         __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 747, __pyx_L1_error)
   13241             :         __Pyx_GOTREF(__pyx_t_8);
   13242             :         #endif
   13243             :       }
   13244             :     } else {
   13245           0 :       __pyx_t_8 = __pyx_t_7(__pyx_t_2);
   13246           0 :       if (unlikely(!__pyx_t_8)) {
   13247           0 :         PyObject* exc_type = PyErr_Occurred();
   13248           0 :         if (exc_type) {
   13249           0 :           if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
   13250           0 :           else __PYX_ERR(1, 747, __pyx_L1_error)
   13251             :         }
   13252             :         break;
   13253             :       }
   13254           0 :       __Pyx_GOTREF(__pyx_t_8);
   13255             :     }
   13256           0 :     __Pyx_XDECREF_SET(__pyx_v_index, __pyx_t_8);
   13257           0 :     __pyx_t_8 = 0;
   13258           0 :     __pyx_v_dim = __pyx_t_5;
   13259           0 :     __pyx_t_5 = (__pyx_t_5 + 1);
   13260             : 
   13261             :     /* "View.MemoryView":748
   13262             :  * 
   13263             :  *     for dim, index in enumerate(indices):
   13264             :  *         if PyIndex_Check(index):             # <<<<<<<<<<<<<<
   13265             :  *             cindex = index
   13266             :  *             slice_memviewslice(
   13267             :  */
   13268           0 :     __pyx_t_1 = (PyIndex_Check(__pyx_v_index) != 0);
   13269           0 :     if (__pyx_t_1) {
   13270             : 
   13271             :       /* "View.MemoryView":749
   13272             :  *     for dim, index in enumerate(indices):
   13273             :  *         if PyIndex_Check(index):
   13274             :  *             cindex = index             # <<<<<<<<<<<<<<
   13275             :  *             slice_memviewslice(
   13276             :  *                 p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
   13277             :  */
   13278           0 :       __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_index); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 749, __pyx_L1_error)
   13279           0 :       __pyx_v_cindex = __pyx_t_9;
   13280             : 
   13281             :       /* "View.MemoryView":750
   13282             :  *         if PyIndex_Check(index):
   13283             :  *             cindex = index
   13284             :  *             slice_memviewslice(             # <<<<<<<<<<<<<<
   13285             :  *                 p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
   13286             :  *                 dim, new_ndim, p_suboffset_dim,
   13287             :  */
   13288           0 :       __pyx_t_10 = __pyx_memoryview_slice_memviewslice(__pyx_v_p_dst, (__pyx_v_p_src->shape[__pyx_v_dim]), (__pyx_v_p_src->strides[__pyx_v_dim]), (__pyx_v_p_src->suboffsets[__pyx_v_dim]), __pyx_v_dim, __pyx_v_new_ndim, __pyx_v_p_suboffset_dim, __pyx_v_cindex, 0, 0, 0, 0, 0, 0); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(1, 750, __pyx_L1_error)
   13289             : 
   13290             :       /* "View.MemoryView":748
   13291             :  * 
   13292             :  *     for dim, index in enumerate(indices):
   13293             :  *         if PyIndex_Check(index):             # <<<<<<<<<<<<<<
   13294             :  *             cindex = index
   13295             :  *             slice_memviewslice(
   13296             :  */
   13297           0 :       goto __pyx_L6;
   13298             :     }
   13299             : 
   13300             :     /* "View.MemoryView":756
   13301             :  *                 0, 0, 0, # have_{start,stop,step}
   13302             :  *                 False)
   13303             :  *         elif index is None:             # <<<<<<<<<<<<<<
   13304             :  *             p_dst.shape[new_ndim] = 1
   13305             :  *             p_dst.strides[new_ndim] = 0
   13306             :  */
   13307           0 :     __pyx_t_1 = (__pyx_v_index == Py_None);
   13308           0 :     if (__pyx_t_1) {
   13309             : 
   13310             :       /* "View.MemoryView":757
   13311             :  *                 False)
   13312             :  *         elif index is None:
   13313             :  *             p_dst.shape[new_ndim] = 1             # <<<<<<<<<<<<<<
   13314             :  *             p_dst.strides[new_ndim] = 0
   13315             :  *             p_dst.suboffsets[new_ndim] = -1
   13316             :  */
   13317           0 :       (__pyx_v_p_dst->shape[__pyx_v_new_ndim]) = 1;
   13318             : 
   13319             :       /* "View.MemoryView":758
   13320             :  *         elif index is None:
   13321             :  *             p_dst.shape[new_ndim] = 1
   13322             :  *             p_dst.strides[new_ndim] = 0             # <<<<<<<<<<<<<<
   13323             :  *             p_dst.suboffsets[new_ndim] = -1
   13324             :  *             new_ndim += 1
   13325             :  */
   13326           0 :       (__pyx_v_p_dst->strides[__pyx_v_new_ndim]) = 0;
   13327             : 
   13328             :       /* "View.MemoryView":759
   13329             :  *             p_dst.shape[new_ndim] = 1
   13330             :  *             p_dst.strides[new_ndim] = 0
   13331             :  *             p_dst.suboffsets[new_ndim] = -1             # <<<<<<<<<<<<<<
   13332             :  *             new_ndim += 1
   13333             :  *         else:
   13334             :  */
   13335           0 :       (__pyx_v_p_dst->suboffsets[__pyx_v_new_ndim]) = -1L;
   13336             : 
   13337             :       /* "View.MemoryView":760
   13338             :  *             p_dst.strides[new_ndim] = 0
   13339             :  *             p_dst.suboffsets[new_ndim] = -1
   13340             :  *             new_ndim += 1             # <<<<<<<<<<<<<<
   13341             :  *         else:
   13342             :  *             start = index.start or 0
   13343             :  */
   13344           0 :       __pyx_v_new_ndim = (__pyx_v_new_ndim + 1);
   13345             : 
   13346             :       /* "View.MemoryView":756
   13347             :  *                 0, 0, 0, # have_{start,stop,step}
   13348             :  *                 False)
   13349             :  *         elif index is None:             # <<<<<<<<<<<<<<
   13350             :  *             p_dst.shape[new_ndim] = 1
   13351             :  *             p_dst.strides[new_ndim] = 0
   13352             :  */
   13353           0 :       goto __pyx_L6;
   13354             :     }
   13355             : 
   13356             :     /* "View.MemoryView":762
   13357             :  *             new_ndim += 1
   13358             :  *         else:
   13359             :  *             start = index.start or 0             # <<<<<<<<<<<<<<
   13360             :  *             stop = index.stop or 0
   13361             :  *             step = index.step or 0
   13362             :  */
   13363             :     /*else*/ {
   13364           0 :       __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_start); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 762, __pyx_L1_error)
   13365           0 :       __Pyx_GOTREF(__pyx_t_8);
   13366           0 :       __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 762, __pyx_L1_error)
   13367           0 :       if (!__pyx_t_1) {
   13368           0 :         __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   13369             :       } else {
   13370           0 :         __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 762, __pyx_L1_error)
   13371           0 :         __pyx_t_9 = __pyx_t_11;
   13372           0 :         __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   13373           0 :         goto __pyx_L7_bool_binop_done;
   13374             :       }
   13375             :       __pyx_t_9 = 0;
   13376           0 :       __pyx_L7_bool_binop_done:;
   13377           0 :       __pyx_v_start = __pyx_t_9;
   13378             : 
   13379             :       /* "View.MemoryView":763
   13380             :  *         else:
   13381             :  *             start = index.start or 0
   13382             :  *             stop = index.stop or 0             # <<<<<<<<<<<<<<
   13383             :  *             step = index.step or 0
   13384             :  * 
   13385             :  */
   13386           0 :       __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_stop); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 763, __pyx_L1_error)
   13387           0 :       __Pyx_GOTREF(__pyx_t_8);
   13388           0 :       __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 763, __pyx_L1_error)
   13389           0 :       if (!__pyx_t_1) {
   13390           0 :         __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   13391             :       } else {
   13392           0 :         __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 763, __pyx_L1_error)
   13393           0 :         __pyx_t_9 = __pyx_t_11;
   13394           0 :         __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   13395           0 :         goto __pyx_L9_bool_binop_done;
   13396             :       }
   13397             :       __pyx_t_9 = 0;
   13398           0 :       __pyx_L9_bool_binop_done:;
   13399           0 :       __pyx_v_stop = __pyx_t_9;
   13400             : 
   13401             :       /* "View.MemoryView":764
   13402             :  *             start = index.start or 0
   13403             :  *             stop = index.stop or 0
   13404             :  *             step = index.step or 0             # <<<<<<<<<<<<<<
   13405             :  * 
   13406             :  *             have_start = index.start is not None
   13407             :  */
   13408           0 :       __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_step); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 764, __pyx_L1_error)
   13409           0 :       __Pyx_GOTREF(__pyx_t_8);
   13410           0 :       __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 764, __pyx_L1_error)
   13411           0 :       if (!__pyx_t_1) {
   13412           0 :         __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   13413             :       } else {
   13414           0 :         __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 764, __pyx_L1_error)
   13415           0 :         __pyx_t_9 = __pyx_t_11;
   13416           0 :         __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   13417           0 :         goto __pyx_L11_bool_binop_done;
   13418             :       }
   13419             :       __pyx_t_9 = 0;
   13420           0 :       __pyx_L11_bool_binop_done:;
   13421           0 :       __pyx_v_step = __pyx_t_9;
   13422             : 
   13423             :       /* "View.MemoryView":766
   13424             :  *             step = index.step or 0
   13425             :  * 
   13426             :  *             have_start = index.start is not None             # <<<<<<<<<<<<<<
   13427             :  *             have_stop = index.stop is not None
   13428             :  *             have_step = index.step is not None
   13429             :  */
   13430           0 :       __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_start); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 766, __pyx_L1_error)
   13431           0 :       __Pyx_GOTREF(__pyx_t_8);
   13432           0 :       __pyx_t_1 = (__pyx_t_8 != Py_None);
   13433           0 :       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   13434           0 :       __pyx_v_have_start = __pyx_t_1;
   13435             : 
   13436             :       /* "View.MemoryView":767
   13437             :  * 
   13438             :  *             have_start = index.start is not None
   13439             :  *             have_stop = index.stop is not None             # <<<<<<<<<<<<<<
   13440             :  *             have_step = index.step is not None
   13441             :  * 
   13442             :  */
   13443           0 :       __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_stop); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 767, __pyx_L1_error)
   13444           0 :       __Pyx_GOTREF(__pyx_t_8);
   13445           0 :       __pyx_t_1 = (__pyx_t_8 != Py_None);
   13446           0 :       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   13447           0 :       __pyx_v_have_stop = __pyx_t_1;
   13448             : 
   13449             :       /* "View.MemoryView":768
   13450             :  *             have_start = index.start is not None
   13451             :  *             have_stop = index.stop is not None
   13452             :  *             have_step = index.step is not None             # <<<<<<<<<<<<<<
   13453             :  * 
   13454             :  *             slice_memviewslice(
   13455             :  */
   13456           0 :       __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_step); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 768, __pyx_L1_error)
   13457           0 :       __Pyx_GOTREF(__pyx_t_8);
   13458           0 :       __pyx_t_1 = (__pyx_t_8 != Py_None);
   13459           0 :       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   13460           0 :       __pyx_v_have_step = __pyx_t_1;
   13461             : 
   13462             :       /* "View.MemoryView":770
   13463             :  *             have_step = index.step is not None
   13464             :  * 
   13465             :  *             slice_memviewslice(             # <<<<<<<<<<<<<<
   13466             :  *                 p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
   13467             :  *                 dim, new_ndim, p_suboffset_dim,
   13468             :  */
   13469           0 :       __pyx_t_10 = __pyx_memoryview_slice_memviewslice(__pyx_v_p_dst, (__pyx_v_p_src->shape[__pyx_v_dim]), (__pyx_v_p_src->strides[__pyx_v_dim]), (__pyx_v_p_src->suboffsets[__pyx_v_dim]), __pyx_v_dim, __pyx_v_new_ndim, __pyx_v_p_suboffset_dim, __pyx_v_start, __pyx_v_stop, __pyx_v_step, __pyx_v_have_start, __pyx_v_have_stop, __pyx_v_have_step, 1); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(1, 770, __pyx_L1_error)
   13470             : 
   13471             :       /* "View.MemoryView":776
   13472             :  *                 have_start, have_stop, have_step,
   13473             :  *                 True)
   13474             :  *             new_ndim += 1             # <<<<<<<<<<<<<<
   13475             :  * 
   13476             :  *     if isinstance(memview, _memoryviewslice):
   13477             :  */
   13478           0 :       __pyx_v_new_ndim = (__pyx_v_new_ndim + 1);
   13479             :     }
   13480           0 :     __pyx_L6:;
   13481             : 
   13482             :     /* "View.MemoryView":747
   13483             :  *     cdef bint have_start, have_stop, have_step
   13484             :  * 
   13485             :  *     for dim, index in enumerate(indices):             # <<<<<<<<<<<<<<
   13486             :  *         if PyIndex_Check(index):
   13487             :  *             cindex = index
   13488             :  */
   13489             :   }
   13490           0 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   13491             : 
   13492             :   /* "View.MemoryView":778
   13493             :  *             new_ndim += 1
   13494             :  * 
   13495             :  *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
   13496             :  *         return memoryview_fromslice(dst, new_ndim,
   13497             :  *                                     memviewsliceobj.to_object_func,
   13498             :  */
   13499           0 :   __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type); 
   13500           0 :   if (__pyx_t_1) {
   13501             : 
   13502             :     /* "View.MemoryView":779
   13503             :  * 
   13504             :  *     if isinstance(memview, _memoryviewslice):
   13505             :  *         return memoryview_fromslice(dst, new_ndim,             # <<<<<<<<<<<<<<
   13506             :  *                                     memviewsliceobj.to_object_func,
   13507             :  *                                     memviewsliceobj.to_dtype_func,
   13508             :  */
   13509           0 :     __Pyx_XDECREF((PyObject *)__pyx_r);
   13510             : 
   13511             :     /* "View.MemoryView":780
   13512             :  *     if isinstance(memview, _memoryviewslice):
   13513             :  *         return memoryview_fromslice(dst, new_ndim,
   13514             :  *                                     memviewsliceobj.to_object_func,             # <<<<<<<<<<<<<<
   13515             :  *                                     memviewsliceobj.to_dtype_func,
   13516             :  *                                     memview.dtype_is_object)
   13517             :  */
   13518           0 :     if (unlikely(!__pyx_v_memviewsliceobj)) { __Pyx_RaiseUnboundLocalError("memviewsliceobj"); __PYX_ERR(1, 780, __pyx_L1_error) }
   13519             : 
   13520             :     /* "View.MemoryView":781
   13521             :  *         return memoryview_fromslice(dst, new_ndim,
   13522             :  *                                     memviewsliceobj.to_object_func,
   13523             :  *                                     memviewsliceobj.to_dtype_func,             # <<<<<<<<<<<<<<
   13524             :  *                                     memview.dtype_is_object)
   13525             :  *     else:
   13526             :  */
   13527           0 :     if (unlikely(!__pyx_v_memviewsliceobj)) { __Pyx_RaiseUnboundLocalError("memviewsliceobj"); __PYX_ERR(1, 781, __pyx_L1_error) }
   13528             : 
   13529             :     /* "View.MemoryView":779
   13530             :  * 
   13531             :  *     if isinstance(memview, _memoryviewslice):
   13532             :  *         return memoryview_fromslice(dst, new_ndim,             # <<<<<<<<<<<<<<
   13533             :  *                                     memviewsliceobj.to_object_func,
   13534             :  *                                     memviewsliceobj.to_dtype_func,
   13535             :  */
   13536           0 :     __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_v_dst, __pyx_v_new_ndim, __pyx_v_memviewsliceobj->to_object_func, __pyx_v_memviewsliceobj->to_dtype_func, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 779, __pyx_L1_error)
   13537           0 :     __Pyx_GOTREF(__pyx_t_2);
   13538           0 :     if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_memoryview_type))))) __PYX_ERR(1, 779, __pyx_L1_error)
   13539           0 :     __pyx_r = ((struct __pyx_memoryview_obj *)__pyx_t_2);
   13540           0 :     __pyx_t_2 = 0;
   13541           0 :     goto __pyx_L0;
   13542             : 
   13543             :     /* "View.MemoryView":778
   13544             :  *             new_ndim += 1
   13545             :  * 
   13546             :  *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
   13547             :  *         return memoryview_fromslice(dst, new_ndim,
   13548             :  *                                     memviewsliceobj.to_object_func,
   13549             :  */
   13550             :   }
   13551             : 
   13552             :   /* "View.MemoryView":784
   13553             :  *                                     memview.dtype_is_object)
   13554             :  *     else:
   13555             :  *         return memoryview_fromslice(dst, new_ndim, NULL, NULL,             # <<<<<<<<<<<<<<
   13556             :  *                                     memview.dtype_is_object)
   13557             :  * 
   13558             :  */
   13559             :   /*else*/ {
   13560           0 :     __Pyx_XDECREF((PyObject *)__pyx_r);
   13561             : 
   13562             :     /* "View.MemoryView":785
   13563             :  *     else:
   13564             :  *         return memoryview_fromslice(dst, new_ndim, NULL, NULL,
   13565             :  *                                     memview.dtype_is_object)             # <<<<<<<<<<<<<<
   13566             :  * 
   13567             :  * 
   13568             :  */
   13569           0 :     __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_v_dst, __pyx_v_new_ndim, NULL, NULL, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 784, __pyx_L1_error)
   13570           0 :     __Pyx_GOTREF(__pyx_t_2);
   13571             : 
   13572             :     /* "View.MemoryView":784
   13573             :  *                                     memview.dtype_is_object)
   13574             :  *     else:
   13575             :  *         return memoryview_fromslice(dst, new_ndim, NULL, NULL,             # <<<<<<<<<<<<<<
   13576             :  *                                     memview.dtype_is_object)
   13577             :  * 
   13578             :  */
   13579           0 :     if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_memoryview_type))))) __PYX_ERR(1, 784, __pyx_L1_error)
   13580           0 :     __pyx_r = ((struct __pyx_memoryview_obj *)__pyx_t_2);
   13581           0 :     __pyx_t_2 = 0;
   13582           0 :     goto __pyx_L0;
   13583             :   }
   13584             : 
   13585             :   /* "View.MemoryView":711
   13586             :  * 
   13587             :  * @cname('__pyx_memview_slice')
   13588             :  * cdef memoryview memview_slice(memoryview memview, object indices):             # <<<<<<<<<<<<<<
   13589             :  *     cdef int new_ndim = 0, suboffset_dim = -1, dim
   13590             :  *     cdef bint negative_step
   13591             :  */
   13592             : 
   13593             :   /* function exit code */
   13594           0 :   __pyx_L1_error:;
   13595           0 :   __Pyx_XDECREF(__pyx_t_2);
   13596           0 :   __Pyx_XDECREF(__pyx_t_8);
   13597           0 :   __Pyx_AddTraceback("View.MemoryView.memview_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
   13598           0 :   __pyx_r = 0;
   13599           0 :   __pyx_L0:;
   13600           0 :   __Pyx_XDECREF((PyObject *)__pyx_v_memviewsliceobj);
   13601           0 :   __Pyx_XDECREF(__pyx_v_index);
   13602           0 :   __Pyx_XGIVEREF((PyObject *)__pyx_r);
   13603           0 :   __Pyx_RefNannyFinishContext();
   13604           0 :   return __pyx_r;
   13605             : }
   13606             : 
   13607             : /* "View.MemoryView":793
   13608             :  * 
   13609             :  * @cname('__pyx_memoryview_slice_memviewslice')
   13610             :  * cdef int slice_memviewslice(             # <<<<<<<<<<<<<<
   13611             :  *         __Pyx_memviewslice *dst,
   13612             :  *         Py_ssize_t shape, Py_ssize_t stride, Py_ssize_t suboffset,
   13613             :  */
   13614             : 
   13615           0 : static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst, Py_ssize_t __pyx_v_shape, Py_ssize_t __pyx_v_stride, Py_ssize_t __pyx_v_suboffset, int __pyx_v_dim, int __pyx_v_new_ndim, int *__pyx_v_suboffset_dim, Py_ssize_t __pyx_v_start, Py_ssize_t __pyx_v_stop, Py_ssize_t __pyx_v_step, int __pyx_v_have_start, int __pyx_v_have_stop, int __pyx_v_have_step, int __pyx_v_is_slice) {
   13616           0 :   Py_ssize_t __pyx_v_new_shape;
   13617           0 :   int __pyx_v_negative_step;
   13618           0 :   int __pyx_r;
   13619           0 :   int __pyx_t_1;
   13620           0 :   int __pyx_t_2;
   13621           0 :   int __pyx_t_3;
   13622           0 :   int __pyx_lineno = 0;
   13623           0 :   const char *__pyx_filename = NULL;
   13624           0 :   int __pyx_clineno = 0;
   13625             :   #ifdef WITH_THREAD
   13626           0 :   PyGILState_STATE __pyx_gilstate_save;
   13627             :   #endif
   13628             : 
   13629             :   /* "View.MemoryView":813
   13630             :  *     cdef bint negative_step
   13631             :  * 
   13632             :  *     if not is_slice:             # <<<<<<<<<<<<<<
   13633             :  * 
   13634             :  *         if start < 0:
   13635             :  */
   13636           0 :   __pyx_t_1 = (!__pyx_v_is_slice);
   13637           0 :   if (__pyx_t_1) {
   13638             : 
   13639             :     /* "View.MemoryView":815
   13640             :  *     if not is_slice:
   13641             :  * 
   13642             :  *         if start < 0:             # <<<<<<<<<<<<<<
   13643             :  *             start += shape
   13644             :  *         if not 0 <= start < shape:
   13645             :  */
   13646           0 :     __pyx_t_1 = (__pyx_v_start < 0);
   13647           0 :     if (__pyx_t_1) {
   13648             : 
   13649             :       /* "View.MemoryView":816
   13650             :  * 
   13651             :  *         if start < 0:
   13652             :  *             start += shape             # <<<<<<<<<<<<<<
   13653             :  *         if not 0 <= start < shape:
   13654             :  *             _err_dim(PyExc_IndexError, "Index out of bounds (axis %d)", dim)
   13655             :  */
   13656           0 :       __pyx_v_start = (__pyx_v_start + __pyx_v_shape);
   13657             : 
   13658             :       /* "View.MemoryView":815
   13659             :  *     if not is_slice:
   13660             :  * 
   13661             :  *         if start < 0:             # <<<<<<<<<<<<<<
   13662             :  *             start += shape
   13663             :  *         if not 0 <= start < shape:
   13664             :  */
   13665             :     }
   13666             : 
   13667             :     /* "View.MemoryView":817
   13668             :  *         if start < 0:
   13669             :  *             start += shape
   13670             :  *         if not 0 <= start < shape:             # <<<<<<<<<<<<<<
   13671             :  *             _err_dim(PyExc_IndexError, "Index out of bounds (axis %d)", dim)
   13672             :  *     else:
   13673             :  */
   13674           0 :     __pyx_t_1 = (0 <= __pyx_v_start);
   13675           0 :     if (__pyx_t_1) {
   13676           0 :       __pyx_t_1 = (__pyx_v_start < __pyx_v_shape);
   13677             :     }
   13678           0 :     __pyx_t_2 = (!__pyx_t_1);
   13679           0 :     if (__pyx_t_2) {
   13680             : 
   13681             :       /* "View.MemoryView":818
   13682             :  *             start += shape
   13683             :  *         if not 0 <= start < shape:
   13684             :  *             _err_dim(PyExc_IndexError, "Index out of bounds (axis %d)", dim)             # <<<<<<<<<<<<<<
   13685             :  *     else:
   13686             :  * 
   13687             :  */
   13688           0 :       __pyx_t_3 = __pyx_memoryview_err_dim(PyExc_IndexError, __pyx_kp_s_Index_out_of_bounds_axis_d, __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 818, __pyx_L1_error)
   13689             : 
   13690             :       /* "View.MemoryView":817
   13691             :  *         if start < 0:
   13692             :  *             start += shape
   13693             :  *         if not 0 <= start < shape:             # <<<<<<<<<<<<<<
   13694             :  *             _err_dim(PyExc_IndexError, "Index out of bounds (axis %d)", dim)
   13695             :  *     else:
   13696             :  */
   13697             :     }
   13698             : 
   13699             :     /* "View.MemoryView":813
   13700             :  *     cdef bint negative_step
   13701             :  * 
   13702             :  *     if not is_slice:             # <<<<<<<<<<<<<<
   13703             :  * 
   13704             :  *         if start < 0:
   13705             :  */
   13706           0 :     goto __pyx_L3;
   13707             :   }
   13708             : 
   13709             :   /* "View.MemoryView":821
   13710             :  *     else:
   13711             :  * 
   13712             :  *         if have_step:             # <<<<<<<<<<<<<<
   13713             :  *             negative_step = step < 0
   13714             :  *             if step == 0:
   13715             :  */
   13716             :   /*else*/ {
   13717           0 :     __pyx_t_2 = (__pyx_v_have_step != 0);
   13718           0 :     if (__pyx_t_2) {
   13719             : 
   13720             :       /* "View.MemoryView":822
   13721             :  * 
   13722             :  *         if have_step:
   13723             :  *             negative_step = step < 0             # <<<<<<<<<<<<<<
   13724             :  *             if step == 0:
   13725             :  *                 _err_dim(PyExc_ValueError, "Step may not be zero (axis %d)", dim)
   13726             :  */
   13727           0 :       __pyx_v_negative_step = (__pyx_v_step < 0);
   13728             : 
   13729             :       /* "View.MemoryView":823
   13730             :  *         if have_step:
   13731             :  *             negative_step = step < 0
   13732             :  *             if step == 0:             # <<<<<<<<<<<<<<
   13733             :  *                 _err_dim(PyExc_ValueError, "Step may not be zero (axis %d)", dim)
   13734             :  *         else:
   13735             :  */
   13736           0 :       __pyx_t_2 = (__pyx_v_step == 0);
   13737           0 :       if (__pyx_t_2) {
   13738             : 
   13739             :         /* "View.MemoryView":824
   13740             :  *             negative_step = step < 0
   13741             :  *             if step == 0:
   13742             :  *                 _err_dim(PyExc_ValueError, "Step may not be zero (axis %d)", dim)             # <<<<<<<<<<<<<<
   13743             :  *         else:
   13744             :  *             negative_step = False
   13745             :  */
   13746           0 :         __pyx_t_3 = __pyx_memoryview_err_dim(PyExc_ValueError, __pyx_kp_s_Step_may_not_be_zero_axis_d, __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 824, __pyx_L1_error)
   13747             : 
   13748             :         /* "View.MemoryView":823
   13749             :  *         if have_step:
   13750             :  *             negative_step = step < 0
   13751             :  *             if step == 0:             # <<<<<<<<<<<<<<
   13752             :  *                 _err_dim(PyExc_ValueError, "Step may not be zero (axis %d)", dim)
   13753             :  *         else:
   13754             :  */
   13755             :       }
   13756             : 
   13757             :       /* "View.MemoryView":821
   13758             :  *     else:
   13759             :  * 
   13760             :  *         if have_step:             # <<<<<<<<<<<<<<
   13761             :  *             negative_step = step < 0
   13762             :  *             if step == 0:
   13763             :  */
   13764           0 :       goto __pyx_L6;
   13765             :     }
   13766             : 
   13767             :     /* "View.MemoryView":826
   13768             :  *                 _err_dim(PyExc_ValueError, "Step may not be zero (axis %d)", dim)
   13769             :  *         else:
   13770             :  *             negative_step = False             # <<<<<<<<<<<<<<
   13771             :  *             step = 1
   13772             :  * 
   13773             :  */
   13774             :     /*else*/ {
   13775             :       __pyx_v_negative_step = 0;
   13776             : 
   13777             :       /* "View.MemoryView":827
   13778             :  *         else:
   13779             :  *             negative_step = False
   13780             :  *             step = 1             # <<<<<<<<<<<<<<
   13781             :  * 
   13782             :  * 
   13783             :  */
   13784             :       __pyx_v_step = 1;
   13785             :     }
   13786           0 :     __pyx_L6:;
   13787             : 
   13788             :     /* "View.MemoryView":830
   13789             :  * 
   13790             :  * 
   13791             :  *         if have_start:             # <<<<<<<<<<<<<<
   13792             :  *             if start < 0:
   13793             :  *                 start += shape
   13794             :  */
   13795           0 :     __pyx_t_2 = (__pyx_v_have_start != 0);
   13796           0 :     if (__pyx_t_2) {
   13797             : 
   13798             :       /* "View.MemoryView":831
   13799             :  * 
   13800             :  *         if have_start:
   13801             :  *             if start < 0:             # <<<<<<<<<<<<<<
   13802             :  *                 start += shape
   13803             :  *                 if start < 0:
   13804             :  */
   13805           0 :       __pyx_t_2 = (__pyx_v_start < 0);
   13806           0 :       if (__pyx_t_2) {
   13807             : 
   13808             :         /* "View.MemoryView":832
   13809             :  *         if have_start:
   13810             :  *             if start < 0:
   13811             :  *                 start += shape             # <<<<<<<<<<<<<<
   13812             :  *                 if start < 0:
   13813             :  *                     start = 0
   13814             :  */
   13815           0 :         __pyx_v_start = (__pyx_v_start + __pyx_v_shape);
   13816             : 
   13817             :         /* "View.MemoryView":833
   13818             :  *             if start < 0:
   13819             :  *                 start += shape
   13820             :  *                 if start < 0:             # <<<<<<<<<<<<<<
   13821             :  *                     start = 0
   13822             :  *             elif start >= shape:
   13823             :  */
   13824           0 :         __pyx_t_2 = (__pyx_v_start < 0);
   13825           0 :         if (__pyx_t_2) {
   13826             : 
   13827             :           /* "View.MemoryView":834
   13828             :  *                 start += shape
   13829             :  *                 if start < 0:
   13830             :  *                     start = 0             # <<<<<<<<<<<<<<
   13831             :  *             elif start >= shape:
   13832             :  *                 if negative_step:
   13833             :  */
   13834             :           __pyx_v_start = 0;
   13835             : 
   13836             :           /* "View.MemoryView":833
   13837             :  *             if start < 0:
   13838             :  *                 start += shape
   13839             :  *                 if start < 0:             # <<<<<<<<<<<<<<
   13840             :  *                     start = 0
   13841             :  *             elif start >= shape:
   13842             :  */
   13843             :         }
   13844             : 
   13845             :         /* "View.MemoryView":831
   13846             :  * 
   13847             :  *         if have_start:
   13848             :  *             if start < 0:             # <<<<<<<<<<<<<<
   13849             :  *                 start += shape
   13850             :  *                 if start < 0:
   13851             :  */
   13852           0 :         goto __pyx_L9;
   13853             :       }
   13854             : 
   13855             :       /* "View.MemoryView":835
   13856             :  *                 if start < 0:
   13857             :  *                     start = 0
   13858             :  *             elif start >= shape:             # <<<<<<<<<<<<<<
   13859             :  *                 if negative_step:
   13860             :  *                     start = shape - 1
   13861             :  */
   13862           0 :       __pyx_t_2 = (__pyx_v_start >= __pyx_v_shape);
   13863           0 :       if (__pyx_t_2) {
   13864             : 
   13865             :         /* "View.MemoryView":836
   13866             :  *                     start = 0
   13867             :  *             elif start >= shape:
   13868             :  *                 if negative_step:             # <<<<<<<<<<<<<<
   13869             :  *                     start = shape - 1
   13870             :  *                 else:
   13871             :  */
   13872           0 :         if (__pyx_v_negative_step) {
   13873             : 
   13874             :           /* "View.MemoryView":837
   13875             :  *             elif start >= shape:
   13876             :  *                 if negative_step:
   13877             :  *                     start = shape - 1             # <<<<<<<<<<<<<<
   13878             :  *                 else:
   13879             :  *                     start = shape
   13880             :  */
   13881           0 :           __pyx_v_start = (__pyx_v_shape - 1);
   13882             : 
   13883             :           /* "View.MemoryView":836
   13884             :  *                     start = 0
   13885             :  *             elif start >= shape:
   13886             :  *                 if negative_step:             # <<<<<<<<<<<<<<
   13887             :  *                     start = shape - 1
   13888             :  *                 else:
   13889             :  */
   13890           0 :           goto __pyx_L11;
   13891             :         }
   13892             : 
   13893             :         /* "View.MemoryView":839
   13894             :  *                     start = shape - 1
   13895             :  *                 else:
   13896             :  *                     start = shape             # <<<<<<<<<<<<<<
   13897             :  *         else:
   13898             :  *             if negative_step:
   13899             :  */
   13900             :         /*else*/ {
   13901             :           __pyx_v_start = __pyx_v_shape;
   13902             :         }
   13903           0 :         __pyx_L11:;
   13904             : 
   13905             :         /* "View.MemoryView":835
   13906             :  *                 if start < 0:
   13907             :  *                     start = 0
   13908             :  *             elif start >= shape:             # <<<<<<<<<<<<<<
   13909             :  *                 if negative_step:
   13910             :  *                     start = shape - 1
   13911             :  */
   13912             :       }
   13913           0 :       __pyx_L9:;
   13914             : 
   13915             :       /* "View.MemoryView":830
   13916             :  * 
   13917             :  * 
   13918             :  *         if have_start:             # <<<<<<<<<<<<<<
   13919             :  *             if start < 0:
   13920             :  *                 start += shape
   13921             :  */
   13922           0 :       goto __pyx_L8;
   13923             :     }
   13924             : 
   13925             :     /* "View.MemoryView":841
   13926             :  *                     start = shape
   13927             :  *         else:
   13928             :  *             if negative_step:             # <<<<<<<<<<<<<<
   13929             :  *                 start = shape - 1
   13930             :  *             else:
   13931             :  */
   13932             :     /*else*/ {
   13933           0 :       if (__pyx_v_negative_step) {
   13934             : 
   13935             :         /* "View.MemoryView":842
   13936             :  *         else:
   13937             :  *             if negative_step:
   13938             :  *                 start = shape - 1             # <<<<<<<<<<<<<<
   13939             :  *             else:
   13940             :  *                 start = 0
   13941             :  */
   13942           0 :         __pyx_v_start = (__pyx_v_shape - 1);
   13943             : 
   13944             :         /* "View.MemoryView":841
   13945             :  *                     start = shape
   13946             :  *         else:
   13947             :  *             if negative_step:             # <<<<<<<<<<<<<<
   13948             :  *                 start = shape - 1
   13949             :  *             else:
   13950             :  */
   13951           0 :         goto __pyx_L12;
   13952             :       }
   13953             : 
   13954             :       /* "View.MemoryView":844
   13955             :  *                 start = shape - 1
   13956             :  *             else:
   13957             :  *                 start = 0             # <<<<<<<<<<<<<<
   13958             :  * 
   13959             :  *         if have_stop:
   13960             :  */
   13961             :       /*else*/ {
   13962             :         __pyx_v_start = 0;
   13963             :       }
   13964           0 :       __pyx_L12:;
   13965             :     }
   13966           0 :     __pyx_L8:;
   13967             : 
   13968             :     /* "View.MemoryView":846
   13969             :  *                 start = 0
   13970             :  * 
   13971             :  *         if have_stop:             # <<<<<<<<<<<<<<
   13972             :  *             if stop < 0:
   13973             :  *                 stop += shape
   13974             :  */
   13975           0 :     __pyx_t_2 = (__pyx_v_have_stop != 0);
   13976           0 :     if (__pyx_t_2) {
   13977             : 
   13978             :       /* "View.MemoryView":847
   13979             :  * 
   13980             :  *         if have_stop:
   13981             :  *             if stop < 0:             # <<<<<<<<<<<<<<
   13982             :  *                 stop += shape
   13983             :  *                 if stop < 0:
   13984             :  */
   13985           0 :       __pyx_t_2 = (__pyx_v_stop < 0);
   13986           0 :       if (__pyx_t_2) {
   13987             : 
   13988             :         /* "View.MemoryView":848
   13989             :  *         if have_stop:
   13990             :  *             if stop < 0:
   13991             :  *                 stop += shape             # <<<<<<<<<<<<<<
   13992             :  *                 if stop < 0:
   13993             :  *                     stop = 0
   13994             :  */
   13995           0 :         __pyx_v_stop = (__pyx_v_stop + __pyx_v_shape);
   13996             : 
   13997             :         /* "View.MemoryView":849
   13998             :  *             if stop < 0:
   13999             :  *                 stop += shape
   14000             :  *                 if stop < 0:             # <<<<<<<<<<<<<<
   14001             :  *                     stop = 0
   14002             :  *             elif stop > shape:
   14003             :  */
   14004           0 :         __pyx_t_2 = (__pyx_v_stop < 0);
   14005           0 :         if (__pyx_t_2) {
   14006             : 
   14007             :           /* "View.MemoryView":850
   14008             :  *                 stop += shape
   14009             :  *                 if stop < 0:
   14010             :  *                     stop = 0             # <<<<<<<<<<<<<<
   14011             :  *             elif stop > shape:
   14012             :  *                 stop = shape
   14013             :  */
   14014             :           __pyx_v_stop = 0;
   14015             : 
   14016             :           /* "View.MemoryView":849
   14017             :  *             if stop < 0:
   14018             :  *                 stop += shape
   14019             :  *                 if stop < 0:             # <<<<<<<<<<<<<<
   14020             :  *                     stop = 0
   14021             :  *             elif stop > shape:
   14022             :  */
   14023             :         }
   14024             : 
   14025             :         /* "View.MemoryView":847
   14026             :  * 
   14027             :  *         if have_stop:
   14028             :  *             if stop < 0:             # <<<<<<<<<<<<<<
   14029             :  *                 stop += shape
   14030             :  *                 if stop < 0:
   14031             :  */
   14032           0 :         goto __pyx_L14;
   14033             :       }
   14034             : 
   14035             :       /* "View.MemoryView":851
   14036             :  *                 if stop < 0:
   14037             :  *                     stop = 0
   14038             :  *             elif stop > shape:             # <<<<<<<<<<<<<<
   14039             :  *                 stop = shape
   14040             :  *         else:
   14041             :  */
   14042           0 :       __pyx_t_2 = (__pyx_v_stop > __pyx_v_shape);
   14043           0 :       if (__pyx_t_2) {
   14044             : 
   14045             :         /* "View.MemoryView":852
   14046             :  *                     stop = 0
   14047             :  *             elif stop > shape:
   14048             :  *                 stop = shape             # <<<<<<<<<<<<<<
   14049             :  *         else:
   14050             :  *             if negative_step:
   14051             :  */
   14052             :         __pyx_v_stop = __pyx_v_shape;
   14053             : 
   14054             :         /* "View.MemoryView":851
   14055             :  *                 if stop < 0:
   14056             :  *                     stop = 0
   14057             :  *             elif stop > shape:             # <<<<<<<<<<<<<<
   14058             :  *                 stop = shape
   14059             :  *         else:
   14060             :  */
   14061             :       }
   14062           0 :       __pyx_L14:;
   14063             : 
   14064             :       /* "View.MemoryView":846
   14065             :  *                 start = 0
   14066             :  * 
   14067             :  *         if have_stop:             # <<<<<<<<<<<<<<
   14068             :  *             if stop < 0:
   14069             :  *                 stop += shape
   14070             :  */
   14071           0 :       goto __pyx_L13;
   14072             :     }
   14073             : 
   14074             :     /* "View.MemoryView":854
   14075             :  *                 stop = shape
   14076             :  *         else:
   14077             :  *             if negative_step:             # <<<<<<<<<<<<<<
   14078             :  *                 stop = -1
   14079             :  *             else:
   14080             :  */
   14081             :     /*else*/ {
   14082           0 :       if (__pyx_v_negative_step) {
   14083             : 
   14084             :         /* "View.MemoryView":855
   14085             :  *         else:
   14086             :  *             if negative_step:
   14087             :  *                 stop = -1             # <<<<<<<<<<<<<<
   14088             :  *             else:
   14089             :  *                 stop = shape
   14090             :  */
   14091           0 :         __pyx_v_stop = -1L;
   14092             : 
   14093             :         /* "View.MemoryView":854
   14094             :  *                 stop = shape
   14095             :  *         else:
   14096             :  *             if negative_step:             # <<<<<<<<<<<<<<
   14097             :  *                 stop = -1
   14098             :  *             else:
   14099             :  */
   14100           0 :         goto __pyx_L16;
   14101             :       }
   14102             : 
   14103             :       /* "View.MemoryView":857
   14104             :  *                 stop = -1
   14105             :  *             else:
   14106             :  *                 stop = shape             # <<<<<<<<<<<<<<
   14107             :  * 
   14108             :  * 
   14109             :  */
   14110             :       /*else*/ {
   14111             :         __pyx_v_stop = __pyx_v_shape;
   14112             :       }
   14113           0 :       __pyx_L16:;
   14114             :     }
   14115           0 :     __pyx_L13:;
   14116             : 
   14117             :     /* "View.MemoryView":861
   14118             :  * 
   14119             :  *         with cython.cdivision(True):
   14120             :  *             new_shape = (stop - start) // step             # <<<<<<<<<<<<<<
   14121             :  * 
   14122             :  *             if (stop - start) - step * new_shape:
   14123             :  */
   14124           0 :     __pyx_v_new_shape = ((__pyx_v_stop - __pyx_v_start) / __pyx_v_step);
   14125             : 
   14126             :     /* "View.MemoryView":863
   14127             :  *             new_shape = (stop - start) // step
   14128             :  * 
   14129             :  *             if (stop - start) - step * new_shape:             # <<<<<<<<<<<<<<
   14130             :  *                 new_shape += 1
   14131             :  * 
   14132             :  */
   14133           0 :     __pyx_t_2 = (((__pyx_v_stop - __pyx_v_start) - (__pyx_v_step * __pyx_v_new_shape)) != 0);
   14134           0 :     if (__pyx_t_2) {
   14135             : 
   14136             :       /* "View.MemoryView":864
   14137             :  * 
   14138             :  *             if (stop - start) - step * new_shape:
   14139             :  *                 new_shape += 1             # <<<<<<<<<<<<<<
   14140             :  * 
   14141             :  *         if new_shape < 0:
   14142             :  */
   14143           0 :       __pyx_v_new_shape = (__pyx_v_new_shape + 1);
   14144             : 
   14145             :       /* "View.MemoryView":863
   14146             :  *             new_shape = (stop - start) // step
   14147             :  * 
   14148             :  *             if (stop - start) - step * new_shape:             # <<<<<<<<<<<<<<
   14149             :  *                 new_shape += 1
   14150             :  * 
   14151             :  */
   14152             :     }
   14153             : 
   14154             :     /* "View.MemoryView":866
   14155             :  *                 new_shape += 1
   14156             :  * 
   14157             :  *         if new_shape < 0:             # <<<<<<<<<<<<<<
   14158             :  *             new_shape = 0
   14159             :  * 
   14160             :  */
   14161           0 :     __pyx_t_2 = (__pyx_v_new_shape < 0);
   14162           0 :     if (__pyx_t_2) {
   14163             : 
   14164             :       /* "View.MemoryView":867
   14165             :  * 
   14166             :  *         if new_shape < 0:
   14167             :  *             new_shape = 0             # <<<<<<<<<<<<<<
   14168             :  * 
   14169             :  * 
   14170             :  */
   14171             :       __pyx_v_new_shape = 0;
   14172             : 
   14173             :       /* "View.MemoryView":866
   14174             :  *                 new_shape += 1
   14175             :  * 
   14176             :  *         if new_shape < 0:             # <<<<<<<<<<<<<<
   14177             :  *             new_shape = 0
   14178             :  * 
   14179             :  */
   14180             :     }
   14181             : 
   14182             :     /* "View.MemoryView":870
   14183             :  * 
   14184             :  * 
   14185             :  *         dst.strides[new_ndim] = stride * step             # <<<<<<<<<<<<<<
   14186             :  *         dst.shape[new_ndim] = new_shape
   14187             :  *         dst.suboffsets[new_ndim] = suboffset
   14188             :  */
   14189           0 :     (__pyx_v_dst->strides[__pyx_v_new_ndim]) = (__pyx_v_stride * __pyx_v_step);
   14190             : 
   14191             :     /* "View.MemoryView":871
   14192             :  * 
   14193             :  *         dst.strides[new_ndim] = stride * step
   14194             :  *         dst.shape[new_ndim] = new_shape             # <<<<<<<<<<<<<<
   14195             :  *         dst.suboffsets[new_ndim] = suboffset
   14196             :  * 
   14197             :  */
   14198           0 :     (__pyx_v_dst->shape[__pyx_v_new_ndim]) = __pyx_v_new_shape;
   14199             : 
   14200             :     /* "View.MemoryView":872
   14201             :  *         dst.strides[new_ndim] = stride * step
   14202             :  *         dst.shape[new_ndim] = new_shape
   14203             :  *         dst.suboffsets[new_ndim] = suboffset             # <<<<<<<<<<<<<<
   14204             :  * 
   14205             :  * 
   14206             :  */
   14207           0 :     (__pyx_v_dst->suboffsets[__pyx_v_new_ndim]) = __pyx_v_suboffset;
   14208             :   }
   14209           0 :   __pyx_L3:;
   14210             : 
   14211             :   /* "View.MemoryView":875
   14212             :  * 
   14213             :  * 
   14214             :  *     if suboffset_dim[0] < 0:             # <<<<<<<<<<<<<<
   14215             :  *         dst.data += start * stride
   14216             :  *     else:
   14217             :  */
   14218           0 :   __pyx_t_2 = ((__pyx_v_suboffset_dim[0]) < 0);
   14219           0 :   if (__pyx_t_2) {
   14220             : 
   14221             :     /* "View.MemoryView":876
   14222             :  * 
   14223             :  *     if suboffset_dim[0] < 0:
   14224             :  *         dst.data += start * stride             # <<<<<<<<<<<<<<
   14225             :  *     else:
   14226             :  *         dst.suboffsets[suboffset_dim[0]] += start * stride
   14227             :  */
   14228           0 :     __pyx_v_dst->data = (__pyx_v_dst->data + (__pyx_v_start * __pyx_v_stride));
   14229             : 
   14230             :     /* "View.MemoryView":875
   14231             :  * 
   14232             :  * 
   14233             :  *     if suboffset_dim[0] < 0:             # <<<<<<<<<<<<<<
   14234             :  *         dst.data += start * stride
   14235             :  *     else:
   14236             :  */
   14237           0 :     goto __pyx_L19;
   14238             :   }
   14239             : 
   14240             :   /* "View.MemoryView":878
   14241             :  *         dst.data += start * stride
   14242             :  *     else:
   14243             :  *         dst.suboffsets[suboffset_dim[0]] += start * stride             # <<<<<<<<<<<<<<
   14244             :  * 
   14245             :  *     if suboffset >= 0:
   14246             :  */
   14247             :   /*else*/ {
   14248           0 :     __pyx_t_3 = (__pyx_v_suboffset_dim[0]);
   14249           0 :     (__pyx_v_dst->suboffsets[__pyx_t_3]) = ((__pyx_v_dst->suboffsets[__pyx_t_3]) + (__pyx_v_start * __pyx_v_stride));
   14250             :   }
   14251           0 :   __pyx_L19:;
   14252             : 
   14253             :   /* "View.MemoryView":880
   14254             :  *         dst.suboffsets[suboffset_dim[0]] += start * stride
   14255             :  * 
   14256             :  *     if suboffset >= 0:             # <<<<<<<<<<<<<<
   14257             :  *         if not is_slice:
   14258             :  *             if new_ndim == 0:
   14259             :  */
   14260           0 :   __pyx_t_2 = (__pyx_v_suboffset >= 0);
   14261           0 :   if (__pyx_t_2) {
   14262             : 
   14263             :     /* "View.MemoryView":881
   14264             :  * 
   14265             :  *     if suboffset >= 0:
   14266             :  *         if not is_slice:             # <<<<<<<<<<<<<<
   14267             :  *             if new_ndim == 0:
   14268             :  *                 dst.data = (<char **> dst.data)[0] + suboffset
   14269             :  */
   14270           0 :     __pyx_t_2 = (!__pyx_v_is_slice);
   14271           0 :     if (__pyx_t_2) {
   14272             : 
   14273             :       /* "View.MemoryView":882
   14274             :  *     if suboffset >= 0:
   14275             :  *         if not is_slice:
   14276             :  *             if new_ndim == 0:             # <<<<<<<<<<<<<<
   14277             :  *                 dst.data = (<char **> dst.data)[0] + suboffset
   14278             :  *             else:
   14279             :  */
   14280           0 :       __pyx_t_2 = (__pyx_v_new_ndim == 0);
   14281           0 :       if (__pyx_t_2) {
   14282             : 
   14283             :         /* "View.MemoryView":883
   14284             :  *         if not is_slice:
   14285             :  *             if new_ndim == 0:
   14286             :  *                 dst.data = (<char **> dst.data)[0] + suboffset             # <<<<<<<<<<<<<<
   14287             :  *             else:
   14288             :  *                 _err_dim(PyExc_IndexError, "All dimensions preceding dimension %d "
   14289             :  */
   14290           0 :         __pyx_v_dst->data = ((((char **)__pyx_v_dst->data)[0]) + __pyx_v_suboffset);
   14291             : 
   14292             :         /* "View.MemoryView":882
   14293             :  *     if suboffset >= 0:
   14294             :  *         if not is_slice:
   14295             :  *             if new_ndim == 0:             # <<<<<<<<<<<<<<
   14296             :  *                 dst.data = (<char **> dst.data)[0] + suboffset
   14297             :  *             else:
   14298             :  */
   14299           0 :         goto __pyx_L22;
   14300             :       }
   14301             : 
   14302             :       /* "View.MemoryView":885
   14303             :  *                 dst.data = (<char **> dst.data)[0] + suboffset
   14304             :  *             else:
   14305             :  *                 _err_dim(PyExc_IndexError, "All dimensions preceding dimension %d "             # <<<<<<<<<<<<<<
   14306             :  *                                      "must be indexed and not sliced", dim)
   14307             :  *         else:
   14308             :  */
   14309             :       /*else*/ {
   14310             : 
   14311             :         /* "View.MemoryView":886
   14312             :  *             else:
   14313             :  *                 _err_dim(PyExc_IndexError, "All dimensions preceding dimension %d "
   14314             :  *                                      "must be indexed and not sliced", dim)             # <<<<<<<<<<<<<<
   14315             :  *         else:
   14316             :  *             suboffset_dim[0] = new_ndim
   14317             :  */
   14318           0 :         __pyx_t_3 = __pyx_memoryview_err_dim(PyExc_IndexError, __pyx_kp_s_All_dimensions_preceding_dimensi, __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 885, __pyx_L1_error)
   14319             :       }
   14320           0 :       __pyx_L22:;
   14321             : 
   14322             :       /* "View.MemoryView":881
   14323             :  * 
   14324             :  *     if suboffset >= 0:
   14325             :  *         if not is_slice:             # <<<<<<<<<<<<<<
   14326             :  *             if new_ndim == 0:
   14327             :  *                 dst.data = (<char **> dst.data)[0] + suboffset
   14328             :  */
   14329           0 :       goto __pyx_L21;
   14330             :     }
   14331             : 
   14332             :     /* "View.MemoryView":888
   14333             :  *                                      "must be indexed and not sliced", dim)
   14334             :  *         else:
   14335             :  *             suboffset_dim[0] = new_ndim             # <<<<<<<<<<<<<<
   14336             :  * 
   14337             :  *     return 0
   14338             :  */
   14339             :     /*else*/ {
   14340           0 :       (__pyx_v_suboffset_dim[0]) = __pyx_v_new_ndim;
   14341             :     }
   14342           0 :     __pyx_L21:;
   14343             : 
   14344             :     /* "View.MemoryView":880
   14345             :  *         dst.suboffsets[suboffset_dim[0]] += start * stride
   14346             :  * 
   14347             :  *     if suboffset >= 0:             # <<<<<<<<<<<<<<
   14348             :  *         if not is_slice:
   14349             :  *             if new_ndim == 0:
   14350             :  */
   14351             :   }
   14352             : 
   14353             :   /* "View.MemoryView":890
   14354             :  *             suboffset_dim[0] = new_ndim
   14355             :  * 
   14356             :  *     return 0             # <<<<<<<<<<<<<<
   14357             :  * 
   14358             :  * 
   14359             :  */
   14360           0 :   __pyx_r = 0;
   14361           0 :   goto __pyx_L0;
   14362             : 
   14363             :   /* "View.MemoryView":793
   14364             :  * 
   14365             :  * @cname('__pyx_memoryview_slice_memviewslice')
   14366             :  * cdef int slice_memviewslice(             # <<<<<<<<<<<<<<
   14367             :  *         __Pyx_memviewslice *dst,
   14368             :  *         Py_ssize_t shape, Py_ssize_t stride, Py_ssize_t suboffset,
   14369             :  */
   14370             : 
   14371             :   /* function exit code */
   14372           0 :   __pyx_L1_error:;
   14373             :   #ifdef WITH_THREAD
   14374           0 :   __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
   14375             :   #endif
   14376           0 :   __Pyx_AddTraceback("View.MemoryView.slice_memviewslice", __pyx_clineno, __pyx_lineno, __pyx_filename);
   14377           0 :   __pyx_r = -1;
   14378             :   #ifdef WITH_THREAD
   14379           0 :   __Pyx_PyGILState_Release(__pyx_gilstate_save);
   14380             :   #endif
   14381           0 :   __pyx_L0:;
   14382           0 :   return __pyx_r;
   14383             : }
   14384             : 
   14385             : /* "View.MemoryView":896
   14386             :  * 
   14387             :  * @cname('__pyx_pybuffer_index')
   14388             :  * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index,             # <<<<<<<<<<<<<<
   14389             :  *                           Py_ssize_t dim) except NULL:
   14390             :  *     cdef Py_ssize_t shape, stride, suboffset = -1
   14391             :  */
   14392             : 
   14393           0 : static char *__pyx_pybuffer_index(Py_buffer *__pyx_v_view, char *__pyx_v_bufp, Py_ssize_t __pyx_v_index, Py_ssize_t __pyx_v_dim) {
   14394           0 :   Py_ssize_t __pyx_v_shape;
   14395           0 :   Py_ssize_t __pyx_v_stride;
   14396           0 :   Py_ssize_t __pyx_v_suboffset;
   14397           0 :   Py_ssize_t __pyx_v_itemsize;
   14398           0 :   char *__pyx_v_resultp;
   14399           0 :   char *__pyx_r;
   14400             :   __Pyx_RefNannyDeclarations
   14401           0 :   Py_ssize_t __pyx_t_1;
   14402           0 :   int __pyx_t_2;
   14403           0 :   PyObject *__pyx_t_3 = NULL;
   14404           0 :   Py_UCS4 __pyx_t_4;
   14405           0 :   PyObject *__pyx_t_5 = NULL;
   14406           0 :   int __pyx_lineno = 0;
   14407           0 :   const char *__pyx_filename = NULL;
   14408           0 :   int __pyx_clineno = 0;
   14409           0 :   __Pyx_RefNannySetupContext("pybuffer_index", 1);
   14410             : 
   14411             :   /* "View.MemoryView":898
   14412             :  * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index,
   14413             :  *                           Py_ssize_t dim) except NULL:
   14414             :  *     cdef Py_ssize_t shape, stride, suboffset = -1             # <<<<<<<<<<<<<<
   14415             :  *     cdef Py_ssize_t itemsize = view.itemsize
   14416             :  *     cdef char *resultp
   14417             :  */
   14418           0 :   __pyx_v_suboffset = -1L;
   14419             : 
   14420             :   /* "View.MemoryView":899
   14421             :  *                           Py_ssize_t dim) except NULL:
   14422             :  *     cdef Py_ssize_t shape, stride, suboffset = -1
   14423             :  *     cdef Py_ssize_t itemsize = view.itemsize             # <<<<<<<<<<<<<<
   14424             :  *     cdef char *resultp
   14425             :  * 
   14426             :  */
   14427           0 :   __pyx_t_1 = __pyx_v_view->itemsize;
   14428           0 :   __pyx_v_itemsize = __pyx_t_1;
   14429             : 
   14430             :   /* "View.MemoryView":902
   14431             :  *     cdef char *resultp
   14432             :  * 
   14433             :  *     if view.ndim == 0:             # <<<<<<<<<<<<<<
   14434             :  *         shape = view.len // itemsize
   14435             :  *         stride = itemsize
   14436             :  */
   14437           0 :   __pyx_t_2 = (__pyx_v_view->ndim == 0);
   14438           0 :   if (__pyx_t_2) {
   14439             : 
   14440             :     /* "View.MemoryView":903
   14441             :  * 
   14442             :  *     if view.ndim == 0:
   14443             :  *         shape = view.len // itemsize             # <<<<<<<<<<<<<<
   14444             :  *         stride = itemsize
   14445             :  *     else:
   14446             :  */
   14447           0 :     if (unlikely(__pyx_v_itemsize == 0)) {
   14448           0 :       PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
   14449           0 :       __PYX_ERR(1, 903, __pyx_L1_error)
   14450             :     }
   14451           0 :     else if (sizeof(Py_ssize_t) == sizeof(long) && (!(((Py_ssize_t)-1) > 0)) && unlikely(__pyx_v_itemsize == (Py_ssize_t)-1)  && unlikely(__Pyx_UNARY_NEG_WOULD_OVERFLOW(__pyx_v_view->len))) {
   14452           0 :       PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
   14453           0 :       __PYX_ERR(1, 903, __pyx_L1_error)
   14454             :     }
   14455           0 :     __pyx_v_shape = __Pyx_div_Py_ssize_t(__pyx_v_view->len, __pyx_v_itemsize);
   14456             : 
   14457             :     /* "View.MemoryView":904
   14458             :  *     if view.ndim == 0:
   14459             :  *         shape = view.len // itemsize
   14460             :  *         stride = itemsize             # <<<<<<<<<<<<<<
   14461             :  *     else:
   14462             :  *         shape = view.shape[dim]
   14463             :  */
   14464           0 :     __pyx_v_stride = __pyx_v_itemsize;
   14465             : 
   14466             :     /* "View.MemoryView":902
   14467             :  *     cdef char *resultp
   14468             :  * 
   14469             :  *     if view.ndim == 0:             # <<<<<<<<<<<<<<
   14470             :  *         shape = view.len // itemsize
   14471             :  *         stride = itemsize
   14472             :  */
   14473           0 :     goto __pyx_L3;
   14474             :   }
   14475             : 
   14476             :   /* "View.MemoryView":906
   14477             :  *         stride = itemsize
   14478             :  *     else:
   14479             :  *         shape = view.shape[dim]             # <<<<<<<<<<<<<<
   14480             :  *         stride = view.strides[dim]
   14481             :  *         if view.suboffsets != NULL:
   14482             :  */
   14483             :   /*else*/ {
   14484           0 :     __pyx_v_shape = (__pyx_v_view->shape[__pyx_v_dim]);
   14485             : 
   14486             :     /* "View.MemoryView":907
   14487             :  *     else:
   14488             :  *         shape = view.shape[dim]
   14489             :  *         stride = view.strides[dim]             # <<<<<<<<<<<<<<
   14490             :  *         if view.suboffsets != NULL:
   14491             :  *             suboffset = view.suboffsets[dim]
   14492             :  */
   14493           0 :     __pyx_v_stride = (__pyx_v_view->strides[__pyx_v_dim]);
   14494             : 
   14495             :     /* "View.MemoryView":908
   14496             :  *         shape = view.shape[dim]
   14497             :  *         stride = view.strides[dim]
   14498             :  *         if view.suboffsets != NULL:             # <<<<<<<<<<<<<<
   14499             :  *             suboffset = view.suboffsets[dim]
   14500             :  * 
   14501             :  */
   14502           0 :     __pyx_t_2 = (__pyx_v_view->suboffsets != NULL);
   14503           0 :     if (__pyx_t_2) {
   14504             : 
   14505             :       /* "View.MemoryView":909
   14506             :  *         stride = view.strides[dim]
   14507             :  *         if view.suboffsets != NULL:
   14508             :  *             suboffset = view.suboffsets[dim]             # <<<<<<<<<<<<<<
   14509             :  * 
   14510             :  *     if index < 0:
   14511             :  */
   14512           0 :       __pyx_v_suboffset = (__pyx_v_view->suboffsets[__pyx_v_dim]);
   14513             : 
   14514             :       /* "View.MemoryView":908
   14515             :  *         shape = view.shape[dim]
   14516             :  *         stride = view.strides[dim]
   14517             :  *         if view.suboffsets != NULL:             # <<<<<<<<<<<<<<
   14518             :  *             suboffset = view.suboffsets[dim]
   14519             :  * 
   14520             :  */
   14521             :     }
   14522             :   }
   14523           0 :   __pyx_L3:;
   14524             : 
   14525             :   /* "View.MemoryView":911
   14526             :  *             suboffset = view.suboffsets[dim]
   14527             :  * 
   14528             :  *     if index < 0:             # <<<<<<<<<<<<<<
   14529             :  *         index += view.shape[dim]
   14530             :  *         if index < 0:
   14531             :  */
   14532           0 :   __pyx_t_2 = (__pyx_v_index < 0);
   14533           0 :   if (__pyx_t_2) {
   14534             : 
   14535             :     /* "View.MemoryView":912
   14536             :  * 
   14537             :  *     if index < 0:
   14538             :  *         index += view.shape[dim]             # <<<<<<<<<<<<<<
   14539             :  *         if index < 0:
   14540             :  *             raise IndexError, f"Out of bounds on buffer access (axis {dim})"
   14541             :  */
   14542           0 :     __pyx_v_index = (__pyx_v_index + (__pyx_v_view->shape[__pyx_v_dim]));
   14543             : 
   14544             :     /* "View.MemoryView":913
   14545             :  *     if index < 0:
   14546             :  *         index += view.shape[dim]
   14547             :  *         if index < 0:             # <<<<<<<<<<<<<<
   14548             :  *             raise IndexError, f"Out of bounds on buffer access (axis {dim})"
   14549             :  * 
   14550             :  */
   14551           0 :     __pyx_t_2 = (__pyx_v_index < 0);
   14552           0 :     if (unlikely(__pyx_t_2)) {
   14553             : 
   14554             :       /* "View.MemoryView":914
   14555             :  *         index += view.shape[dim]
   14556             :  *         if index < 0:
   14557             :  *             raise IndexError, f"Out of bounds on buffer access (axis {dim})"             # <<<<<<<<<<<<<<
   14558             :  * 
   14559             :  *     if index >= shape:
   14560             :  */
   14561           0 :       __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 914, __pyx_L1_error)
   14562           0 :       __Pyx_GOTREF(__pyx_t_3);
   14563           0 :       __pyx_t_1 = 0;
   14564           0 :       __pyx_t_4 = 127;
   14565           0 :       __Pyx_INCREF(__pyx_kp_u_Out_of_bounds_on_buffer_access_a);
   14566           0 :       __pyx_t_1 += 37;
   14567           0 :       __Pyx_GIVEREF(__pyx_kp_u_Out_of_bounds_on_buffer_access_a);
   14568           0 :       PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_Out_of_bounds_on_buffer_access_a);
   14569           0 :       __pyx_t_5 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_dim, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 914, __pyx_L1_error)
   14570           0 :       __Pyx_GOTREF(__pyx_t_5);
   14571           0 :       __pyx_t_1 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
   14572           0 :       __Pyx_GIVEREF(__pyx_t_5);
   14573           0 :       PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5);
   14574           0 :       __pyx_t_5 = 0;
   14575           0 :       __Pyx_INCREF(__pyx_kp_u__7);
   14576           0 :       __pyx_t_1 += 1;
   14577           0 :       __Pyx_GIVEREF(__pyx_kp_u__7);
   14578           0 :       PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u__7);
   14579           0 :       __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_3, 3, __pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 914, __pyx_L1_error)
   14580           0 :       __Pyx_GOTREF(__pyx_t_5);
   14581           0 :       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   14582           0 :       __Pyx_Raise(__pyx_builtin_IndexError, __pyx_t_5, 0, 0);
   14583           0 :       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   14584           0 :       __PYX_ERR(1, 914, __pyx_L1_error)
   14585             : 
   14586             :       /* "View.MemoryView":913
   14587             :  *     if index < 0:
   14588             :  *         index += view.shape[dim]
   14589             :  *         if index < 0:             # <<<<<<<<<<<<<<
   14590             :  *             raise IndexError, f"Out of bounds on buffer access (axis {dim})"
   14591             :  * 
   14592             :  */
   14593             :     }
   14594             : 
   14595             :     /* "View.MemoryView":911
   14596             :  *             suboffset = view.suboffsets[dim]
   14597             :  * 
   14598             :  *     if index < 0:             # <<<<<<<<<<<<<<
   14599             :  *         index += view.shape[dim]
   14600             :  *         if index < 0:
   14601             :  */
   14602             :   }
   14603             : 
   14604             :   /* "View.MemoryView":916
   14605             :  *             raise IndexError, f"Out of bounds on buffer access (axis {dim})"
   14606             :  * 
   14607             :  *     if index >= shape:             # <<<<<<<<<<<<<<
   14608             :  *         raise IndexError, f"Out of bounds on buffer access (axis {dim})"
   14609             :  * 
   14610             :  */
   14611           0 :   __pyx_t_2 = (__pyx_v_index >= __pyx_v_shape);
   14612           0 :   if (unlikely(__pyx_t_2)) {
   14613             : 
   14614             :     /* "View.MemoryView":917
   14615             :  * 
   14616             :  *     if index >= shape:
   14617             :  *         raise IndexError, f"Out of bounds on buffer access (axis {dim})"             # <<<<<<<<<<<<<<
   14618             :  * 
   14619             :  *     resultp = bufp + index * stride
   14620             :  */
   14621           0 :     __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 917, __pyx_L1_error)
   14622           0 :     __Pyx_GOTREF(__pyx_t_5);
   14623           0 :     __pyx_t_1 = 0;
   14624           0 :     __pyx_t_4 = 127;
   14625           0 :     __Pyx_INCREF(__pyx_kp_u_Out_of_bounds_on_buffer_access_a);
   14626           0 :     __pyx_t_1 += 37;
   14627           0 :     __Pyx_GIVEREF(__pyx_kp_u_Out_of_bounds_on_buffer_access_a);
   14628           0 :     PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_Out_of_bounds_on_buffer_access_a);
   14629           0 :     __pyx_t_3 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_dim, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 917, __pyx_L1_error)
   14630           0 :     __Pyx_GOTREF(__pyx_t_3);
   14631           0 :     __pyx_t_1 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
   14632           0 :     __Pyx_GIVEREF(__pyx_t_3);
   14633           0 :     PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3);
   14634           0 :     __pyx_t_3 = 0;
   14635           0 :     __Pyx_INCREF(__pyx_kp_u__7);
   14636           0 :     __pyx_t_1 += 1;
   14637           0 :     __Pyx_GIVEREF(__pyx_kp_u__7);
   14638           0 :     PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u__7);
   14639           0 :     __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_5, 3, __pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 917, __pyx_L1_error)
   14640           0 :     __Pyx_GOTREF(__pyx_t_3);
   14641           0 :     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   14642           0 :     __Pyx_Raise(__pyx_builtin_IndexError, __pyx_t_3, 0, 0);
   14643           0 :     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   14644           0 :     __PYX_ERR(1, 917, __pyx_L1_error)
   14645             : 
   14646             :     /* "View.MemoryView":916
   14647             :  *             raise IndexError, f"Out of bounds on buffer access (axis {dim})"
   14648             :  * 
   14649             :  *     if index >= shape:             # <<<<<<<<<<<<<<
   14650             :  *         raise IndexError, f"Out of bounds on buffer access (axis {dim})"
   14651             :  * 
   14652             :  */
   14653             :   }
   14654             : 
   14655             :   /* "View.MemoryView":919
   14656             :  *         raise IndexError, f"Out of bounds on buffer access (axis {dim})"
   14657             :  * 
   14658             :  *     resultp = bufp + index * stride             # <<<<<<<<<<<<<<
   14659             :  *     if suboffset >= 0:
   14660             :  *         resultp = (<char **> resultp)[0] + suboffset
   14661             :  */
   14662           0 :   __pyx_v_resultp = (__pyx_v_bufp + (__pyx_v_index * __pyx_v_stride));
   14663             : 
   14664             :   /* "View.MemoryView":920
   14665             :  * 
   14666             :  *     resultp = bufp + index * stride
   14667             :  *     if suboffset >= 0:             # <<<<<<<<<<<<<<
   14668             :  *         resultp = (<char **> resultp)[0] + suboffset
   14669             :  * 
   14670             :  */
   14671           0 :   __pyx_t_2 = (__pyx_v_suboffset >= 0);
   14672           0 :   if (__pyx_t_2) {
   14673             : 
   14674             :     /* "View.MemoryView":921
   14675             :  *     resultp = bufp + index * stride
   14676             :  *     if suboffset >= 0:
   14677             :  *         resultp = (<char **> resultp)[0] + suboffset             # <<<<<<<<<<<<<<
   14678             :  * 
   14679             :  *     return resultp
   14680             :  */
   14681           0 :     __pyx_v_resultp = ((((char **)__pyx_v_resultp)[0]) + __pyx_v_suboffset);
   14682             : 
   14683             :     /* "View.MemoryView":920
   14684             :  * 
   14685             :  *     resultp = bufp + index * stride
   14686             :  *     if suboffset >= 0:             # <<<<<<<<<<<<<<
   14687             :  *         resultp = (<char **> resultp)[0] + suboffset
   14688             :  * 
   14689             :  */
   14690             :   }
   14691             : 
   14692             :   /* "View.MemoryView":923
   14693             :  *         resultp = (<char **> resultp)[0] + suboffset
   14694             :  * 
   14695             :  *     return resultp             # <<<<<<<<<<<<<<
   14696             :  * 
   14697             :  * 
   14698             :  */
   14699           0 :   __pyx_r = __pyx_v_resultp;
   14700           0 :   goto __pyx_L0;
   14701             : 
   14702             :   /* "View.MemoryView":896
   14703             :  * 
   14704             :  * @cname('__pyx_pybuffer_index')
   14705             :  * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index,             # <<<<<<<<<<<<<<
   14706             :  *                           Py_ssize_t dim) except NULL:
   14707             :  *     cdef Py_ssize_t shape, stride, suboffset = -1
   14708             :  */
   14709             : 
   14710             :   /* function exit code */
   14711           0 :   __pyx_L1_error:;
   14712           0 :   __Pyx_XDECREF(__pyx_t_3);
   14713           0 :   __Pyx_XDECREF(__pyx_t_5);
   14714           0 :   __Pyx_AddTraceback("View.MemoryView.pybuffer_index", __pyx_clineno, __pyx_lineno, __pyx_filename);
   14715           0 :   __pyx_r = NULL;
   14716           0 :   __pyx_L0:;
   14717           0 :   __Pyx_RefNannyFinishContext();
   14718           0 :   return __pyx_r;
   14719             : }
   14720             : 
   14721             : /* "View.MemoryView":929
   14722             :  * 
   14723             :  * @cname('__pyx_memslice_transpose')
   14724             :  * cdef int transpose_memslice(__Pyx_memviewslice *memslice) except -1 nogil:             # <<<<<<<<<<<<<<
   14725             :  *     cdef int ndim = memslice.memview.view.ndim
   14726             :  * 
   14727             :  */
   14728             : 
   14729           0 : static int __pyx_memslice_transpose(__Pyx_memviewslice *__pyx_v_memslice) {
   14730           0 :   int __pyx_v_ndim;
   14731           0 :   Py_ssize_t *__pyx_v_shape;
   14732           0 :   Py_ssize_t *__pyx_v_strides;
   14733           0 :   int __pyx_v_i;
   14734           0 :   int __pyx_v_j;
   14735           0 :   int __pyx_r;
   14736           0 :   int __pyx_t_1;
   14737           0 :   Py_ssize_t *__pyx_t_2;
   14738           0 :   long __pyx_t_3;
   14739           0 :   long __pyx_t_4;
   14740           0 :   Py_ssize_t __pyx_t_5;
   14741           0 :   Py_ssize_t __pyx_t_6;
   14742           0 :   int __pyx_t_7;
   14743           0 :   int __pyx_t_8;
   14744           0 :   int __pyx_t_9;
   14745           0 :   int __pyx_lineno = 0;
   14746           0 :   const char *__pyx_filename = NULL;
   14747           0 :   int __pyx_clineno = 0;
   14748             :   #ifdef WITH_THREAD
   14749           0 :   PyGILState_STATE __pyx_gilstate_save;
   14750             :   #endif
   14751             : 
   14752             :   /* "View.MemoryView":930
   14753             :  * @cname('__pyx_memslice_transpose')
   14754             :  * cdef int transpose_memslice(__Pyx_memviewslice *memslice) except -1 nogil:
   14755             :  *     cdef int ndim = memslice.memview.view.ndim             # <<<<<<<<<<<<<<
   14756             :  * 
   14757             :  *     cdef Py_ssize_t *shape = memslice.shape
   14758             :  */
   14759           0 :   __pyx_t_1 = __pyx_v_memslice->memview->view.ndim;
   14760           0 :   __pyx_v_ndim = __pyx_t_1;
   14761             : 
   14762             :   /* "View.MemoryView":932
   14763             :  *     cdef int ndim = memslice.memview.view.ndim
   14764             :  * 
   14765             :  *     cdef Py_ssize_t *shape = memslice.shape             # <<<<<<<<<<<<<<
   14766             :  *     cdef Py_ssize_t *strides = memslice.strides
   14767             :  * 
   14768             :  */
   14769           0 :   __pyx_t_2 = __pyx_v_memslice->shape;
   14770           0 :   __pyx_v_shape = __pyx_t_2;
   14771             : 
   14772             :   /* "View.MemoryView":933
   14773             :  * 
   14774             :  *     cdef Py_ssize_t *shape = memslice.shape
   14775             :  *     cdef Py_ssize_t *strides = memslice.strides             # <<<<<<<<<<<<<<
   14776             :  * 
   14777             :  * 
   14778             :  */
   14779           0 :   __pyx_t_2 = __pyx_v_memslice->strides;
   14780           0 :   __pyx_v_strides = __pyx_t_2;
   14781             : 
   14782             :   /* "View.MemoryView":937
   14783             :  * 
   14784             :  *     cdef int i, j
   14785             :  *     for i in range(ndim // 2):             # <<<<<<<<<<<<<<
   14786             :  *         j = ndim - 1 - i
   14787             :  *         strides[i], strides[j] = strides[j], strides[i]
   14788             :  */
   14789           0 :   __pyx_t_3 = __Pyx_div_long(__pyx_v_ndim, 2);
   14790           0 :   __pyx_t_4 = __pyx_t_3;
   14791           0 :   for (__pyx_t_1 = 0; __pyx_t_1 < __pyx_t_4; __pyx_t_1+=1) {
   14792           0 :     __pyx_v_i = __pyx_t_1;
   14793             : 
   14794             :     /* "View.MemoryView":938
   14795             :  *     cdef int i, j
   14796             :  *     for i in range(ndim // 2):
   14797             :  *         j = ndim - 1 - i             # <<<<<<<<<<<<<<
   14798             :  *         strides[i], strides[j] = strides[j], strides[i]
   14799             :  *         shape[i], shape[j] = shape[j], shape[i]
   14800             :  */
   14801           0 :     __pyx_v_j = ((__pyx_v_ndim - 1) - __pyx_v_i);
   14802             : 
   14803             :     /* "View.MemoryView":939
   14804             :  *     for i in range(ndim // 2):
   14805             :  *         j = ndim - 1 - i
   14806             :  *         strides[i], strides[j] = strides[j], strides[i]             # <<<<<<<<<<<<<<
   14807             :  *         shape[i], shape[j] = shape[j], shape[i]
   14808             :  * 
   14809             :  */
   14810           0 :     __pyx_t_5 = (__pyx_v_strides[__pyx_v_j]);
   14811           0 :     __pyx_t_6 = (__pyx_v_strides[__pyx_v_i]);
   14812           0 :     (__pyx_v_strides[__pyx_v_i]) = __pyx_t_5;
   14813           0 :     (__pyx_v_strides[__pyx_v_j]) = __pyx_t_6;
   14814             : 
   14815             :     /* "View.MemoryView":940
   14816             :  *         j = ndim - 1 - i
   14817             :  *         strides[i], strides[j] = strides[j], strides[i]
   14818             :  *         shape[i], shape[j] = shape[j], shape[i]             # <<<<<<<<<<<<<<
   14819             :  * 
   14820             :  *         if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:
   14821             :  */
   14822           0 :     __pyx_t_6 = (__pyx_v_shape[__pyx_v_j]);
   14823           0 :     __pyx_t_5 = (__pyx_v_shape[__pyx_v_i]);
   14824           0 :     (__pyx_v_shape[__pyx_v_i]) = __pyx_t_6;
   14825           0 :     (__pyx_v_shape[__pyx_v_j]) = __pyx_t_5;
   14826             : 
   14827             :     /* "View.MemoryView":942
   14828             :  *         shape[i], shape[j] = shape[j], shape[i]
   14829             :  * 
   14830             :  *         if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:             # <<<<<<<<<<<<<<
   14831             :  *             _err(PyExc_ValueError, "Cannot transpose memoryview with indirect dimensions")
   14832             :  * 
   14833             :  */
   14834           0 :     __pyx_t_8 = ((__pyx_v_memslice->suboffsets[__pyx_v_i]) >= 0);
   14835           0 :     if (!__pyx_t_8) {
   14836           0 :     } else {
   14837           0 :       __pyx_t_7 = __pyx_t_8;
   14838           0 :       goto __pyx_L6_bool_binop_done;
   14839             :     }
   14840           0 :     __pyx_t_8 = ((__pyx_v_memslice->suboffsets[__pyx_v_j]) >= 0);
   14841           0 :     __pyx_t_7 = __pyx_t_8;
   14842           0 :     __pyx_L6_bool_binop_done:;
   14843           0 :     if (__pyx_t_7) {
   14844             : 
   14845             :       /* "View.MemoryView":943
   14846             :  * 
   14847             :  *         if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:
   14848             :  *             _err(PyExc_ValueError, "Cannot transpose memoryview with indirect dimensions")             # <<<<<<<<<<<<<<
   14849             :  * 
   14850             :  *     return 0
   14851             :  */
   14852           0 :       __pyx_t_9 = __pyx_memoryview_err(PyExc_ValueError, __pyx_kp_s_Cannot_transpose_memoryview_with); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 943, __pyx_L1_error)
   14853             : 
   14854             :       /* "View.MemoryView":942
   14855             :  *         shape[i], shape[j] = shape[j], shape[i]
   14856             :  * 
   14857             :  *         if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:             # <<<<<<<<<<<<<<
   14858             :  *             _err(PyExc_ValueError, "Cannot transpose memoryview with indirect dimensions")
   14859             :  * 
   14860             :  */
   14861             :     }
   14862             :   }
   14863             : 
   14864             :   /* "View.MemoryView":945
   14865             :  *             _err(PyExc_ValueError, "Cannot transpose memoryview with indirect dimensions")
   14866             :  * 
   14867             :  *     return 0             # <<<<<<<<<<<<<<
   14868             :  * 
   14869             :  * 
   14870             :  */
   14871           0 :   __pyx_r = 0;
   14872           0 :   goto __pyx_L0;
   14873             : 
   14874             :   /* "View.MemoryView":929
   14875             :  * 
   14876             :  * @cname('__pyx_memslice_transpose')
   14877             :  * cdef int transpose_memslice(__Pyx_memviewslice *memslice) except -1 nogil:             # <<<<<<<<<<<<<<
   14878             :  *     cdef int ndim = memslice.memview.view.ndim
   14879             :  * 
   14880             :  */
   14881             : 
   14882             :   /* function exit code */
   14883           0 :   __pyx_L1_error:;
   14884             :   #ifdef WITH_THREAD
   14885           0 :   __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
   14886             :   #endif
   14887           0 :   __Pyx_AddTraceback("View.MemoryView.transpose_memslice", __pyx_clineno, __pyx_lineno, __pyx_filename);
   14888           0 :   __pyx_r = -1;
   14889             :   #ifdef WITH_THREAD
   14890           0 :   __Pyx_PyGILState_Release(__pyx_gilstate_save);
   14891             :   #endif
   14892           0 :   __pyx_L0:;
   14893           0 :   return __pyx_r;
   14894             : }
   14895             : 
   14896             : /* "View.MemoryView":963
   14897             :  *     cdef int (*to_dtype_func)(char *, object) except 0
   14898             :  * 
   14899             :  *     def __dealloc__(self):             # <<<<<<<<<<<<<<
   14900             :  *         __PYX_XCLEAR_MEMVIEW(&self.from_slice, 1)
   14901             :  * 
   14902             :  */
   14903             : 
   14904             : /* Python wrapper */
   14905             : static void __pyx_memoryviewslice___dealloc__(PyObject *__pyx_v_self); /*proto*/
   14906          94 : static void __pyx_memoryviewslice___dealloc__(PyObject *__pyx_v_self) {
   14907          94 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   14908             :   __Pyx_RefNannyDeclarations
   14909          94 :   __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
   14910          94 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
   14911         188 :   __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self));
   14912             : 
   14913             :   /* function exit code */
   14914          94 :   __Pyx_RefNannyFinishContext();
   14915             : }
   14916             : 
   14917          94 : static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(struct __pyx_memoryviewslice_obj *__pyx_v_self) {
   14918             : 
   14919             :   /* "View.MemoryView":964
   14920             :  * 
   14921             :  *     def __dealloc__(self):
   14922             :  *         __PYX_XCLEAR_MEMVIEW(&self.from_slice, 1)             # <<<<<<<<<<<<<<
   14923             :  * 
   14924             :  *     cdef convert_item_to_object(self, char *itemp):
   14925             :  */
   14926          94 :   __PYX_XCLEAR_MEMVIEW((&__pyx_v_self->from_slice), 1);
   14927             : 
   14928             :   /* "View.MemoryView":963
   14929             :  *     cdef int (*to_dtype_func)(char *, object) except 0
   14930             :  * 
   14931             :  *     def __dealloc__(self):             # <<<<<<<<<<<<<<
   14932             :  *         __PYX_XCLEAR_MEMVIEW(&self.from_slice, 1)
   14933             :  * 
   14934             :  */
   14935             : 
   14936             :   /* function exit code */
   14937             : }
   14938             : 
   14939             : /* "View.MemoryView":966
   14940             :  *         __PYX_XCLEAR_MEMVIEW(&self.from_slice, 1)
   14941             :  * 
   14942             :  *     cdef convert_item_to_object(self, char *itemp):             # <<<<<<<<<<<<<<
   14943             :  *         if self.to_object_func != NULL:
   14944             :  *             return self.to_object_func(itemp)
   14945             :  */
   14946             : 
   14947           0 : static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp) {
   14948           0 :   PyObject *__pyx_r = NULL;
   14949             :   __Pyx_RefNannyDeclarations
   14950           0 :   int __pyx_t_1;
   14951           0 :   PyObject *__pyx_t_2 = NULL;
   14952           0 :   int __pyx_lineno = 0;
   14953           0 :   const char *__pyx_filename = NULL;
   14954           0 :   int __pyx_clineno = 0;
   14955           0 :   __Pyx_RefNannySetupContext("convert_item_to_object", 1);
   14956             : 
   14957             :   /* "View.MemoryView":967
   14958             :  * 
   14959             :  *     cdef convert_item_to_object(self, char *itemp):
   14960             :  *         if self.to_object_func != NULL:             # <<<<<<<<<<<<<<
   14961             :  *             return self.to_object_func(itemp)
   14962             :  *         else:
   14963             :  */
   14964           0 :   __pyx_t_1 = (__pyx_v_self->to_object_func != NULL);
   14965           0 :   if (__pyx_t_1) {
   14966             : 
   14967             :     /* "View.MemoryView":968
   14968             :  *     cdef convert_item_to_object(self, char *itemp):
   14969             :  *         if self.to_object_func != NULL:
   14970             :  *             return self.to_object_func(itemp)             # <<<<<<<<<<<<<<
   14971             :  *         else:
   14972             :  *             return memoryview.convert_item_to_object(self, itemp)
   14973             :  */
   14974           0 :     __Pyx_XDECREF(__pyx_r);
   14975           0 :     __pyx_t_2 = __pyx_v_self->to_object_func(__pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 968, __pyx_L1_error)
   14976           0 :     __Pyx_GOTREF(__pyx_t_2);
   14977           0 :     __pyx_r = __pyx_t_2;
   14978           0 :     __pyx_t_2 = 0;
   14979           0 :     goto __pyx_L0;
   14980             : 
   14981             :     /* "View.MemoryView":967
   14982             :  * 
   14983             :  *     cdef convert_item_to_object(self, char *itemp):
   14984             :  *         if self.to_object_func != NULL:             # <<<<<<<<<<<<<<
   14985             :  *             return self.to_object_func(itemp)
   14986             :  *         else:
   14987             :  */
   14988             :   }
   14989             : 
   14990             :   /* "View.MemoryView":970
   14991             :  *             return self.to_object_func(itemp)
   14992             :  *         else:
   14993             :  *             return memoryview.convert_item_to_object(self, itemp)             # <<<<<<<<<<<<<<
   14994             :  * 
   14995             :  *     cdef assign_item_from_object(self, char *itemp, object value):
   14996             :  */
   14997             :   /*else*/ {
   14998           0 :     __Pyx_XDECREF(__pyx_r);
   14999           0 :     __pyx_t_2 = __pyx_memoryview_convert_item_to_object(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 970, __pyx_L1_error)
   15000           0 :     __Pyx_GOTREF(__pyx_t_2);
   15001           0 :     __pyx_r = __pyx_t_2;
   15002           0 :     __pyx_t_2 = 0;
   15003           0 :     goto __pyx_L0;
   15004             :   }
   15005             : 
   15006             :   /* "View.MemoryView":966
   15007             :  *         __PYX_XCLEAR_MEMVIEW(&self.from_slice, 1)
   15008             :  * 
   15009             :  *     cdef convert_item_to_object(self, char *itemp):             # <<<<<<<<<<<<<<
   15010             :  *         if self.to_object_func != NULL:
   15011             :  *             return self.to_object_func(itemp)
   15012             :  */
   15013             : 
   15014             :   /* function exit code */
   15015           0 :   __pyx_L1_error:;
   15016           0 :   __Pyx_XDECREF(__pyx_t_2);
   15017           0 :   __Pyx_AddTraceback("View.MemoryView._memoryviewslice.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
   15018           0 :   __pyx_r = 0;
   15019           0 :   __pyx_L0:;
   15020           0 :   __Pyx_XGIVEREF(__pyx_r);
   15021           0 :   __Pyx_RefNannyFinishContext();
   15022           0 :   return __pyx_r;
   15023             : }
   15024             : 
   15025             : /* "View.MemoryView":972
   15026             :  *             return memoryview.convert_item_to_object(self, itemp)
   15027             :  * 
   15028             :  *     cdef assign_item_from_object(self, char *itemp, object value):             # <<<<<<<<<<<<<<
   15029             :  *         if self.to_dtype_func != NULL:
   15030             :  *             self.to_dtype_func(itemp, value)
   15031             :  */
   15032             : 
   15033           0 : static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value) {
   15034           0 :   PyObject *__pyx_r = NULL;
   15035             :   __Pyx_RefNannyDeclarations
   15036           0 :   int __pyx_t_1;
   15037           0 :   int __pyx_t_2;
   15038           0 :   PyObject *__pyx_t_3 = NULL;
   15039           0 :   int __pyx_lineno = 0;
   15040           0 :   const char *__pyx_filename = NULL;
   15041           0 :   int __pyx_clineno = 0;
   15042           0 :   __Pyx_RefNannySetupContext("assign_item_from_object", 1);
   15043             : 
   15044             :   /* "View.MemoryView":973
   15045             :  * 
   15046             :  *     cdef assign_item_from_object(self, char *itemp, object value):
   15047             :  *         if self.to_dtype_func != NULL:             # <<<<<<<<<<<<<<
   15048             :  *             self.to_dtype_func(itemp, value)
   15049             :  *         else:
   15050             :  */
   15051           0 :   __pyx_t_1 = (__pyx_v_self->to_dtype_func != NULL);
   15052           0 :   if (__pyx_t_1) {
   15053             : 
   15054             :     /* "View.MemoryView":974
   15055             :  *     cdef assign_item_from_object(self, char *itemp, object value):
   15056             :  *         if self.to_dtype_func != NULL:
   15057             :  *             self.to_dtype_func(itemp, value)             # <<<<<<<<<<<<<<
   15058             :  *         else:
   15059             :  *             memoryview.assign_item_from_object(self, itemp, value)
   15060             :  */
   15061           0 :     __pyx_t_2 = __pyx_v_self->to_dtype_func(__pyx_v_itemp, __pyx_v_value); if (unlikely(__pyx_t_2 == ((int)0))) __PYX_ERR(1, 974, __pyx_L1_error)
   15062             : 
   15063             :     /* "View.MemoryView":973
   15064             :  * 
   15065             :  *     cdef assign_item_from_object(self, char *itemp, object value):
   15066             :  *         if self.to_dtype_func != NULL:             # <<<<<<<<<<<<<<
   15067             :  *             self.to_dtype_func(itemp, value)
   15068             :  *         else:
   15069             :  */
   15070           0 :     goto __pyx_L3;
   15071             :   }
   15072             : 
   15073             :   /* "View.MemoryView":976
   15074             :  *             self.to_dtype_func(itemp, value)
   15075             :  *         else:
   15076             :  *             memoryview.assign_item_from_object(self, itemp, value)             # <<<<<<<<<<<<<<
   15077             :  * 
   15078             :  *     cdef _get_base(self):
   15079             :  */
   15080             :   /*else*/ {
   15081           0 :     __pyx_t_3 = __pyx_memoryview_assign_item_from_object(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_itemp, __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 976, __pyx_L1_error)
   15082           0 :     __Pyx_GOTREF(__pyx_t_3);
   15083           0 :     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   15084             :   }
   15085           0 :   __pyx_L3:;
   15086             : 
   15087             :   /* "View.MemoryView":972
   15088             :  *             return memoryview.convert_item_to_object(self, itemp)
   15089             :  * 
   15090             :  *     cdef assign_item_from_object(self, char *itemp, object value):             # <<<<<<<<<<<<<<
   15091             :  *         if self.to_dtype_func != NULL:
   15092             :  *             self.to_dtype_func(itemp, value)
   15093             :  */
   15094             : 
   15095             :   /* function exit code */
   15096           0 :   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   15097           0 :   goto __pyx_L0;
   15098           0 :   __pyx_L1_error:;
   15099           0 :   __Pyx_XDECREF(__pyx_t_3);
   15100           0 :   __Pyx_AddTraceback("View.MemoryView._memoryviewslice.assign_item_from_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
   15101           0 :   __pyx_r = 0;
   15102           0 :   __pyx_L0:;
   15103           0 :   __Pyx_XGIVEREF(__pyx_r);
   15104           0 :   __Pyx_RefNannyFinishContext();
   15105           0 :   return __pyx_r;
   15106             : }
   15107             : 
   15108             : /* "View.MemoryView":978
   15109             :  *             memoryview.assign_item_from_object(self, itemp, value)
   15110             :  * 
   15111             :  *     cdef _get_base(self):             # <<<<<<<<<<<<<<
   15112             :  *         return self.from_object
   15113             :  * 
   15114             :  */
   15115             : 
   15116           0 : static PyObject *__pyx_memoryviewslice__get_base(struct __pyx_memoryviewslice_obj *__pyx_v_self) {
   15117           0 :   PyObject *__pyx_r = NULL;
   15118             :   __Pyx_RefNannyDeclarations
   15119           0 :   __Pyx_RefNannySetupContext("_get_base", 1);
   15120             : 
   15121             :   /* "View.MemoryView":979
   15122             :  * 
   15123             :  *     cdef _get_base(self):
   15124             :  *         return self.from_object             # <<<<<<<<<<<<<<
   15125             :  * 
   15126             :  * 
   15127             :  */
   15128           0 :   __Pyx_XDECREF(__pyx_r);
   15129           0 :   __Pyx_INCREF(__pyx_v_self->from_object);
   15130           0 :   __pyx_r = __pyx_v_self->from_object;
   15131           0 :   goto __pyx_L0;
   15132             : 
   15133             :   /* "View.MemoryView":978
   15134             :  *             memoryview.assign_item_from_object(self, itemp, value)
   15135             :  * 
   15136             :  *     cdef _get_base(self):             # <<<<<<<<<<<<<<
   15137             :  *         return self.from_object
   15138             :  * 
   15139             :  */
   15140             : 
   15141             :   /* function exit code */
   15142           0 :   __pyx_L0:;
   15143           0 :   __Pyx_XGIVEREF(__pyx_r);
   15144           0 :   __Pyx_RefNannyFinishContext();
   15145           0 :   return __pyx_r;
   15146             : }
   15147             : 
   15148             : /* "(tree fragment)":1
   15149             :  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
   15150             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
   15151             :  * def __setstate_cython__(self, __pyx_state):
   15152             :  */
   15153             : 
   15154             : /* Python wrapper */
   15155             : static PyObject *__pyx_pw___pyx_memoryviewslice_1__reduce_cython__(PyObject *__pyx_v_self, 
   15156             : #if CYTHON_METH_FASTCALL
   15157             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   15158             : #else
   15159             : PyObject *__pyx_args, PyObject *__pyx_kwds
   15160             : #endif
   15161             : ); /*proto*/
   15162           0 : static PyObject *__pyx_pw___pyx_memoryviewslice_1__reduce_cython__(PyObject *__pyx_v_self, 
   15163             : #if CYTHON_METH_FASTCALL
   15164             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   15165             : #else
   15166             : PyObject *__pyx_args, PyObject *__pyx_kwds
   15167             : #endif
   15168             : ) {
   15169             :   #if !CYTHON_METH_FASTCALL
   15170             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
   15171             :   #endif
   15172           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   15173           0 :   PyObject *__pyx_r = 0;
   15174             :   __Pyx_RefNannyDeclarations
   15175           0 :   __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
   15176             :   #if !CYTHON_METH_FASTCALL
   15177             :   #if CYTHON_ASSUME_SAFE_MACROS
   15178             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
   15179             :   #else
   15180             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
   15181             :   #endif
   15182             :   #endif
   15183           0 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
   15184           0 :   if (unlikely(__pyx_nargs > 0)) {
   15185           0 :     __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
   15186           0 :   if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
   15187           0 :   __pyx_r = __pyx_pf___pyx_memoryviewslice___reduce_cython__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self));
   15188             : 
   15189             :   /* function exit code */
   15190           0 :   __Pyx_RefNannyFinishContext();
   15191           0 :   return __pyx_r;
   15192             : }
   15193             : 
   15194           0 : static PyObject *__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self) {
   15195           0 :   PyObject *__pyx_r = NULL;
   15196             :   __Pyx_RefNannyDeclarations
   15197           0 :   int __pyx_lineno = 0;
   15198           0 :   const char *__pyx_filename = NULL;
   15199           0 :   int __pyx_clineno = 0;
   15200           0 :   __Pyx_RefNannySetupContext("__reduce_cython__", 1);
   15201             : 
   15202             :   /* "(tree fragment)":2
   15203             :  * def __reduce_cython__(self):
   15204             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
   15205             :  * def __setstate_cython__(self, __pyx_state):
   15206             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
   15207             :  */
   15208           0 :   __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
   15209           0 :   __PYX_ERR(1, 2, __pyx_L1_error)
   15210             : 
   15211             :   /* "(tree fragment)":1
   15212             :  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
   15213             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
   15214             :  * def __setstate_cython__(self, __pyx_state):
   15215             :  */
   15216             : 
   15217             :   /* function exit code */
   15218           0 :   __pyx_L1_error:;
   15219           0 :   __Pyx_AddTraceback("View.MemoryView._memoryviewslice.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   15220           0 :   __pyx_r = NULL;
   15221           0 :   __Pyx_XGIVEREF(__pyx_r);
   15222           0 :   __Pyx_RefNannyFinishContext();
   15223           0 :   return __pyx_r;
   15224             : }
   15225             : 
   15226             : /* "(tree fragment)":3
   15227             :  * def __reduce_cython__(self):
   15228             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
   15229             :  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
   15230             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
   15231             :  */
   15232             : 
   15233             : /* Python wrapper */
   15234             : static PyObject *__pyx_pw___pyx_memoryviewslice_3__setstate_cython__(PyObject *__pyx_v_self, 
   15235             : #if CYTHON_METH_FASTCALL
   15236             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   15237             : #else
   15238             : PyObject *__pyx_args, PyObject *__pyx_kwds
   15239             : #endif
   15240             : ); /*proto*/
   15241           0 : static PyObject *__pyx_pw___pyx_memoryviewslice_3__setstate_cython__(PyObject *__pyx_v_self, 
   15242             : #if CYTHON_METH_FASTCALL
   15243             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   15244             : #else
   15245             : PyObject *__pyx_args, PyObject *__pyx_kwds
   15246             : #endif
   15247             : ) {
   15248           0 :   CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
   15249             :   #if !CYTHON_METH_FASTCALL
   15250             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
   15251             :   #endif
   15252           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   15253           0 :   PyObject* values[1] = {0};
   15254           0 :   int __pyx_lineno = 0;
   15255           0 :   const char *__pyx_filename = NULL;
   15256           0 :   int __pyx_clineno = 0;
   15257           0 :   PyObject *__pyx_r = 0;
   15258             :   __Pyx_RefNannyDeclarations
   15259           0 :   __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
   15260             :   #if !CYTHON_METH_FASTCALL
   15261             :   #if CYTHON_ASSUME_SAFE_MACROS
   15262             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
   15263             :   #else
   15264             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
   15265             :   #endif
   15266             :   #endif
   15267           0 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
   15268             :   {
   15269           0 :     PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
   15270           0 :     if (__pyx_kwds) {
   15271           0 :       Py_ssize_t kw_args;
   15272           0 :       switch (__pyx_nargs) {
   15273           0 :         case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
   15274           0 :         CYTHON_FALLTHROUGH;
   15275           0 :         case  0: break;
   15276           0 :         default: goto __pyx_L5_argtuple_error;
   15277             :       }
   15278           0 :       kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
   15279           0 :       switch (__pyx_nargs) {
   15280             :         case  0:
   15281           0 :         if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
   15282           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
   15283           0 :           kw_args--;
   15284             :         }
   15285           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
   15286           0 :         else goto __pyx_L5_argtuple_error;
   15287             :       }
   15288           0 :       if (unlikely(kw_args > 0)) {
   15289           0 :         const Py_ssize_t kwd_pos_args = __pyx_nargs;
   15290           0 :         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
   15291             :       }
   15292           0 :     } else if (unlikely(__pyx_nargs != 1)) {
   15293           0 :       goto __pyx_L5_argtuple_error;
   15294             :     } else {
   15295           0 :       values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
   15296             :     }
   15297           0 :     __pyx_v___pyx_state = values[0];
   15298             :   }
   15299           0 :   goto __pyx_L6_skip;
   15300           0 :   __pyx_L5_argtuple_error:;
   15301           0 :   __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
   15302           0 :   __pyx_L6_skip:;
   15303           0 :   goto __pyx_L4_argument_unpacking_done;
   15304           0 :   __pyx_L3_error:;
   15305             :   {
   15306           0 :     Py_ssize_t __pyx_temp;
   15307           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   15308             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
   15309             :     }
   15310             :   }
   15311           0 :   __Pyx_AddTraceback("View.MemoryView._memoryviewslice.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   15312           0 :   __Pyx_RefNannyFinishContext();
   15313           0 :   return NULL;
   15314           0 :   __pyx_L4_argument_unpacking_done:;
   15315           0 :   __pyx_r = __pyx_pf___pyx_memoryviewslice_2__setstate_cython__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self), __pyx_v___pyx_state);
   15316             : 
   15317             :   /* function exit code */
   15318             :   {
   15319           0 :     Py_ssize_t __pyx_temp;
   15320           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   15321             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
   15322             :     }
   15323             :   }
   15324             :   __Pyx_RefNannyFinishContext();
   15325             :   return __pyx_r;
   15326             : }
   15327             : 
   15328           0 : static PyObject *__pyx_pf___pyx_memoryviewslice_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
   15329           0 :   PyObject *__pyx_r = NULL;
   15330             :   __Pyx_RefNannyDeclarations
   15331           0 :   int __pyx_lineno = 0;
   15332           0 :   const char *__pyx_filename = NULL;
   15333           0 :   int __pyx_clineno = 0;
   15334           0 :   __Pyx_RefNannySetupContext("__setstate_cython__", 1);
   15335             : 
   15336             :   /* "(tree fragment)":4
   15337             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
   15338             :  * def __setstate_cython__(self, __pyx_state):
   15339             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
   15340             :  */
   15341           0 :   __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
   15342           0 :   __PYX_ERR(1, 4, __pyx_L1_error)
   15343             : 
   15344             :   /* "(tree fragment)":3
   15345             :  * def __reduce_cython__(self):
   15346             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
   15347             :  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
   15348             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
   15349             :  */
   15350             : 
   15351             :   /* function exit code */
   15352           0 :   __pyx_L1_error:;
   15353           0 :   __Pyx_AddTraceback("View.MemoryView._memoryviewslice.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   15354           0 :   __pyx_r = NULL;
   15355           0 :   __Pyx_XGIVEREF(__pyx_r);
   15356           0 :   __Pyx_RefNannyFinishContext();
   15357           0 :   return __pyx_r;
   15358             : }
   15359             : 
   15360             : /* "View.MemoryView":999
   15361             :  * 
   15362             :  * @cname('__pyx_memoryview_fromslice')
   15363             :  * cdef memoryview_fromslice(__Pyx_memviewslice memviewslice,             # <<<<<<<<<<<<<<
   15364             :  *                           int ndim,
   15365             :  *                           object (*to_object_func)(char *),
   15366             :  */
   15367             : 
   15368          94 : static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice __pyx_v_memviewslice, int __pyx_v_ndim, PyObject *(*__pyx_v_to_object_func)(char *), int (*__pyx_v_to_dtype_func)(char *, PyObject *), int __pyx_v_dtype_is_object) {
   15369          94 :   struct __pyx_memoryviewslice_obj *__pyx_v_result = 0;
   15370          94 :   Py_ssize_t __pyx_v_suboffset;
   15371          94 :   PyObject *__pyx_v_length = NULL;
   15372          94 :   PyObject *__pyx_r = NULL;
   15373             :   __Pyx_RefNannyDeclarations
   15374          94 :   int __pyx_t_1;
   15375          94 :   PyObject *__pyx_t_2 = NULL;
   15376          94 :   PyObject *__pyx_t_3 = NULL;
   15377          94 :   __Pyx_TypeInfo *__pyx_t_4;
   15378          94 :   Py_buffer __pyx_t_5;
   15379          94 :   Py_ssize_t *__pyx_t_6;
   15380          94 :   Py_ssize_t *__pyx_t_7;
   15381          94 :   Py_ssize_t *__pyx_t_8;
   15382          94 :   Py_ssize_t __pyx_t_9;
   15383          94 :   int __pyx_lineno = 0;
   15384          94 :   const char *__pyx_filename = NULL;
   15385          94 :   int __pyx_clineno = 0;
   15386          94 :   __Pyx_RefNannySetupContext("memoryview_fromslice", 1);
   15387             : 
   15388             :   /* "View.MemoryView":1007
   15389             :  *     cdef _memoryviewslice result
   15390             :  * 
   15391             :  *     if <PyObject *> memviewslice.memview == Py_None:             # <<<<<<<<<<<<<<
   15392             :  *         return None
   15393             :  * 
   15394             :  */
   15395          94 :   __pyx_t_1 = (((PyObject *)__pyx_v_memviewslice.memview) == Py_None);
   15396          94 :   if (__pyx_t_1) {
   15397             : 
   15398             :     /* "View.MemoryView":1008
   15399             :  * 
   15400             :  *     if <PyObject *> memviewslice.memview == Py_None:
   15401             :  *         return None             # <<<<<<<<<<<<<<
   15402             :  * 
   15403             :  * 
   15404             :  */
   15405           0 :     __Pyx_XDECREF(__pyx_r);
   15406           0 :     __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   15407           0 :     goto __pyx_L0;
   15408             : 
   15409             :     /* "View.MemoryView":1007
   15410             :  *     cdef _memoryviewslice result
   15411             :  * 
   15412             :  *     if <PyObject *> memviewslice.memview == Py_None:             # <<<<<<<<<<<<<<
   15413             :  *         return None
   15414             :  * 
   15415             :  */
   15416             :   }
   15417             : 
   15418             :   /* "View.MemoryView":1013
   15419             :  * 
   15420             :  * 
   15421             :  *     result = _memoryviewslice.__new__(_memoryviewslice, None, 0, dtype_is_object)             # <<<<<<<<<<<<<<
   15422             :  * 
   15423             :  *     result.from_slice = memviewslice
   15424             :  */
   15425          94 :   __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1013, __pyx_L1_error)
   15426          94 :   __Pyx_GOTREF(__pyx_t_2);
   15427          94 :   __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1013, __pyx_L1_error)
   15428          94 :   __Pyx_GOTREF(__pyx_t_3);
   15429          94 :   __Pyx_INCREF(Py_None);
   15430          94 :   __Pyx_GIVEREF(Py_None);
   15431          94 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, Py_None)) __PYX_ERR(1, 1013, __pyx_L1_error);
   15432          94 :   __Pyx_INCREF(__pyx_int_0);
   15433          94 :   __Pyx_GIVEREF(__pyx_int_0);
   15434          94 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_0)) __PYX_ERR(1, 1013, __pyx_L1_error);
   15435          94 :   __Pyx_GIVEREF(__pyx_t_2);
   15436          94 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2)) __PYX_ERR(1, 1013, __pyx_L1_error);
   15437          94 :   __pyx_t_2 = 0;
   15438          94 :   __pyx_t_2 = ((PyObject *)__pyx_tp_new__memoryviewslice(((PyTypeObject *)__pyx_memoryviewslice_type), __pyx_t_3, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1013, __pyx_L1_error)
   15439          94 :   __Pyx_GOTREF((PyObject *)__pyx_t_2);
   15440          94 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   15441          94 :   __pyx_v_result = ((struct __pyx_memoryviewslice_obj *)__pyx_t_2);
   15442          94 :   __pyx_t_2 = 0;
   15443             : 
   15444             :   /* "View.MemoryView":1015
   15445             :  *     result = _memoryviewslice.__new__(_memoryviewslice, None, 0, dtype_is_object)
   15446             :  * 
   15447             :  *     result.from_slice = memviewslice             # <<<<<<<<<<<<<<
   15448             :  *     __PYX_INC_MEMVIEW(&memviewslice, 1)
   15449             :  * 
   15450             :  */
   15451          94 :   __pyx_v_result->from_slice = __pyx_v_memviewslice;
   15452             : 
   15453             :   /* "View.MemoryView":1016
   15454             :  * 
   15455             :  *     result.from_slice = memviewslice
   15456             :  *     __PYX_INC_MEMVIEW(&memviewslice, 1)             # <<<<<<<<<<<<<<
   15457             :  * 
   15458             :  *     result.from_object = (<memoryview> memviewslice.memview)._get_base()
   15459             :  */
   15460          94 :   __PYX_INC_MEMVIEW((&__pyx_v_memviewslice), 1);
   15461             : 
   15462             :   /* "View.MemoryView":1018
   15463             :  *     __PYX_INC_MEMVIEW(&memviewslice, 1)
   15464             :  * 
   15465             :  *     result.from_object = (<memoryview> memviewslice.memview)._get_base()             # <<<<<<<<<<<<<<
   15466             :  *     result.typeinfo = memviewslice.memview.typeinfo
   15467             :  * 
   15468             :  */
   15469          94 :   __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)((struct __pyx_memoryview_obj *)__pyx_v_memviewslice.memview)->__pyx_vtab)->_get_base(((struct __pyx_memoryview_obj *)__pyx_v_memviewslice.memview)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1018, __pyx_L1_error)
   15470          94 :   __Pyx_GOTREF(__pyx_t_2);
   15471          94 :   __Pyx_GIVEREF(__pyx_t_2);
   15472          94 :   __Pyx_GOTREF(__pyx_v_result->from_object);
   15473          94 :   __Pyx_DECREF(__pyx_v_result->from_object);
   15474          94 :   __pyx_v_result->from_object = __pyx_t_2;
   15475          94 :   __pyx_t_2 = 0;
   15476             : 
   15477             :   /* "View.MemoryView":1019
   15478             :  * 
   15479             :  *     result.from_object = (<memoryview> memviewslice.memview)._get_base()
   15480             :  *     result.typeinfo = memviewslice.memview.typeinfo             # <<<<<<<<<<<<<<
   15481             :  * 
   15482             :  *     result.view = memviewslice.memview.view
   15483             :  */
   15484          94 :   __pyx_t_4 = __pyx_v_memviewslice.memview->typeinfo;
   15485          94 :   __pyx_v_result->__pyx_base.typeinfo = __pyx_t_4;
   15486             : 
   15487             :   /* "View.MemoryView":1021
   15488             :  *     result.typeinfo = memviewslice.memview.typeinfo
   15489             :  * 
   15490             :  *     result.view = memviewslice.memview.view             # <<<<<<<<<<<<<<
   15491             :  *     result.view.buf = <void *> memviewslice.data
   15492             :  *     result.view.ndim = ndim
   15493             :  */
   15494          94 :   __pyx_t_5 = __pyx_v_memviewslice.memview->view;
   15495          94 :   __pyx_v_result->__pyx_base.view = __pyx_t_5;
   15496             : 
   15497             :   /* "View.MemoryView":1022
   15498             :  * 
   15499             :  *     result.view = memviewslice.memview.view
   15500             :  *     result.view.buf = <void *> memviewslice.data             # <<<<<<<<<<<<<<
   15501             :  *     result.view.ndim = ndim
   15502             :  *     (<__pyx_buffer *> &result.view).obj = Py_None
   15503             :  */
   15504          94 :   __pyx_v_result->__pyx_base.view.buf = ((void *)__pyx_v_memviewslice.data);
   15505             : 
   15506             :   /* "View.MemoryView":1023
   15507             :  *     result.view = memviewslice.memview.view
   15508             :  *     result.view.buf = <void *> memviewslice.data
   15509             :  *     result.view.ndim = ndim             # <<<<<<<<<<<<<<
   15510             :  *     (<__pyx_buffer *> &result.view).obj = Py_None
   15511             :  *     Py_INCREF(Py_None)
   15512             :  */
   15513          94 :   __pyx_v_result->__pyx_base.view.ndim = __pyx_v_ndim;
   15514             : 
   15515             :   /* "View.MemoryView":1024
   15516             :  *     result.view.buf = <void *> memviewslice.data
   15517             :  *     result.view.ndim = ndim
   15518             :  *     (<__pyx_buffer *> &result.view).obj = Py_None             # <<<<<<<<<<<<<<
   15519             :  *     Py_INCREF(Py_None)
   15520             :  * 
   15521             :  */
   15522          94 :   ((Py_buffer *)(&__pyx_v_result->__pyx_base.view))->obj = Py_None;
   15523             : 
   15524             :   /* "View.MemoryView":1025
   15525             :  *     result.view.ndim = ndim
   15526             :  *     (<__pyx_buffer *> &result.view).obj = Py_None
   15527             :  *     Py_INCREF(Py_None)             # <<<<<<<<<<<<<<
   15528             :  * 
   15529             :  *     if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:
   15530             :  */
   15531          94 :   Py_INCREF(Py_None);
   15532             : 
   15533             :   /* "View.MemoryView":1027
   15534             :  *     Py_INCREF(Py_None)
   15535             :  * 
   15536             :  *     if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:             # <<<<<<<<<<<<<<
   15537             :  *         result.flags = PyBUF_RECORDS
   15538             :  *     else:
   15539             :  */
   15540          94 :   __pyx_t_1 = ((((struct __pyx_memoryview_obj *)__pyx_v_memviewslice.memview)->flags & PyBUF_WRITABLE) != 0);
   15541          94 :   if (__pyx_t_1) {
   15542             : 
   15543             :     /* "View.MemoryView":1028
   15544             :  * 
   15545             :  *     if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:
   15546             :  *         result.flags = PyBUF_RECORDS             # <<<<<<<<<<<<<<
   15547             :  *     else:
   15548             :  *         result.flags = PyBUF_RECORDS_RO
   15549             :  */
   15550          94 :     __pyx_v_result->__pyx_base.flags = PyBUF_RECORDS;
   15551             : 
   15552             :     /* "View.MemoryView":1027
   15553             :  *     Py_INCREF(Py_None)
   15554             :  * 
   15555             :  *     if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:             # <<<<<<<<<<<<<<
   15556             :  *         result.flags = PyBUF_RECORDS
   15557             :  *     else:
   15558             :  */
   15559          94 :     goto __pyx_L4;
   15560             :   }
   15561             : 
   15562             :   /* "View.MemoryView":1030
   15563             :  *         result.flags = PyBUF_RECORDS
   15564             :  *     else:
   15565             :  *         result.flags = PyBUF_RECORDS_RO             # <<<<<<<<<<<<<<
   15566             :  * 
   15567             :  *     result.view.shape = <Py_ssize_t *> result.from_slice.shape
   15568             :  */
   15569             :   /*else*/ {
   15570           0 :     __pyx_v_result->__pyx_base.flags = PyBUF_RECORDS_RO;
   15571             :   }
   15572          94 :   __pyx_L4:;
   15573             : 
   15574             :   /* "View.MemoryView":1032
   15575             :  *         result.flags = PyBUF_RECORDS_RO
   15576             :  * 
   15577             :  *     result.view.shape = <Py_ssize_t *> result.from_slice.shape             # <<<<<<<<<<<<<<
   15578             :  *     result.view.strides = <Py_ssize_t *> result.from_slice.strides
   15579             :  * 
   15580             :  */
   15581          94 :   __pyx_v_result->__pyx_base.view.shape = ((Py_ssize_t *)__pyx_v_result->from_slice.shape);
   15582             : 
   15583             :   /* "View.MemoryView":1033
   15584             :  * 
   15585             :  *     result.view.shape = <Py_ssize_t *> result.from_slice.shape
   15586             :  *     result.view.strides = <Py_ssize_t *> result.from_slice.strides             # <<<<<<<<<<<<<<
   15587             :  * 
   15588             :  * 
   15589             :  */
   15590          94 :   __pyx_v_result->__pyx_base.view.strides = ((Py_ssize_t *)__pyx_v_result->from_slice.strides);
   15591             : 
   15592             :   /* "View.MemoryView":1036
   15593             :  * 
   15594             :  * 
   15595             :  *     result.view.suboffsets = NULL             # <<<<<<<<<<<<<<
   15596             :  *     for suboffset in result.from_slice.suboffsets[:ndim]:
   15597             :  *         if suboffset >= 0:
   15598             :  */
   15599          94 :   __pyx_v_result->__pyx_base.view.suboffsets = NULL;
   15600             : 
   15601             :   /* "View.MemoryView":1037
   15602             :  * 
   15603             :  *     result.view.suboffsets = NULL
   15604             :  *     for suboffset in result.from_slice.suboffsets[:ndim]:             # <<<<<<<<<<<<<<
   15605             :  *         if suboffset >= 0:
   15606             :  *             result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
   15607             :  */
   15608          94 :   __pyx_t_7 = (__pyx_v_result->from_slice.suboffsets + __pyx_v_ndim);
   15609         282 :   for (__pyx_t_8 = __pyx_v_result->from_slice.suboffsets; __pyx_t_8 < __pyx_t_7; __pyx_t_8++) {
   15610         188 :     __pyx_t_6 = __pyx_t_8;
   15611         188 :     __pyx_v_suboffset = (__pyx_t_6[0]);
   15612             : 
   15613             :     /* "View.MemoryView":1038
   15614             :  *     result.view.suboffsets = NULL
   15615             :  *     for suboffset in result.from_slice.suboffsets[:ndim]:
   15616             :  *         if suboffset >= 0:             # <<<<<<<<<<<<<<
   15617             :  *             result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
   15618             :  *             break
   15619             :  */
   15620         188 :     __pyx_t_1 = (__pyx_v_suboffset >= 0);
   15621         188 :     if (__pyx_t_1) {
   15622             : 
   15623             :       /* "View.MemoryView":1039
   15624             :  *     for suboffset in result.from_slice.suboffsets[:ndim]:
   15625             :  *         if suboffset >= 0:
   15626             :  *             result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets             # <<<<<<<<<<<<<<
   15627             :  *             break
   15628             :  * 
   15629             :  */
   15630           0 :       __pyx_v_result->__pyx_base.view.suboffsets = ((Py_ssize_t *)__pyx_v_result->from_slice.suboffsets);
   15631             : 
   15632             :       /* "View.MemoryView":1040
   15633             :  *         if suboffset >= 0:
   15634             :  *             result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
   15635             :  *             break             # <<<<<<<<<<<<<<
   15636             :  * 
   15637             :  *     result.view.len = result.view.itemsize
   15638             :  */
   15639           0 :       goto __pyx_L6_break;
   15640             : 
   15641             :       /* "View.MemoryView":1038
   15642             :  *     result.view.suboffsets = NULL
   15643             :  *     for suboffset in result.from_slice.suboffsets[:ndim]:
   15644             :  *         if suboffset >= 0:             # <<<<<<<<<<<<<<
   15645             :  *             result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
   15646             :  *             break
   15647             :  */
   15648             :     }
   15649             :   }
   15650          94 :   __pyx_L6_break:;
   15651             : 
   15652             :   /* "View.MemoryView":1042
   15653             :  *             break
   15654             :  * 
   15655             :  *     result.view.len = result.view.itemsize             # <<<<<<<<<<<<<<
   15656             :  *     for length in result.view.shape[:ndim]:
   15657             :  *         result.view.len *= length
   15658             :  */
   15659          94 :   __pyx_t_9 = __pyx_v_result->__pyx_base.view.itemsize;
   15660          94 :   __pyx_v_result->__pyx_base.view.len = __pyx_t_9;
   15661             : 
   15662             :   /* "View.MemoryView":1043
   15663             :  * 
   15664             :  *     result.view.len = result.view.itemsize
   15665             :  *     for length in result.view.shape[:ndim]:             # <<<<<<<<<<<<<<
   15666             :  *         result.view.len *= length
   15667             :  * 
   15668             :  */
   15669          94 :   __pyx_t_7 = (__pyx_v_result->__pyx_base.view.shape + __pyx_v_ndim);
   15670         282 :   for (__pyx_t_8 = __pyx_v_result->__pyx_base.view.shape; __pyx_t_8 < __pyx_t_7; __pyx_t_8++) {
   15671         188 :     __pyx_t_6 = __pyx_t_8;
   15672         188 :     __pyx_t_2 = PyInt_FromSsize_t((__pyx_t_6[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1043, __pyx_L1_error)
   15673         188 :     __Pyx_GOTREF(__pyx_t_2);
   15674         188 :     __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_2);
   15675         188 :     __pyx_t_2 = 0;
   15676             : 
   15677             :     /* "View.MemoryView":1044
   15678             :  *     result.view.len = result.view.itemsize
   15679             :  *     for length in result.view.shape[:ndim]:
   15680             :  *         result.view.len *= length             # <<<<<<<<<<<<<<
   15681             :  * 
   15682             :  *     result.to_object_func = to_object_func
   15683             :  */
   15684         188 :     __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_result->__pyx_base.view.len); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1044, __pyx_L1_error)
   15685         188 :     __Pyx_GOTREF(__pyx_t_2);
   15686         188 :     __pyx_t_3 = PyNumber_InPlaceMultiply(__pyx_t_2, __pyx_v_length); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1044, __pyx_L1_error)
   15687         188 :     __Pyx_GOTREF(__pyx_t_3);
   15688         188 :     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   15689         188 :     __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 1044, __pyx_L1_error)
   15690         188 :     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   15691         188 :     __pyx_v_result->__pyx_base.view.len = __pyx_t_9;
   15692             :   }
   15693             : 
   15694             :   /* "View.MemoryView":1046
   15695             :  *         result.view.len *= length
   15696             :  * 
   15697             :  *     result.to_object_func = to_object_func             # <<<<<<<<<<<<<<
   15698             :  *     result.to_dtype_func = to_dtype_func
   15699             :  * 
   15700             :  */
   15701          94 :   __pyx_v_result->to_object_func = __pyx_v_to_object_func;
   15702             : 
   15703             :   /* "View.MemoryView":1047
   15704             :  * 
   15705             :  *     result.to_object_func = to_object_func
   15706             :  *     result.to_dtype_func = to_dtype_func             # <<<<<<<<<<<<<<
   15707             :  * 
   15708             :  *     return result
   15709             :  */
   15710          94 :   __pyx_v_result->to_dtype_func = __pyx_v_to_dtype_func;
   15711             : 
   15712             :   /* "View.MemoryView":1049
   15713             :  *     result.to_dtype_func = to_dtype_func
   15714             :  * 
   15715             :  *     return result             # <<<<<<<<<<<<<<
   15716             :  * 
   15717             :  * @cname('__pyx_memoryview_get_slice_from_memoryview')
   15718             :  */
   15719          94 :   __Pyx_XDECREF(__pyx_r);
   15720          94 :   __Pyx_INCREF((PyObject *)__pyx_v_result);
   15721          94 :   __pyx_r = ((PyObject *)__pyx_v_result);
   15722          94 :   goto __pyx_L0;
   15723             : 
   15724             :   /* "View.MemoryView":999
   15725             :  * 
   15726             :  * @cname('__pyx_memoryview_fromslice')
   15727             :  * cdef memoryview_fromslice(__Pyx_memviewslice memviewslice,             # <<<<<<<<<<<<<<
   15728             :  *                           int ndim,
   15729             :  *                           object (*to_object_func)(char *),
   15730             :  */
   15731             : 
   15732             :   /* function exit code */
   15733           0 :   __pyx_L1_error:;
   15734           0 :   __Pyx_XDECREF(__pyx_t_2);
   15735           0 :   __Pyx_XDECREF(__pyx_t_3);
   15736           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview_fromslice", __pyx_clineno, __pyx_lineno, __pyx_filename);
   15737           0 :   __pyx_r = 0;
   15738          94 :   __pyx_L0:;
   15739          94 :   __Pyx_XDECREF((PyObject *)__pyx_v_result);
   15740          94 :   __Pyx_XDECREF(__pyx_v_length);
   15741          94 :   __Pyx_XGIVEREF(__pyx_r);
   15742          94 :   __Pyx_RefNannyFinishContext();
   15743          94 :   return __pyx_r;
   15744             : }
   15745             : 
   15746             : /* "View.MemoryView":1052
   15747             :  * 
   15748             :  * @cname('__pyx_memoryview_get_slice_from_memoryview')
   15749             :  * cdef __Pyx_memviewslice *get_slice_from_memview(memoryview memview,             # <<<<<<<<<<<<<<
   15750             :  *                                                    __Pyx_memviewslice *mslice) except NULL:
   15751             :  *     cdef _memoryviewslice obj
   15752             :  */
   15753             : 
   15754           0 : static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_mslice) {
   15755           0 :   struct __pyx_memoryviewslice_obj *__pyx_v_obj = 0;
   15756           0 :   __Pyx_memviewslice *__pyx_r;
   15757             :   __Pyx_RefNannyDeclarations
   15758           0 :   int __pyx_t_1;
   15759           0 :   PyObject *__pyx_t_2 = NULL;
   15760           0 :   int __pyx_lineno = 0;
   15761           0 :   const char *__pyx_filename = NULL;
   15762           0 :   int __pyx_clineno = 0;
   15763           0 :   __Pyx_RefNannySetupContext("get_slice_from_memview", 1);
   15764             : 
   15765             :   /* "View.MemoryView":1055
   15766             :  *                                                    __Pyx_memviewslice *mslice) except NULL:
   15767             :  *     cdef _memoryviewslice obj
   15768             :  *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
   15769             :  *         obj = memview
   15770             :  *         return &obj.from_slice
   15771             :  */
   15772           0 :   __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type); 
   15773           0 :   if (__pyx_t_1) {
   15774             : 
   15775             :     /* "View.MemoryView":1056
   15776             :  *     cdef _memoryviewslice obj
   15777             :  *     if isinstance(memview, _memoryviewslice):
   15778             :  *         obj = memview             # <<<<<<<<<<<<<<
   15779             :  *         return &obj.from_slice
   15780             :  *     else:
   15781             :  */
   15782           0 :     if (!(likely(((((PyObject *)__pyx_v_memview)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type))))) __PYX_ERR(1, 1056, __pyx_L1_error)
   15783           0 :     __pyx_t_2 = ((PyObject *)__pyx_v_memview);
   15784           0 :     __Pyx_INCREF(__pyx_t_2);
   15785           0 :     __pyx_v_obj = ((struct __pyx_memoryviewslice_obj *)__pyx_t_2);
   15786           0 :     __pyx_t_2 = 0;
   15787             : 
   15788             :     /* "View.MemoryView":1057
   15789             :  *     if isinstance(memview, _memoryviewslice):
   15790             :  *         obj = memview
   15791             :  *         return &obj.from_slice             # <<<<<<<<<<<<<<
   15792             :  *     else:
   15793             :  *         slice_copy(memview, mslice)
   15794             :  */
   15795           0 :     __pyx_r = (&__pyx_v_obj->from_slice);
   15796           0 :     goto __pyx_L0;
   15797             : 
   15798             :     /* "View.MemoryView":1055
   15799             :  *                                                    __Pyx_memviewslice *mslice) except NULL:
   15800             :  *     cdef _memoryviewslice obj
   15801             :  *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
   15802             :  *         obj = memview
   15803             :  *         return &obj.from_slice
   15804             :  */
   15805             :   }
   15806             : 
   15807             :   /* "View.MemoryView":1059
   15808             :  *         return &obj.from_slice
   15809             :  *     else:
   15810             :  *         slice_copy(memview, mslice)             # <<<<<<<<<<<<<<
   15811             :  *         return mslice
   15812             :  * 
   15813             :  */
   15814             :   /*else*/ {
   15815           0 :     __pyx_memoryview_slice_copy(__pyx_v_memview, __pyx_v_mslice);
   15816             : 
   15817             :     /* "View.MemoryView":1060
   15818             :  *     else:
   15819             :  *         slice_copy(memview, mslice)
   15820             :  *         return mslice             # <<<<<<<<<<<<<<
   15821             :  * 
   15822             :  * @cname('__pyx_memoryview_slice_copy')
   15823             :  */
   15824           0 :     __pyx_r = __pyx_v_mslice;
   15825           0 :     goto __pyx_L0;
   15826             :   }
   15827             : 
   15828             :   /* "View.MemoryView":1052
   15829             :  * 
   15830             :  * @cname('__pyx_memoryview_get_slice_from_memoryview')
   15831             :  * cdef __Pyx_memviewslice *get_slice_from_memview(memoryview memview,             # <<<<<<<<<<<<<<
   15832             :  *                                                    __Pyx_memviewslice *mslice) except NULL:
   15833             :  *     cdef _memoryviewslice obj
   15834             :  */
   15835             : 
   15836             :   /* function exit code */
   15837           0 :   __pyx_L1_error:;
   15838           0 :   __Pyx_XDECREF(__pyx_t_2);
   15839           0 :   __Pyx_AddTraceback("View.MemoryView.get_slice_from_memview", __pyx_clineno, __pyx_lineno, __pyx_filename);
   15840           0 :   __pyx_r = NULL;
   15841           0 :   __pyx_L0:;
   15842           0 :   __Pyx_XDECREF((PyObject *)__pyx_v_obj);
   15843           0 :   __Pyx_RefNannyFinishContext();
   15844           0 :   return __pyx_r;
   15845             : }
   15846             : 
   15847             : /* "View.MemoryView":1063
   15848             :  * 
   15849             :  * @cname('__pyx_memoryview_slice_copy')
   15850             :  * cdef void slice_copy(memoryview memview, __Pyx_memviewslice *dst) noexcept:             # <<<<<<<<<<<<<<
   15851             :  *     cdef int dim
   15852             :  *     cdef (Py_ssize_t*) shape, strides, suboffsets
   15853             :  */
   15854             : 
   15855           0 : static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_dst) {
   15856           0 :   int __pyx_v_dim;
   15857           0 :   Py_ssize_t *__pyx_v_shape;
   15858           0 :   Py_ssize_t *__pyx_v_strides;
   15859           0 :   Py_ssize_t *__pyx_v_suboffsets;
   15860           0 :   Py_ssize_t *__pyx_t_1;
   15861           0 :   int __pyx_t_2;
   15862           0 :   int __pyx_t_3;
   15863           0 :   int __pyx_t_4;
   15864           0 :   Py_ssize_t __pyx_t_5;
   15865           0 :   int __pyx_t_6;
   15866             : 
   15867             :   /* "View.MemoryView":1067
   15868             :  *     cdef (Py_ssize_t*) shape, strides, suboffsets
   15869             :  * 
   15870             :  *     shape = memview.view.shape             # <<<<<<<<<<<<<<
   15871             :  *     strides = memview.view.strides
   15872             :  *     suboffsets = memview.view.suboffsets
   15873             :  */
   15874           0 :   __pyx_t_1 = __pyx_v_memview->view.shape;
   15875           0 :   __pyx_v_shape = __pyx_t_1;
   15876             : 
   15877             :   /* "View.MemoryView":1068
   15878             :  * 
   15879             :  *     shape = memview.view.shape
   15880             :  *     strides = memview.view.strides             # <<<<<<<<<<<<<<
   15881             :  *     suboffsets = memview.view.suboffsets
   15882             :  * 
   15883             :  */
   15884           0 :   __pyx_t_1 = __pyx_v_memview->view.strides;
   15885           0 :   __pyx_v_strides = __pyx_t_1;
   15886             : 
   15887             :   /* "View.MemoryView":1069
   15888             :  *     shape = memview.view.shape
   15889             :  *     strides = memview.view.strides
   15890             :  *     suboffsets = memview.view.suboffsets             # <<<<<<<<<<<<<<
   15891             :  * 
   15892             :  *     dst.memview = <__pyx_memoryview *> memview
   15893             :  */
   15894           0 :   __pyx_t_1 = __pyx_v_memview->view.suboffsets;
   15895           0 :   __pyx_v_suboffsets = __pyx_t_1;
   15896             : 
   15897             :   /* "View.MemoryView":1071
   15898             :  *     suboffsets = memview.view.suboffsets
   15899             :  * 
   15900             :  *     dst.memview = <__pyx_memoryview *> memview             # <<<<<<<<<<<<<<
   15901             :  *     dst.data = <char *> memview.view.buf
   15902             :  * 
   15903             :  */
   15904           0 :   __pyx_v_dst->memview = ((struct __pyx_memoryview_obj *)__pyx_v_memview);
   15905             : 
   15906             :   /* "View.MemoryView":1072
   15907             :  * 
   15908             :  *     dst.memview = <__pyx_memoryview *> memview
   15909             :  *     dst.data = <char *> memview.view.buf             # <<<<<<<<<<<<<<
   15910             :  * 
   15911             :  *     for dim in range(memview.view.ndim):
   15912             :  */
   15913           0 :   __pyx_v_dst->data = ((char *)__pyx_v_memview->view.buf);
   15914             : 
   15915             :   /* "View.MemoryView":1074
   15916             :  *     dst.data = <char *> memview.view.buf
   15917             :  * 
   15918             :  *     for dim in range(memview.view.ndim):             # <<<<<<<<<<<<<<
   15919             :  *         dst.shape[dim] = shape[dim]
   15920             :  *         dst.strides[dim] = strides[dim]
   15921             :  */
   15922           0 :   __pyx_t_2 = __pyx_v_memview->view.ndim;
   15923           0 :   __pyx_t_3 = __pyx_t_2;
   15924           0 :   for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
   15925           0 :     __pyx_v_dim = __pyx_t_4;
   15926             : 
   15927             :     /* "View.MemoryView":1075
   15928             :  * 
   15929             :  *     for dim in range(memview.view.ndim):
   15930             :  *         dst.shape[dim] = shape[dim]             # <<<<<<<<<<<<<<
   15931             :  *         dst.strides[dim] = strides[dim]
   15932             :  *         dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1
   15933             :  */
   15934           0 :     (__pyx_v_dst->shape[__pyx_v_dim]) = (__pyx_v_shape[__pyx_v_dim]);
   15935             : 
   15936             :     /* "View.MemoryView":1076
   15937             :  *     for dim in range(memview.view.ndim):
   15938             :  *         dst.shape[dim] = shape[dim]
   15939             :  *         dst.strides[dim] = strides[dim]             # <<<<<<<<<<<<<<
   15940             :  *         dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1
   15941             :  * 
   15942             :  */
   15943           0 :     (__pyx_v_dst->strides[__pyx_v_dim]) = (__pyx_v_strides[__pyx_v_dim]);
   15944             : 
   15945             :     /* "View.MemoryView":1077
   15946             :  *         dst.shape[dim] = shape[dim]
   15947             :  *         dst.strides[dim] = strides[dim]
   15948             :  *         dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1             # <<<<<<<<<<<<<<
   15949             :  * 
   15950             :  * @cname('__pyx_memoryview_copy_object')
   15951             :  */
   15952           0 :     __pyx_t_6 = (__pyx_v_suboffsets != 0);
   15953           0 :     if (__pyx_t_6) {
   15954           0 :       __pyx_t_5 = (__pyx_v_suboffsets[__pyx_v_dim]);
   15955             :     } else {
   15956             :       __pyx_t_5 = -1L;
   15957             :     }
   15958           0 :     (__pyx_v_dst->suboffsets[__pyx_v_dim]) = __pyx_t_5;
   15959             :   }
   15960             : 
   15961             :   /* "View.MemoryView":1063
   15962             :  * 
   15963             :  * @cname('__pyx_memoryview_slice_copy')
   15964             :  * cdef void slice_copy(memoryview memview, __Pyx_memviewslice *dst) noexcept:             # <<<<<<<<<<<<<<
   15965             :  *     cdef int dim
   15966             :  *     cdef (Py_ssize_t*) shape, strides, suboffsets
   15967             :  */
   15968             : 
   15969             :   /* function exit code */
   15970           0 : }
   15971             : 
   15972             : /* "View.MemoryView":1080
   15973             :  * 
   15974             :  * @cname('__pyx_memoryview_copy_object')
   15975             :  * cdef memoryview_copy(memoryview memview):             # <<<<<<<<<<<<<<
   15976             :  *     "Create a new memoryview object"
   15977             :  *     cdef __Pyx_memviewslice memviewslice
   15978             :  */
   15979             : 
   15980           0 : static PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_obj *__pyx_v_memview) {
   15981           0 :   __Pyx_memviewslice __pyx_v_memviewslice;
   15982           0 :   PyObject *__pyx_r = NULL;
   15983             :   __Pyx_RefNannyDeclarations
   15984           0 :   PyObject *__pyx_t_1 = NULL;
   15985           0 :   int __pyx_lineno = 0;
   15986           0 :   const char *__pyx_filename = NULL;
   15987           0 :   int __pyx_clineno = 0;
   15988           0 :   __Pyx_RefNannySetupContext("memoryview_copy", 1);
   15989             : 
   15990             :   /* "View.MemoryView":1083
   15991             :  *     "Create a new memoryview object"
   15992             :  *     cdef __Pyx_memviewslice memviewslice
   15993             :  *     slice_copy(memview, &memviewslice)             # <<<<<<<<<<<<<<
   15994             :  *     return memoryview_copy_from_slice(memview, &memviewslice)
   15995             :  * 
   15996             :  */
   15997           0 :   __pyx_memoryview_slice_copy(__pyx_v_memview, (&__pyx_v_memviewslice));
   15998             : 
   15999             :   /* "View.MemoryView":1084
   16000             :  *     cdef __Pyx_memviewslice memviewslice
   16001             :  *     slice_copy(memview, &memviewslice)
   16002             :  *     return memoryview_copy_from_slice(memview, &memviewslice)             # <<<<<<<<<<<<<<
   16003             :  * 
   16004             :  * @cname('__pyx_memoryview_copy_object_from_slice')
   16005             :  */
   16006           0 :   __Pyx_XDECREF(__pyx_r);
   16007           0 :   __pyx_t_1 = __pyx_memoryview_copy_object_from_slice(__pyx_v_memview, (&__pyx_v_memviewslice)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1084, __pyx_L1_error)
   16008           0 :   __Pyx_GOTREF(__pyx_t_1);
   16009           0 :   __pyx_r = __pyx_t_1;
   16010           0 :   __pyx_t_1 = 0;
   16011           0 :   goto __pyx_L0;
   16012             : 
   16013             :   /* "View.MemoryView":1080
   16014             :  * 
   16015             :  * @cname('__pyx_memoryview_copy_object')
   16016             :  * cdef memoryview_copy(memoryview memview):             # <<<<<<<<<<<<<<
   16017             :  *     "Create a new memoryview object"
   16018             :  *     cdef __Pyx_memviewslice memviewslice
   16019             :  */
   16020             : 
   16021             :   /* function exit code */
   16022           0 :   __pyx_L1_error:;
   16023           0 :   __Pyx_XDECREF(__pyx_t_1);
   16024           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview_copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
   16025           0 :   __pyx_r = 0;
   16026           0 :   __pyx_L0:;
   16027           0 :   __Pyx_XGIVEREF(__pyx_r);
   16028           0 :   __Pyx_RefNannyFinishContext();
   16029           0 :   return __pyx_r;
   16030             : }
   16031             : 
   16032             : /* "View.MemoryView":1087
   16033             :  * 
   16034             :  * @cname('__pyx_memoryview_copy_object_from_slice')
   16035             :  * cdef memoryview_copy_from_slice(memoryview memview, __Pyx_memviewslice *memviewslice):             # <<<<<<<<<<<<<<
   16036             :  *     """
   16037             :  *     Create a new memoryview object from a given memoryview object and slice.
   16038             :  */
   16039             : 
   16040           0 : static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_memviewslice) {
   16041           0 :   PyObject *(*__pyx_v_to_object_func)(char *);
   16042           0 :   int (*__pyx_v_to_dtype_func)(char *, PyObject *);
   16043           0 :   PyObject *__pyx_r = NULL;
   16044             :   __Pyx_RefNannyDeclarations
   16045           0 :   int __pyx_t_1;
   16046           0 :   PyObject *(*__pyx_t_2)(char *);
   16047           0 :   int (*__pyx_t_3)(char *, PyObject *);
   16048           0 :   PyObject *__pyx_t_4 = NULL;
   16049           0 :   int __pyx_lineno = 0;
   16050           0 :   const char *__pyx_filename = NULL;
   16051           0 :   int __pyx_clineno = 0;
   16052           0 :   __Pyx_RefNannySetupContext("memoryview_copy_from_slice", 1);
   16053             : 
   16054             :   /* "View.MemoryView":1094
   16055             :  *     cdef int (*to_dtype_func)(char *, object) except 0
   16056             :  * 
   16057             :  *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
   16058             :  *         to_object_func = (<_memoryviewslice> memview).to_object_func
   16059             :  *         to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
   16060             :  */
   16061           0 :   __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type); 
   16062           0 :   if (__pyx_t_1) {
   16063             : 
   16064             :     /* "View.MemoryView":1095
   16065             :  * 
   16066             :  *     if isinstance(memview, _memoryviewslice):
   16067             :  *         to_object_func = (<_memoryviewslice> memview).to_object_func             # <<<<<<<<<<<<<<
   16068             :  *         to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
   16069             :  *     else:
   16070             :  */
   16071           0 :     __pyx_t_2 = ((struct __pyx_memoryviewslice_obj *)__pyx_v_memview)->to_object_func;
   16072           0 :     __pyx_v_to_object_func = __pyx_t_2;
   16073             : 
   16074             :     /* "View.MemoryView":1096
   16075             :  *     if isinstance(memview, _memoryviewslice):
   16076             :  *         to_object_func = (<_memoryviewslice> memview).to_object_func
   16077             :  *         to_dtype_func = (<_memoryviewslice> memview).to_dtype_func             # <<<<<<<<<<<<<<
   16078             :  *     else:
   16079             :  *         to_object_func = NULL
   16080             :  */
   16081           0 :     __pyx_t_3 = ((struct __pyx_memoryviewslice_obj *)__pyx_v_memview)->to_dtype_func;
   16082           0 :     __pyx_v_to_dtype_func = __pyx_t_3;
   16083             : 
   16084             :     /* "View.MemoryView":1094
   16085             :  *     cdef int (*to_dtype_func)(char *, object) except 0
   16086             :  * 
   16087             :  *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
   16088             :  *         to_object_func = (<_memoryviewslice> memview).to_object_func
   16089             :  *         to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
   16090             :  */
   16091           0 :     goto __pyx_L3;
   16092             :   }
   16093             : 
   16094             :   /* "View.MemoryView":1098
   16095             :  *         to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
   16096             :  *     else:
   16097             :  *         to_object_func = NULL             # <<<<<<<<<<<<<<
   16098             :  *         to_dtype_func = NULL
   16099             :  * 
   16100             :  */
   16101             :   /*else*/ {
   16102             :     __pyx_v_to_object_func = NULL;
   16103             : 
   16104             :     /* "View.MemoryView":1099
   16105             :  *     else:
   16106             :  *         to_object_func = NULL
   16107             :  *         to_dtype_func = NULL             # <<<<<<<<<<<<<<
   16108             :  * 
   16109             :  *     return memoryview_fromslice(memviewslice[0], memview.view.ndim,
   16110             :  */
   16111             :     __pyx_v_to_dtype_func = NULL;
   16112             :   }
   16113           0 :   __pyx_L3:;
   16114             : 
   16115             :   /* "View.MemoryView":1101
   16116             :  *         to_dtype_func = NULL
   16117             :  * 
   16118             :  *     return memoryview_fromslice(memviewslice[0], memview.view.ndim,             # <<<<<<<<<<<<<<
   16119             :  *                                 to_object_func, to_dtype_func,
   16120             :  *                                 memview.dtype_is_object)
   16121             :  */
   16122           0 :   __Pyx_XDECREF(__pyx_r);
   16123             : 
   16124             :   /* "View.MemoryView":1103
   16125             :  *     return memoryview_fromslice(memviewslice[0], memview.view.ndim,
   16126             :  *                                 to_object_func, to_dtype_func,
   16127             :  *                                 memview.dtype_is_object)             # <<<<<<<<<<<<<<
   16128             :  * 
   16129             :  * 
   16130             :  */
   16131           0 :   __pyx_t_4 = __pyx_memoryview_fromslice((__pyx_v_memviewslice[0]), __pyx_v_memview->view.ndim, __pyx_v_to_object_func, __pyx_v_to_dtype_func, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1101, __pyx_L1_error)
   16132           0 :   __Pyx_GOTREF(__pyx_t_4);
   16133           0 :   __pyx_r = __pyx_t_4;
   16134           0 :   __pyx_t_4 = 0;
   16135           0 :   goto __pyx_L0;
   16136             : 
   16137             :   /* "View.MemoryView":1087
   16138             :  * 
   16139             :  * @cname('__pyx_memoryview_copy_object_from_slice')
   16140             :  * cdef memoryview_copy_from_slice(memoryview memview, __Pyx_memviewslice *memviewslice):             # <<<<<<<<<<<<<<
   16141             :  *     """
   16142             :  *     Create a new memoryview object from a given memoryview object and slice.
   16143             :  */
   16144             : 
   16145             :   /* function exit code */
   16146           0 :   __pyx_L1_error:;
   16147           0 :   __Pyx_XDECREF(__pyx_t_4);
   16148           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview_copy_from_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
   16149           0 :   __pyx_r = 0;
   16150           0 :   __pyx_L0:;
   16151           0 :   __Pyx_XGIVEREF(__pyx_r);
   16152           0 :   __Pyx_RefNannyFinishContext();
   16153           0 :   return __pyx_r;
   16154             : }
   16155             : 
   16156             : /* "View.MemoryView":1109
   16157             :  * 
   16158             :  * 
   16159             :  * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) noexcept nogil:             # <<<<<<<<<<<<<<
   16160             :  *     return -arg if arg < 0 else arg
   16161             :  * 
   16162             :  */
   16163             : 
   16164           0 : static Py_ssize_t abs_py_ssize_t(Py_ssize_t __pyx_v_arg) {
   16165           0 :   Py_ssize_t __pyx_r;
   16166           0 :   Py_ssize_t __pyx_t_1;
   16167           0 :   int __pyx_t_2;
   16168             : 
   16169             :   /* "View.MemoryView":1110
   16170             :  * 
   16171             :  * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) noexcept nogil:
   16172             :  *     return -arg if arg < 0 else arg             # <<<<<<<<<<<<<<
   16173             :  * 
   16174             :  * @cname('__pyx_get_best_slice_order')
   16175             :  */
   16176           0 :   __pyx_t_2 = (__pyx_v_arg < 0);
   16177           0 :   if (__pyx_t_2) {
   16178             :     __pyx_t_1 = (-__pyx_v_arg);
   16179             :   } else {
   16180             :     __pyx_t_1 = __pyx_v_arg;
   16181             :   }
   16182           0 :   __pyx_r = __pyx_t_1;
   16183           0 :   goto __pyx_L0;
   16184             : 
   16185             :   /* "View.MemoryView":1109
   16186             :  * 
   16187             :  * 
   16188             :  * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) noexcept nogil:             # <<<<<<<<<<<<<<
   16189             :  *     return -arg if arg < 0 else arg
   16190             :  * 
   16191             :  */
   16192             : 
   16193             :   /* function exit code */
   16194           0 :   __pyx_L0:;
   16195           0 :   return __pyx_r;
   16196             : }
   16197             : 
   16198             : /* "View.MemoryView":1113
   16199             :  * 
   16200             :  * @cname('__pyx_get_best_slice_order')
   16201             :  * cdef char get_best_order(__Pyx_memviewslice *mslice, int ndim) noexcept nogil:             # <<<<<<<<<<<<<<
   16202             :  *     """
   16203             :  *     Figure out the best memory access order for a given slice.
   16204             :  */
   16205             : 
   16206           0 : static char __pyx_get_best_slice_order(__Pyx_memviewslice *__pyx_v_mslice, int __pyx_v_ndim) {
   16207           0 :   int __pyx_v_i;
   16208           0 :   Py_ssize_t __pyx_v_c_stride;
   16209           0 :   Py_ssize_t __pyx_v_f_stride;
   16210           0 :   char __pyx_r;
   16211           0 :   int __pyx_t_1;
   16212           0 :   int __pyx_t_2;
   16213           0 :   int __pyx_t_3;
   16214           0 :   int __pyx_t_4;
   16215             : 
   16216             :   /* "View.MemoryView":1118
   16217             :  *     """
   16218             :  *     cdef int i
   16219             :  *     cdef Py_ssize_t c_stride = 0             # <<<<<<<<<<<<<<
   16220             :  *     cdef Py_ssize_t f_stride = 0
   16221             :  * 
   16222             :  */
   16223           0 :   __pyx_v_c_stride = 0;
   16224             : 
   16225             :   /* "View.MemoryView":1119
   16226             :  *     cdef int i
   16227             :  *     cdef Py_ssize_t c_stride = 0
   16228             :  *     cdef Py_ssize_t f_stride = 0             # <<<<<<<<<<<<<<
   16229             :  * 
   16230             :  *     for i in range(ndim - 1, -1, -1):
   16231             :  */
   16232           0 :   __pyx_v_f_stride = 0;
   16233             : 
   16234             :   /* "View.MemoryView":1121
   16235             :  *     cdef Py_ssize_t f_stride = 0
   16236             :  * 
   16237             :  *     for i in range(ndim - 1, -1, -1):             # <<<<<<<<<<<<<<
   16238             :  *         if mslice.shape[i] > 1:
   16239             :  *             c_stride = mslice.strides[i]
   16240             :  */
   16241           0 :   for (__pyx_t_1 = (__pyx_v_ndim - 1); __pyx_t_1 > -1; __pyx_t_1-=1) {
   16242           0 :     __pyx_v_i = __pyx_t_1;
   16243             : 
   16244             :     /* "View.MemoryView":1122
   16245             :  * 
   16246             :  *     for i in range(ndim - 1, -1, -1):
   16247             :  *         if mslice.shape[i] > 1:             # <<<<<<<<<<<<<<
   16248             :  *             c_stride = mslice.strides[i]
   16249             :  *             break
   16250             :  */
   16251           0 :     __pyx_t_2 = ((__pyx_v_mslice->shape[__pyx_v_i]) > 1);
   16252           0 :     if (__pyx_t_2) {
   16253             : 
   16254             :       /* "View.MemoryView":1123
   16255             :  *     for i in range(ndim - 1, -1, -1):
   16256             :  *         if mslice.shape[i] > 1:
   16257             :  *             c_stride = mslice.strides[i]             # <<<<<<<<<<<<<<
   16258             :  *             break
   16259             :  * 
   16260             :  */
   16261           0 :       __pyx_v_c_stride = (__pyx_v_mslice->strides[__pyx_v_i]);
   16262             : 
   16263             :       /* "View.MemoryView":1124
   16264             :  *         if mslice.shape[i] > 1:
   16265             :  *             c_stride = mslice.strides[i]
   16266             :  *             break             # <<<<<<<<<<<<<<
   16267             :  * 
   16268             :  *     for i in range(ndim):
   16269             :  */
   16270           0 :       goto __pyx_L4_break;
   16271             : 
   16272             :       /* "View.MemoryView":1122
   16273             :  * 
   16274             :  *     for i in range(ndim - 1, -1, -1):
   16275             :  *         if mslice.shape[i] > 1:             # <<<<<<<<<<<<<<
   16276             :  *             c_stride = mslice.strides[i]
   16277             :  *             break
   16278             :  */
   16279             :     }
   16280             :   }
   16281           0 :   __pyx_L4_break:;
   16282             : 
   16283             :   /* "View.MemoryView":1126
   16284             :  *             break
   16285             :  * 
   16286             :  *     for i in range(ndim):             # <<<<<<<<<<<<<<
   16287             :  *         if mslice.shape[i] > 1:
   16288             :  *             f_stride = mslice.strides[i]
   16289             :  */
   16290           0 :   __pyx_t_1 = __pyx_v_ndim;
   16291           0 :   __pyx_t_3 = __pyx_t_1;
   16292           0 :   for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
   16293           0 :     __pyx_v_i = __pyx_t_4;
   16294             : 
   16295             :     /* "View.MemoryView":1127
   16296             :  * 
   16297             :  *     for i in range(ndim):
   16298             :  *         if mslice.shape[i] > 1:             # <<<<<<<<<<<<<<
   16299             :  *             f_stride = mslice.strides[i]
   16300             :  *             break
   16301             :  */
   16302           0 :     __pyx_t_2 = ((__pyx_v_mslice->shape[__pyx_v_i]) > 1);
   16303           0 :     if (__pyx_t_2) {
   16304             : 
   16305             :       /* "View.MemoryView":1128
   16306             :  *     for i in range(ndim):
   16307             :  *         if mslice.shape[i] > 1:
   16308             :  *             f_stride = mslice.strides[i]             # <<<<<<<<<<<<<<
   16309             :  *             break
   16310             :  * 
   16311             :  */
   16312           0 :       __pyx_v_f_stride = (__pyx_v_mslice->strides[__pyx_v_i]);
   16313             : 
   16314             :       /* "View.MemoryView":1129
   16315             :  *         if mslice.shape[i] > 1:
   16316             :  *             f_stride = mslice.strides[i]
   16317             :  *             break             # <<<<<<<<<<<<<<
   16318             :  * 
   16319             :  *     if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):
   16320             :  */
   16321           0 :       goto __pyx_L7_break;
   16322             : 
   16323             :       /* "View.MemoryView":1127
   16324             :  * 
   16325             :  *     for i in range(ndim):
   16326             :  *         if mslice.shape[i] > 1:             # <<<<<<<<<<<<<<
   16327             :  *             f_stride = mslice.strides[i]
   16328             :  *             break
   16329             :  */
   16330             :     }
   16331             :   }
   16332           0 :   __pyx_L7_break:;
   16333             : 
   16334             :   /* "View.MemoryView":1131
   16335             :  *             break
   16336             :  * 
   16337             :  *     if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):             # <<<<<<<<<<<<<<
   16338             :  *         return 'C'
   16339             :  *     else:
   16340             :  */
   16341           0 :   __pyx_t_2 = (abs_py_ssize_t(__pyx_v_c_stride) <= abs_py_ssize_t(__pyx_v_f_stride));
   16342           0 :   if (__pyx_t_2) {
   16343             : 
   16344             :     /* "View.MemoryView":1132
   16345             :  * 
   16346             :  *     if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):
   16347             :  *         return 'C'             # <<<<<<<<<<<<<<
   16348             :  *     else:
   16349             :  *         return 'F'
   16350             :  */
   16351           0 :     __pyx_r = 'C';
   16352           0 :     goto __pyx_L0;
   16353             : 
   16354             :     /* "View.MemoryView":1131
   16355             :  *             break
   16356             :  * 
   16357             :  *     if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):             # <<<<<<<<<<<<<<
   16358             :  *         return 'C'
   16359             :  *     else:
   16360             :  */
   16361             :   }
   16362             : 
   16363             :   /* "View.MemoryView":1134
   16364             :  *         return 'C'
   16365             :  *     else:
   16366             :  *         return 'F'             # <<<<<<<<<<<<<<
   16367             :  * 
   16368             :  * @cython.cdivision(True)
   16369             :  */
   16370             :   /*else*/ {
   16371           0 :     __pyx_r = 'F';
   16372           0 :     goto __pyx_L0;
   16373             :   }
   16374             : 
   16375             :   /* "View.MemoryView":1113
   16376             :  * 
   16377             :  * @cname('__pyx_get_best_slice_order')
   16378             :  * cdef char get_best_order(__Pyx_memviewslice *mslice, int ndim) noexcept nogil:             # <<<<<<<<<<<<<<
   16379             :  *     """
   16380             :  *     Figure out the best memory access order for a given slice.
   16381             :  */
   16382             : 
   16383             :   /* function exit code */
   16384           0 :   __pyx_L0:;
   16385           0 :   return __pyx_r;
   16386             : }
   16387             : 
   16388             : /* "View.MemoryView":1137
   16389             :  * 
   16390             :  * @cython.cdivision(True)
   16391             :  * cdef void _copy_strided_to_strided(char *src_data, Py_ssize_t *src_strides,             # <<<<<<<<<<<<<<
   16392             :  *                                    char *dst_data, Py_ssize_t *dst_strides,
   16393             :  *                                    Py_ssize_t *src_shape, Py_ssize_t *dst_shape,
   16394             :  */
   16395             : 
   16396           0 : static void _copy_strided_to_strided(char *__pyx_v_src_data, Py_ssize_t *__pyx_v_src_strides, char *__pyx_v_dst_data, Py_ssize_t *__pyx_v_dst_strides, Py_ssize_t *__pyx_v_src_shape, Py_ssize_t *__pyx_v_dst_shape, int __pyx_v_ndim, size_t __pyx_v_itemsize) {
   16397           0 :   CYTHON_UNUSED Py_ssize_t __pyx_v_i;
   16398           0 :   CYTHON_UNUSED Py_ssize_t __pyx_v_src_extent;
   16399           0 :   Py_ssize_t __pyx_v_dst_extent;
   16400           0 :   Py_ssize_t __pyx_v_src_stride;
   16401           0 :   Py_ssize_t __pyx_v_dst_stride;
   16402           0 :   int __pyx_t_1;
   16403           0 :   int __pyx_t_2;
   16404           0 :   Py_ssize_t __pyx_t_3;
   16405           0 :   Py_ssize_t __pyx_t_4;
   16406           0 :   Py_ssize_t __pyx_t_5;
   16407             : 
   16408             :   /* "View.MemoryView":1144
   16409             :  * 
   16410             :  *     cdef Py_ssize_t i
   16411             :  *     cdef Py_ssize_t src_extent = src_shape[0]             # <<<<<<<<<<<<<<
   16412             :  *     cdef Py_ssize_t dst_extent = dst_shape[0]
   16413             :  *     cdef Py_ssize_t src_stride = src_strides[0]
   16414             :  */
   16415           0 :   __pyx_v_src_extent = (__pyx_v_src_shape[0]);
   16416             : 
   16417             :   /* "View.MemoryView":1145
   16418             :  *     cdef Py_ssize_t i
   16419             :  *     cdef Py_ssize_t src_extent = src_shape[0]
   16420             :  *     cdef Py_ssize_t dst_extent = dst_shape[0]             # <<<<<<<<<<<<<<
   16421             :  *     cdef Py_ssize_t src_stride = src_strides[0]
   16422             :  *     cdef Py_ssize_t dst_stride = dst_strides[0]
   16423             :  */
   16424           0 :   __pyx_v_dst_extent = (__pyx_v_dst_shape[0]);
   16425             : 
   16426             :   /* "View.MemoryView":1146
   16427             :  *     cdef Py_ssize_t src_extent = src_shape[0]
   16428             :  *     cdef Py_ssize_t dst_extent = dst_shape[0]
   16429             :  *     cdef Py_ssize_t src_stride = src_strides[0]             # <<<<<<<<<<<<<<
   16430             :  *     cdef Py_ssize_t dst_stride = dst_strides[0]
   16431             :  * 
   16432             :  */
   16433           0 :   __pyx_v_src_stride = (__pyx_v_src_strides[0]);
   16434             : 
   16435             :   /* "View.MemoryView":1147
   16436             :  *     cdef Py_ssize_t dst_extent = dst_shape[0]
   16437             :  *     cdef Py_ssize_t src_stride = src_strides[0]
   16438             :  *     cdef Py_ssize_t dst_stride = dst_strides[0]             # <<<<<<<<<<<<<<
   16439             :  * 
   16440             :  *     if ndim == 1:
   16441             :  */
   16442           0 :   __pyx_v_dst_stride = (__pyx_v_dst_strides[0]);
   16443             : 
   16444             :   /* "View.MemoryView":1149
   16445             :  *     cdef Py_ssize_t dst_stride = dst_strides[0]
   16446             :  * 
   16447             :  *     if ndim == 1:             # <<<<<<<<<<<<<<
   16448             :  *         if (src_stride > 0 and dst_stride > 0 and
   16449             :  *             <size_t> src_stride == itemsize == <size_t> dst_stride):
   16450             :  */
   16451           0 :   __pyx_t_1 = (__pyx_v_ndim == 1);
   16452           0 :   if (__pyx_t_1) {
   16453             : 
   16454             :     /* "View.MemoryView":1150
   16455             :  * 
   16456             :  *     if ndim == 1:
   16457             :  *         if (src_stride > 0 and dst_stride > 0 and             # <<<<<<<<<<<<<<
   16458             :  *             <size_t> src_stride == itemsize == <size_t> dst_stride):
   16459             :  *             memcpy(dst_data, src_data, itemsize * dst_extent)
   16460             :  */
   16461           0 :     __pyx_t_2 = (__pyx_v_src_stride > 0);
   16462           0 :     if (__pyx_t_2) {
   16463           0 :     } else {
   16464           0 :       __pyx_t_1 = __pyx_t_2;
   16465           0 :       goto __pyx_L5_bool_binop_done;
   16466             :     }
   16467           0 :     __pyx_t_2 = (__pyx_v_dst_stride > 0);
   16468           0 :     if (__pyx_t_2) {
   16469           0 :     } else {
   16470           0 :       __pyx_t_1 = __pyx_t_2;
   16471           0 :       goto __pyx_L5_bool_binop_done;
   16472             :     }
   16473             : 
   16474             :     /* "View.MemoryView":1151
   16475             :  *     if ndim == 1:
   16476             :  *         if (src_stride > 0 and dst_stride > 0 and
   16477             :  *             <size_t> src_stride == itemsize == <size_t> dst_stride):             # <<<<<<<<<<<<<<
   16478             :  *             memcpy(dst_data, src_data, itemsize * dst_extent)
   16479             :  *         else:
   16480             :  */
   16481           0 :     __pyx_t_2 = (((size_t)__pyx_v_src_stride) == __pyx_v_itemsize);
   16482           0 :     if (__pyx_t_2) {
   16483           0 :       __pyx_t_2 = (__pyx_v_itemsize == ((size_t)__pyx_v_dst_stride));
   16484             :     }
   16485             :     __pyx_t_1 = __pyx_t_2;
   16486           0 :     __pyx_L5_bool_binop_done:;
   16487             : 
   16488             :     /* "View.MemoryView":1150
   16489             :  * 
   16490             :  *     if ndim == 1:
   16491             :  *         if (src_stride > 0 and dst_stride > 0 and             # <<<<<<<<<<<<<<
   16492             :  *             <size_t> src_stride == itemsize == <size_t> dst_stride):
   16493             :  *             memcpy(dst_data, src_data, itemsize * dst_extent)
   16494             :  */
   16495           0 :     if (__pyx_t_1) {
   16496             : 
   16497             :       /* "View.MemoryView":1152
   16498             :  *         if (src_stride > 0 and dst_stride > 0 and
   16499             :  *             <size_t> src_stride == itemsize == <size_t> dst_stride):
   16500             :  *             memcpy(dst_data, src_data, itemsize * dst_extent)             # <<<<<<<<<<<<<<
   16501             :  *         else:
   16502             :  *             for i in range(dst_extent):
   16503             :  */
   16504           0 :       (void)(memcpy(__pyx_v_dst_data, __pyx_v_src_data, (__pyx_v_itemsize * __pyx_v_dst_extent)));
   16505             : 
   16506             :       /* "View.MemoryView":1150
   16507             :  * 
   16508             :  *     if ndim == 1:
   16509             :  *         if (src_stride > 0 and dst_stride > 0 and             # <<<<<<<<<<<<<<
   16510             :  *             <size_t> src_stride == itemsize == <size_t> dst_stride):
   16511             :  *             memcpy(dst_data, src_data, itemsize * dst_extent)
   16512             :  */
   16513           0 :       goto __pyx_L4;
   16514             :     }
   16515             : 
   16516             :     /* "View.MemoryView":1154
   16517             :  *             memcpy(dst_data, src_data, itemsize * dst_extent)
   16518             :  *         else:
   16519             :  *             for i in range(dst_extent):             # <<<<<<<<<<<<<<
   16520             :  *                 memcpy(dst_data, src_data, itemsize)
   16521             :  *                 src_data += src_stride
   16522             :  */
   16523             :     /*else*/ {
   16524             :       __pyx_t_3 = __pyx_v_dst_extent;
   16525             :       __pyx_t_4 = __pyx_t_3;
   16526           0 :       for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
   16527           0 :         __pyx_v_i = __pyx_t_5;
   16528             : 
   16529             :         /* "View.MemoryView":1155
   16530             :  *         else:
   16531             :  *             for i in range(dst_extent):
   16532             :  *                 memcpy(dst_data, src_data, itemsize)             # <<<<<<<<<<<<<<
   16533             :  *                 src_data += src_stride
   16534             :  *                 dst_data += dst_stride
   16535             :  */
   16536           0 :         (void)(memcpy(__pyx_v_dst_data, __pyx_v_src_data, __pyx_v_itemsize));
   16537             : 
   16538             :         /* "View.MemoryView":1156
   16539             :  *             for i in range(dst_extent):
   16540             :  *                 memcpy(dst_data, src_data, itemsize)
   16541             :  *                 src_data += src_stride             # <<<<<<<<<<<<<<
   16542             :  *                 dst_data += dst_stride
   16543             :  *     else:
   16544             :  */
   16545           0 :         __pyx_v_src_data = (__pyx_v_src_data + __pyx_v_src_stride);
   16546             : 
   16547             :         /* "View.MemoryView":1157
   16548             :  *                 memcpy(dst_data, src_data, itemsize)
   16549             :  *                 src_data += src_stride
   16550             :  *                 dst_data += dst_stride             # <<<<<<<<<<<<<<
   16551             :  *     else:
   16552             :  *         for i in range(dst_extent):
   16553             :  */
   16554           0 :         __pyx_v_dst_data = (__pyx_v_dst_data + __pyx_v_dst_stride);
   16555             :       }
   16556             :     }
   16557           0 :     __pyx_L4:;
   16558             : 
   16559             :     /* "View.MemoryView":1149
   16560             :  *     cdef Py_ssize_t dst_stride = dst_strides[0]
   16561             :  * 
   16562             :  *     if ndim == 1:             # <<<<<<<<<<<<<<
   16563             :  *         if (src_stride > 0 and dst_stride > 0 and
   16564             :  *             <size_t> src_stride == itemsize == <size_t> dst_stride):
   16565             :  */
   16566           0 :     goto __pyx_L3;
   16567             :   }
   16568             : 
   16569             :   /* "View.MemoryView":1159
   16570             :  *                 dst_data += dst_stride
   16571             :  *     else:
   16572             :  *         for i in range(dst_extent):             # <<<<<<<<<<<<<<
   16573             :  *             _copy_strided_to_strided(src_data, src_strides + 1,
   16574             :  *                                      dst_data, dst_strides + 1,
   16575             :  */
   16576             :   /*else*/ {
   16577             :     __pyx_t_3 = __pyx_v_dst_extent;
   16578             :     __pyx_t_4 = __pyx_t_3;
   16579           0 :     for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
   16580           0 :       __pyx_v_i = __pyx_t_5;
   16581             : 
   16582             :       /* "View.MemoryView":1160
   16583             :  *     else:
   16584             :  *         for i in range(dst_extent):
   16585             :  *             _copy_strided_to_strided(src_data, src_strides + 1,             # <<<<<<<<<<<<<<
   16586             :  *                                      dst_data, dst_strides + 1,
   16587             :  *                                      src_shape + 1, dst_shape + 1,
   16588             :  */
   16589           0 :       _copy_strided_to_strided(__pyx_v_src_data, (__pyx_v_src_strides + 1), __pyx_v_dst_data, (__pyx_v_dst_strides + 1), (__pyx_v_src_shape + 1), (__pyx_v_dst_shape + 1), (__pyx_v_ndim - 1), __pyx_v_itemsize);
   16590             : 
   16591             :       /* "View.MemoryView":1164
   16592             :  *                                      src_shape + 1, dst_shape + 1,
   16593             :  *                                      ndim - 1, itemsize)
   16594             :  *             src_data += src_stride             # <<<<<<<<<<<<<<
   16595             :  *             dst_data += dst_stride
   16596             :  * 
   16597             :  */
   16598           0 :       __pyx_v_src_data = (__pyx_v_src_data + __pyx_v_src_stride);
   16599             : 
   16600             :       /* "View.MemoryView":1165
   16601             :  *                                      ndim - 1, itemsize)
   16602             :  *             src_data += src_stride
   16603             :  *             dst_data += dst_stride             # <<<<<<<<<<<<<<
   16604             :  * 
   16605             :  * cdef void copy_strided_to_strided(__Pyx_memviewslice *src,
   16606             :  */
   16607           0 :       __pyx_v_dst_data = (__pyx_v_dst_data + __pyx_v_dst_stride);
   16608             :     }
   16609             :   }
   16610           0 :   __pyx_L3:;
   16611             : 
   16612             :   /* "View.MemoryView":1137
   16613             :  * 
   16614             :  * @cython.cdivision(True)
   16615             :  * cdef void _copy_strided_to_strided(char *src_data, Py_ssize_t *src_strides,             # <<<<<<<<<<<<<<
   16616             :  *                                    char *dst_data, Py_ssize_t *dst_strides,
   16617             :  *                                    Py_ssize_t *src_shape, Py_ssize_t *dst_shape,
   16618             :  */
   16619             : 
   16620             :   /* function exit code */
   16621           0 : }
   16622             : 
   16623             : /* "View.MemoryView":1167
   16624             :  *             dst_data += dst_stride
   16625             :  * 
   16626             :  * cdef void copy_strided_to_strided(__Pyx_memviewslice *src,             # <<<<<<<<<<<<<<
   16627             :  *                                   __Pyx_memviewslice *dst,
   16628             :  *                                   int ndim, size_t itemsize) noexcept nogil:
   16629             :  */
   16630             : 
   16631           0 : static void copy_strided_to_strided(__Pyx_memviewslice *__pyx_v_src, __Pyx_memviewslice *__pyx_v_dst, int __pyx_v_ndim, size_t __pyx_v_itemsize) {
   16632             : 
   16633             :   /* "View.MemoryView":1170
   16634             :  *                                   __Pyx_memviewslice *dst,
   16635             :  *                                   int ndim, size_t itemsize) noexcept nogil:
   16636             :  *     _copy_strided_to_strided(src.data, src.strides, dst.data, dst.strides,             # <<<<<<<<<<<<<<
   16637             :  *                              src.shape, dst.shape, ndim, itemsize)
   16638             :  * 
   16639             :  */
   16640           0 :   _copy_strided_to_strided(__pyx_v_src->data, __pyx_v_src->strides, __pyx_v_dst->data, __pyx_v_dst->strides, __pyx_v_src->shape, __pyx_v_dst->shape, __pyx_v_ndim, __pyx_v_itemsize);
   16641             : 
   16642             :   /* "View.MemoryView":1167
   16643             :  *             dst_data += dst_stride
   16644             :  * 
   16645             :  * cdef void copy_strided_to_strided(__Pyx_memviewslice *src,             # <<<<<<<<<<<<<<
   16646             :  *                                   __Pyx_memviewslice *dst,
   16647             :  *                                   int ndim, size_t itemsize) noexcept nogil:
   16648             :  */
   16649             : 
   16650             :   /* function exit code */
   16651           0 : }
   16652             : 
   16653             : /* "View.MemoryView":1174
   16654             :  * 
   16655             :  * @cname('__pyx_memoryview_slice_get_size')
   16656             :  * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) noexcept nogil:             # <<<<<<<<<<<<<<
   16657             :  *     "Return the size of the memory occupied by the slice in number of bytes"
   16658             :  *     cdef Py_ssize_t shape, size = src.memview.view.itemsize
   16659             :  */
   16660             : 
   16661           0 : static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *__pyx_v_src, int __pyx_v_ndim) {
   16662           0 :   Py_ssize_t __pyx_v_shape;
   16663           0 :   Py_ssize_t __pyx_v_size;
   16664           0 :   Py_ssize_t __pyx_r;
   16665           0 :   Py_ssize_t __pyx_t_1;
   16666           0 :   Py_ssize_t *__pyx_t_2;
   16667           0 :   Py_ssize_t *__pyx_t_3;
   16668           0 :   Py_ssize_t *__pyx_t_4;
   16669             : 
   16670             :   /* "View.MemoryView":1176
   16671             :  * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) noexcept nogil:
   16672             :  *     "Return the size of the memory occupied by the slice in number of bytes"
   16673             :  *     cdef Py_ssize_t shape, size = src.memview.view.itemsize             # <<<<<<<<<<<<<<
   16674             :  * 
   16675             :  *     for shape in src.shape[:ndim]:
   16676             :  */
   16677           0 :   __pyx_t_1 = __pyx_v_src->memview->view.itemsize;
   16678           0 :   __pyx_v_size = __pyx_t_1;
   16679             : 
   16680             :   /* "View.MemoryView":1178
   16681             :  *     cdef Py_ssize_t shape, size = src.memview.view.itemsize
   16682             :  * 
   16683             :  *     for shape in src.shape[:ndim]:             # <<<<<<<<<<<<<<
   16684             :  *         size *= shape
   16685             :  * 
   16686             :  */
   16687           0 :   __pyx_t_3 = (__pyx_v_src->shape + __pyx_v_ndim);
   16688           0 :   for (__pyx_t_4 = __pyx_v_src->shape; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) {
   16689           0 :     __pyx_t_2 = __pyx_t_4;
   16690           0 :     __pyx_v_shape = (__pyx_t_2[0]);
   16691             : 
   16692             :     /* "View.MemoryView":1179
   16693             :  * 
   16694             :  *     for shape in src.shape[:ndim]:
   16695             :  *         size *= shape             # <<<<<<<<<<<<<<
   16696             :  * 
   16697             :  *     return size
   16698             :  */
   16699           0 :     __pyx_v_size = (__pyx_v_size * __pyx_v_shape);
   16700             :   }
   16701             : 
   16702             :   /* "View.MemoryView":1181
   16703             :  *         size *= shape
   16704             :  * 
   16705             :  *     return size             # <<<<<<<<<<<<<<
   16706             :  * 
   16707             :  * @cname('__pyx_fill_contig_strides_array')
   16708             :  */
   16709           0 :   __pyx_r = __pyx_v_size;
   16710           0 :   goto __pyx_L0;
   16711             : 
   16712             :   /* "View.MemoryView":1174
   16713             :  * 
   16714             :  * @cname('__pyx_memoryview_slice_get_size')
   16715             :  * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) noexcept nogil:             # <<<<<<<<<<<<<<
   16716             :  *     "Return the size of the memory occupied by the slice in number of bytes"
   16717             :  *     cdef Py_ssize_t shape, size = src.memview.view.itemsize
   16718             :  */
   16719             : 
   16720             :   /* function exit code */
   16721           0 :   __pyx_L0:;
   16722           0 :   return __pyx_r;
   16723             : }
   16724             : 
   16725             : /* "View.MemoryView":1184
   16726             :  * 
   16727             :  * @cname('__pyx_fill_contig_strides_array')
   16728             :  * cdef Py_ssize_t fill_contig_strides_array(             # <<<<<<<<<<<<<<
   16729             :  *                 Py_ssize_t *shape, Py_ssize_t *strides, Py_ssize_t stride,
   16730             :  *                 int ndim, char order) noexcept nogil:
   16731             :  */
   16732             : 
   16733           0 : static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, Py_ssize_t __pyx_v_stride, int __pyx_v_ndim, char __pyx_v_order) {
   16734           0 :   int __pyx_v_idx;
   16735           0 :   Py_ssize_t __pyx_r;
   16736           0 :   int __pyx_t_1;
   16737           0 :   int __pyx_t_2;
   16738           0 :   int __pyx_t_3;
   16739           0 :   int __pyx_t_4;
   16740             : 
   16741             :   /* "View.MemoryView":1193
   16742             :  *     cdef int idx
   16743             :  * 
   16744             :  *     if order == 'F':             # <<<<<<<<<<<<<<
   16745             :  *         for idx in range(ndim):
   16746             :  *             strides[idx] = stride
   16747             :  */
   16748           0 :   __pyx_t_1 = (__pyx_v_order == 'F');
   16749           0 :   if (__pyx_t_1) {
   16750             : 
   16751             :     /* "View.MemoryView":1194
   16752             :  * 
   16753             :  *     if order == 'F':
   16754             :  *         for idx in range(ndim):             # <<<<<<<<<<<<<<
   16755             :  *             strides[idx] = stride
   16756             :  *             stride *= shape[idx]
   16757             :  */
   16758           0 :     __pyx_t_2 = __pyx_v_ndim;
   16759             :     __pyx_t_3 = __pyx_t_2;
   16760           0 :     for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
   16761           0 :       __pyx_v_idx = __pyx_t_4;
   16762             : 
   16763             :       /* "View.MemoryView":1195
   16764             :  *     if order == 'F':
   16765             :  *         for idx in range(ndim):
   16766             :  *             strides[idx] = stride             # <<<<<<<<<<<<<<
   16767             :  *             stride *= shape[idx]
   16768             :  *     else:
   16769             :  */
   16770           0 :       (__pyx_v_strides[__pyx_v_idx]) = __pyx_v_stride;
   16771             : 
   16772             :       /* "View.MemoryView":1196
   16773             :  *         for idx in range(ndim):
   16774             :  *             strides[idx] = stride
   16775             :  *             stride *= shape[idx]             # <<<<<<<<<<<<<<
   16776             :  *     else:
   16777             :  *         for idx in range(ndim - 1, -1, -1):
   16778             :  */
   16779           0 :       __pyx_v_stride = (__pyx_v_stride * (__pyx_v_shape[__pyx_v_idx]));
   16780             :     }
   16781             : 
   16782             :     /* "View.MemoryView":1193
   16783             :  *     cdef int idx
   16784             :  * 
   16785             :  *     if order == 'F':             # <<<<<<<<<<<<<<
   16786             :  *         for idx in range(ndim):
   16787             :  *             strides[idx] = stride
   16788             :  */
   16789           0 :     goto __pyx_L3;
   16790             :   }
   16791             : 
   16792             :   /* "View.MemoryView":1198
   16793             :  *             stride *= shape[idx]
   16794             :  *     else:
   16795             :  *         for idx in range(ndim - 1, -1, -1):             # <<<<<<<<<<<<<<
   16796             :  *             strides[idx] = stride
   16797             :  *             stride *= shape[idx]
   16798             :  */
   16799             :   /*else*/ {
   16800           0 :     for (__pyx_t_2 = (__pyx_v_ndim - 1); __pyx_t_2 > -1; __pyx_t_2-=1) {
   16801           0 :       __pyx_v_idx = __pyx_t_2;
   16802             : 
   16803             :       /* "View.MemoryView":1199
   16804             :  *     else:
   16805             :  *         for idx in range(ndim - 1, -1, -1):
   16806             :  *             strides[idx] = stride             # <<<<<<<<<<<<<<
   16807             :  *             stride *= shape[idx]
   16808             :  * 
   16809             :  */
   16810           0 :       (__pyx_v_strides[__pyx_v_idx]) = __pyx_v_stride;
   16811             : 
   16812             :       /* "View.MemoryView":1200
   16813             :  *         for idx in range(ndim - 1, -1, -1):
   16814             :  *             strides[idx] = stride
   16815             :  *             stride *= shape[idx]             # <<<<<<<<<<<<<<
   16816             :  * 
   16817             :  *     return stride
   16818             :  */
   16819           0 :       __pyx_v_stride = (__pyx_v_stride * (__pyx_v_shape[__pyx_v_idx]));
   16820             :     }
   16821             :   }
   16822           0 :   __pyx_L3:;
   16823             : 
   16824             :   /* "View.MemoryView":1202
   16825             :  *             stride *= shape[idx]
   16826             :  * 
   16827             :  *     return stride             # <<<<<<<<<<<<<<
   16828             :  * 
   16829             :  * @cname('__pyx_memoryview_copy_data_to_temp')
   16830             :  */
   16831           0 :   __pyx_r = __pyx_v_stride;
   16832           0 :   goto __pyx_L0;
   16833             : 
   16834             :   /* "View.MemoryView":1184
   16835             :  * 
   16836             :  * @cname('__pyx_fill_contig_strides_array')
   16837             :  * cdef Py_ssize_t fill_contig_strides_array(             # <<<<<<<<<<<<<<
   16838             :  *                 Py_ssize_t *shape, Py_ssize_t *strides, Py_ssize_t stride,
   16839             :  *                 int ndim, char order) noexcept nogil:
   16840             :  */
   16841             : 
   16842             :   /* function exit code */
   16843           0 :   __pyx_L0:;
   16844           0 :   return __pyx_r;
   16845             : }
   16846             : 
   16847             : /* "View.MemoryView":1205
   16848             :  * 
   16849             :  * @cname('__pyx_memoryview_copy_data_to_temp')
   16850             :  * cdef void *copy_data_to_temp(__Pyx_memviewslice *src,             # <<<<<<<<<<<<<<
   16851             :  *                              __Pyx_memviewslice *tmpslice,
   16852             :  *                              char order,
   16853             :  */
   16854             : 
   16855           0 : static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *__pyx_v_src, __Pyx_memviewslice *__pyx_v_tmpslice, char __pyx_v_order, int __pyx_v_ndim) {
   16856           0 :   int __pyx_v_i;
   16857           0 :   void *__pyx_v_result;
   16858           0 :   size_t __pyx_v_itemsize;
   16859           0 :   size_t __pyx_v_size;
   16860           0 :   void *__pyx_r;
   16861           0 :   Py_ssize_t __pyx_t_1;
   16862           0 :   int __pyx_t_2;
   16863           0 :   int __pyx_t_3;
   16864           0 :   struct __pyx_memoryview_obj *__pyx_t_4;
   16865           0 :   int __pyx_t_5;
   16866           0 :   int __pyx_t_6;
   16867           0 :   int __pyx_lineno = 0;
   16868           0 :   const char *__pyx_filename = NULL;
   16869           0 :   int __pyx_clineno = 0;
   16870             :   #ifdef WITH_THREAD
   16871           0 :   PyGILState_STATE __pyx_gilstate_save;
   16872             :   #endif
   16873             : 
   16874             :   /* "View.MemoryView":1216
   16875             :  *     cdef void *result
   16876             :  * 
   16877             :  *     cdef size_t itemsize = src.memview.view.itemsize             # <<<<<<<<<<<<<<
   16878             :  *     cdef size_t size = slice_get_size(src, ndim)
   16879             :  * 
   16880             :  */
   16881           0 :   __pyx_t_1 = __pyx_v_src->memview->view.itemsize;
   16882           0 :   __pyx_v_itemsize = __pyx_t_1;
   16883             : 
   16884             :   /* "View.MemoryView":1217
   16885             :  * 
   16886             :  *     cdef size_t itemsize = src.memview.view.itemsize
   16887             :  *     cdef size_t size = slice_get_size(src, ndim)             # <<<<<<<<<<<<<<
   16888             :  * 
   16889             :  *     result = malloc(size)
   16890             :  */
   16891           0 :   __pyx_v_size = __pyx_memoryview_slice_get_size(__pyx_v_src, __pyx_v_ndim);
   16892             : 
   16893             :   /* "View.MemoryView":1219
   16894             :  *     cdef size_t size = slice_get_size(src, ndim)
   16895             :  * 
   16896             :  *     result = malloc(size)             # <<<<<<<<<<<<<<
   16897             :  *     if not result:
   16898             :  *         _err_no_memory()
   16899             :  */
   16900           0 :   __pyx_v_result = malloc(__pyx_v_size);
   16901             : 
   16902             :   /* "View.MemoryView":1220
   16903             :  * 
   16904             :  *     result = malloc(size)
   16905             :  *     if not result:             # <<<<<<<<<<<<<<
   16906             :  *         _err_no_memory()
   16907             :  * 
   16908             :  */
   16909           0 :   __pyx_t_2 = (!(__pyx_v_result != 0));
   16910           0 :   if (__pyx_t_2) {
   16911             : 
   16912             :     /* "View.MemoryView":1221
   16913             :  *     result = malloc(size)
   16914             :  *     if not result:
   16915             :  *         _err_no_memory()             # <<<<<<<<<<<<<<
   16916             :  * 
   16917             :  * 
   16918             :  */
   16919           0 :     __pyx_t_3 = __pyx_memoryview_err_no_memory(); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 1221, __pyx_L1_error)
   16920             : 
   16921             :     /* "View.MemoryView":1220
   16922             :  * 
   16923             :  *     result = malloc(size)
   16924             :  *     if not result:             # <<<<<<<<<<<<<<
   16925             :  *         _err_no_memory()
   16926             :  * 
   16927             :  */
   16928             :   }
   16929             : 
   16930             :   /* "View.MemoryView":1224
   16931             :  * 
   16932             :  * 
   16933             :  *     tmpslice.data = <char *> result             # <<<<<<<<<<<<<<
   16934             :  *     tmpslice.memview = src.memview
   16935             :  *     for i in range(ndim):
   16936             :  */
   16937           0 :   __pyx_v_tmpslice->data = ((char *)__pyx_v_result);
   16938             : 
   16939             :   /* "View.MemoryView":1225
   16940             :  * 
   16941             :  *     tmpslice.data = <char *> result
   16942             :  *     tmpslice.memview = src.memview             # <<<<<<<<<<<<<<
   16943             :  *     for i in range(ndim):
   16944             :  *         tmpslice.shape[i] = src.shape[i]
   16945             :  */
   16946           0 :   __pyx_t_4 = __pyx_v_src->memview;
   16947           0 :   __pyx_v_tmpslice->memview = __pyx_t_4;
   16948             : 
   16949             :   /* "View.MemoryView":1226
   16950             :  *     tmpslice.data = <char *> result
   16951             :  *     tmpslice.memview = src.memview
   16952             :  *     for i in range(ndim):             # <<<<<<<<<<<<<<
   16953             :  *         tmpslice.shape[i] = src.shape[i]
   16954             :  *         tmpslice.suboffsets[i] = -1
   16955             :  */
   16956           0 :   __pyx_t_3 = __pyx_v_ndim;
   16957           0 :   __pyx_t_5 = __pyx_t_3;
   16958           0 :   for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
   16959           0 :     __pyx_v_i = __pyx_t_6;
   16960             : 
   16961             :     /* "View.MemoryView":1227
   16962             :  *     tmpslice.memview = src.memview
   16963             :  *     for i in range(ndim):
   16964             :  *         tmpslice.shape[i] = src.shape[i]             # <<<<<<<<<<<<<<
   16965             :  *         tmpslice.suboffsets[i] = -1
   16966             :  * 
   16967             :  */
   16968           0 :     (__pyx_v_tmpslice->shape[__pyx_v_i]) = (__pyx_v_src->shape[__pyx_v_i]);
   16969             : 
   16970             :     /* "View.MemoryView":1228
   16971             :  *     for i in range(ndim):
   16972             :  *         tmpslice.shape[i] = src.shape[i]
   16973             :  *         tmpslice.suboffsets[i] = -1             # <<<<<<<<<<<<<<
   16974             :  * 
   16975             :  *     fill_contig_strides_array(&tmpslice.shape[0], &tmpslice.strides[0], itemsize, ndim, order)
   16976             :  */
   16977           0 :     (__pyx_v_tmpslice->suboffsets[__pyx_v_i]) = -1L;
   16978             :   }
   16979             : 
   16980             :   /* "View.MemoryView":1230
   16981             :  *         tmpslice.suboffsets[i] = -1
   16982             :  * 
   16983             :  *     fill_contig_strides_array(&tmpslice.shape[0], &tmpslice.strides[0], itemsize, ndim, order)             # <<<<<<<<<<<<<<
   16984             :  * 
   16985             :  * 
   16986             :  */
   16987           0 :   (void)(__pyx_fill_contig_strides_array((&(__pyx_v_tmpslice->shape[0])), (&(__pyx_v_tmpslice->strides[0])), __pyx_v_itemsize, __pyx_v_ndim, __pyx_v_order));
   16988             : 
   16989             :   /* "View.MemoryView":1233
   16990             :  * 
   16991             :  * 
   16992             :  *     for i in range(ndim):             # <<<<<<<<<<<<<<
   16993             :  *         if tmpslice.shape[i] == 1:
   16994             :  *             tmpslice.strides[i] = 0
   16995             :  */
   16996           0 :   __pyx_t_3 = __pyx_v_ndim;
   16997           0 :   __pyx_t_5 = __pyx_t_3;
   16998           0 :   for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
   16999           0 :     __pyx_v_i = __pyx_t_6;
   17000             : 
   17001             :     /* "View.MemoryView":1234
   17002             :  * 
   17003             :  *     for i in range(ndim):
   17004             :  *         if tmpslice.shape[i] == 1:             # <<<<<<<<<<<<<<
   17005             :  *             tmpslice.strides[i] = 0
   17006             :  * 
   17007             :  */
   17008           0 :     __pyx_t_2 = ((__pyx_v_tmpslice->shape[__pyx_v_i]) == 1);
   17009           0 :     if (__pyx_t_2) {
   17010             : 
   17011             :       /* "View.MemoryView":1235
   17012             :  *     for i in range(ndim):
   17013             :  *         if tmpslice.shape[i] == 1:
   17014             :  *             tmpslice.strides[i] = 0             # <<<<<<<<<<<<<<
   17015             :  * 
   17016             :  *     if slice_is_contig(src[0], order, ndim):
   17017             :  */
   17018           0 :       (__pyx_v_tmpslice->strides[__pyx_v_i]) = 0;
   17019             : 
   17020             :       /* "View.MemoryView":1234
   17021             :  * 
   17022             :  *     for i in range(ndim):
   17023             :  *         if tmpslice.shape[i] == 1:             # <<<<<<<<<<<<<<
   17024             :  *             tmpslice.strides[i] = 0
   17025             :  * 
   17026             :  */
   17027             :     }
   17028             :   }
   17029             : 
   17030             :   /* "View.MemoryView":1237
   17031             :  *             tmpslice.strides[i] = 0
   17032             :  * 
   17033             :  *     if slice_is_contig(src[0], order, ndim):             # <<<<<<<<<<<<<<
   17034             :  *         memcpy(result, src.data, size)
   17035             :  *     else:
   17036             :  */
   17037           0 :   __pyx_t_2 = __pyx_memviewslice_is_contig((__pyx_v_src[0]), __pyx_v_order, __pyx_v_ndim);
   17038           0 :   if (__pyx_t_2) {
   17039             : 
   17040             :     /* "View.MemoryView":1238
   17041             :  * 
   17042             :  *     if slice_is_contig(src[0], order, ndim):
   17043             :  *         memcpy(result, src.data, size)             # <<<<<<<<<<<<<<
   17044             :  *     else:
   17045             :  *         copy_strided_to_strided(src, tmpslice, ndim, itemsize)
   17046             :  */
   17047           0 :     (void)(memcpy(__pyx_v_result, __pyx_v_src->data, __pyx_v_size));
   17048             : 
   17049             :     /* "View.MemoryView":1237
   17050             :  *             tmpslice.strides[i] = 0
   17051             :  * 
   17052             :  *     if slice_is_contig(src[0], order, ndim):             # <<<<<<<<<<<<<<
   17053             :  *         memcpy(result, src.data, size)
   17054             :  *     else:
   17055             :  */
   17056           0 :     goto __pyx_L9;
   17057             :   }
   17058             : 
   17059             :   /* "View.MemoryView":1240
   17060             :  *         memcpy(result, src.data, size)
   17061             :  *     else:
   17062             :  *         copy_strided_to_strided(src, tmpslice, ndim, itemsize)             # <<<<<<<<<<<<<<
   17063             :  * 
   17064             :  *     return result
   17065             :  */
   17066             :   /*else*/ {
   17067           0 :     copy_strided_to_strided(__pyx_v_src, __pyx_v_tmpslice, __pyx_v_ndim, __pyx_v_itemsize);
   17068             :   }
   17069           0 :   __pyx_L9:;
   17070             : 
   17071             :   /* "View.MemoryView":1242
   17072             :  *         copy_strided_to_strided(src, tmpslice, ndim, itemsize)
   17073             :  * 
   17074             :  *     return result             # <<<<<<<<<<<<<<
   17075             :  * 
   17076             :  * 
   17077             :  */
   17078           0 :   __pyx_r = __pyx_v_result;
   17079           0 :   goto __pyx_L0;
   17080             : 
   17081             :   /* "View.MemoryView":1205
   17082             :  * 
   17083             :  * @cname('__pyx_memoryview_copy_data_to_temp')
   17084             :  * cdef void *copy_data_to_temp(__Pyx_memviewslice *src,             # <<<<<<<<<<<<<<
   17085             :  *                              __Pyx_memviewslice *tmpslice,
   17086             :  *                              char order,
   17087             :  */
   17088             : 
   17089             :   /* function exit code */
   17090           0 :   __pyx_L1_error:;
   17091             :   #ifdef WITH_THREAD
   17092           0 :   __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
   17093             :   #endif
   17094           0 :   __Pyx_AddTraceback("View.MemoryView.copy_data_to_temp", __pyx_clineno, __pyx_lineno, __pyx_filename);
   17095           0 :   __pyx_r = NULL;
   17096             :   #ifdef WITH_THREAD
   17097           0 :   __Pyx_PyGILState_Release(__pyx_gilstate_save);
   17098             :   #endif
   17099           0 :   __pyx_L0:;
   17100           0 :   return __pyx_r;
   17101             : }
   17102             : 
   17103             : /* "View.MemoryView":1247
   17104             :  * 
   17105             :  * @cname('__pyx_memoryview_err_extents')
   17106             :  * cdef int _err_extents(int i, Py_ssize_t extent1,             # <<<<<<<<<<<<<<
   17107             :  *                              Py_ssize_t extent2) except -1 with gil:
   17108             :  *     raise ValueError, f"got differing extents in dimension {i} (got {extent1} and {extent2})"
   17109             :  */
   17110             : 
   17111           0 : static int __pyx_memoryview_err_extents(int __pyx_v_i, Py_ssize_t __pyx_v_extent1, Py_ssize_t __pyx_v_extent2) {
   17112           0 :   int __pyx_r;
   17113             :   __Pyx_RefNannyDeclarations
   17114           0 :   PyObject *__pyx_t_1 = NULL;
   17115           0 :   Py_ssize_t __pyx_t_2;
   17116           0 :   Py_UCS4 __pyx_t_3;
   17117           0 :   PyObject *__pyx_t_4 = NULL;
   17118           0 :   int __pyx_lineno = 0;
   17119           0 :   const char *__pyx_filename = NULL;
   17120           0 :   int __pyx_clineno = 0;
   17121             :   #ifdef WITH_THREAD
   17122           0 :   PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
   17123             :   #endif
   17124           0 :   __Pyx_RefNannySetupContext("_err_extents", 0);
   17125             : 
   17126             :   /* "View.MemoryView":1249
   17127             :  * cdef int _err_extents(int i, Py_ssize_t extent1,
   17128             :  *                              Py_ssize_t extent2) except -1 with gil:
   17129             :  *     raise ValueError, f"got differing extents in dimension {i} (got {extent1} and {extent2})"             # <<<<<<<<<<<<<<
   17130             :  * 
   17131             :  * @cname('__pyx_memoryview_err_dim')
   17132             :  */
   17133           0 :   __pyx_t_1 = PyTuple_New(7); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1249, __pyx_L1_error)
   17134           0 :   __Pyx_GOTREF(__pyx_t_1);
   17135           0 :   __pyx_t_2 = 0;
   17136           0 :   __pyx_t_3 = 127;
   17137           0 :   __Pyx_INCREF(__pyx_kp_u_got_differing_extents_in_dimensi);
   17138           0 :   __pyx_t_2 += 35;
   17139           0 :   __Pyx_GIVEREF(__pyx_kp_u_got_differing_extents_in_dimensi);
   17140           0 :   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_got_differing_extents_in_dimensi);
   17141           0 :   __pyx_t_4 = __Pyx_PyUnicode_From_int(__pyx_v_i, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1249, __pyx_L1_error)
   17142           0 :   __Pyx_GOTREF(__pyx_t_4);
   17143           0 :   __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
   17144           0 :   __Pyx_GIVEREF(__pyx_t_4);
   17145           0 :   PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4);
   17146           0 :   __pyx_t_4 = 0;
   17147           0 :   __Pyx_INCREF(__pyx_kp_u_got);
   17148           0 :   __pyx_t_2 += 6;
   17149           0 :   __Pyx_GIVEREF(__pyx_kp_u_got);
   17150           0 :   PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_got);
   17151           0 :   __pyx_t_4 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_extent1, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1249, __pyx_L1_error)
   17152           0 :   __Pyx_GOTREF(__pyx_t_4);
   17153           0 :   __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
   17154           0 :   __Pyx_GIVEREF(__pyx_t_4);
   17155           0 :   PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_4);
   17156           0 :   __pyx_t_4 = 0;
   17157           0 :   __Pyx_INCREF(__pyx_kp_u_and);
   17158           0 :   __pyx_t_2 += 5;
   17159           0 :   __Pyx_GIVEREF(__pyx_kp_u_and);
   17160           0 :   PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u_and);
   17161           0 :   __pyx_t_4 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_extent2, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1249, __pyx_L1_error)
   17162           0 :   __Pyx_GOTREF(__pyx_t_4);
   17163           0 :   __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
   17164           0 :   __Pyx_GIVEREF(__pyx_t_4);
   17165           0 :   PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_t_4);
   17166           0 :   __pyx_t_4 = 0;
   17167           0 :   __Pyx_INCREF(__pyx_kp_u__7);
   17168           0 :   __pyx_t_2 += 1;
   17169           0 :   __Pyx_GIVEREF(__pyx_kp_u__7);
   17170           0 :   PyTuple_SET_ITEM(__pyx_t_1, 6, __pyx_kp_u__7);
   17171           0 :   __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_1, 7, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1249, __pyx_L1_error)
   17172           0 :   __Pyx_GOTREF(__pyx_t_4);
   17173           0 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   17174           0 :   __Pyx_Raise(__pyx_builtin_ValueError, __pyx_t_4, 0, 0);
   17175           0 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   17176           0 :   __PYX_ERR(1, 1249, __pyx_L1_error)
   17177             : 
   17178             :   /* "View.MemoryView":1247
   17179             :  * 
   17180             :  * @cname('__pyx_memoryview_err_extents')
   17181             :  * cdef int _err_extents(int i, Py_ssize_t extent1,             # <<<<<<<<<<<<<<
   17182             :  *                              Py_ssize_t extent2) except -1 with gil:
   17183             :  *     raise ValueError, f"got differing extents in dimension {i} (got {extent1} and {extent2})"
   17184             :  */
   17185             : 
   17186             :   /* function exit code */
   17187           0 :   __pyx_L1_error:;
   17188           0 :   __Pyx_XDECREF(__pyx_t_1);
   17189           0 :   __Pyx_XDECREF(__pyx_t_4);
   17190           0 :   __Pyx_AddTraceback("View.MemoryView._err_extents", __pyx_clineno, __pyx_lineno, __pyx_filename);
   17191           0 :   __pyx_r = -1;
   17192           0 :   __Pyx_RefNannyFinishContext();
   17193             :   #ifdef WITH_THREAD
   17194           0 :   __Pyx_PyGILState_Release(__pyx_gilstate_save);
   17195             :   #endif
   17196           0 :   return __pyx_r;
   17197             : }
   17198             : 
   17199             : /* "View.MemoryView":1252
   17200             :  * 
   17201             :  * @cname('__pyx_memoryview_err_dim')
   17202             :  * cdef int _err_dim(PyObject *error, str msg, int dim) except -1 with gil:             # <<<<<<<<<<<<<<
   17203             :  *     raise <object>error, msg % dim
   17204             :  * 
   17205             :  */
   17206             : 
   17207           0 : static int __pyx_memoryview_err_dim(PyObject *__pyx_v_error, PyObject *__pyx_v_msg, int __pyx_v_dim) {
   17208           0 :   int __pyx_r;
   17209             :   __Pyx_RefNannyDeclarations
   17210           0 :   PyObject *__pyx_t_1 = NULL;
   17211           0 :   PyObject *__pyx_t_2 = NULL;
   17212           0 :   int __pyx_lineno = 0;
   17213           0 :   const char *__pyx_filename = NULL;
   17214           0 :   int __pyx_clineno = 0;
   17215             :   #ifdef WITH_THREAD
   17216           0 :   PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
   17217             :   #endif
   17218           0 :   __Pyx_RefNannySetupContext("_err_dim", 0);
   17219           0 :   __Pyx_INCREF(__pyx_v_msg);
   17220             : 
   17221             :   /* "View.MemoryView":1253
   17222             :  * @cname('__pyx_memoryview_err_dim')
   17223             :  * cdef int _err_dim(PyObject *error, str msg, int dim) except -1 with gil:
   17224             :  *     raise <object>error, msg % dim             # <<<<<<<<<<<<<<
   17225             :  * 
   17226             :  * @cname('__pyx_memoryview_err')
   17227             :  */
   17228           0 :   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_dim); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1253, __pyx_L1_error)
   17229           0 :   __Pyx_GOTREF(__pyx_t_1);
   17230           0 :   __pyx_t_2 = __Pyx_PyString_FormatSafe(__pyx_v_msg, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1253, __pyx_L1_error)
   17231           0 :   __Pyx_GOTREF(__pyx_t_2);
   17232           0 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   17233           0 :   __Pyx_Raise(((PyObject *)__pyx_v_error), __pyx_t_2, 0, 0);
   17234           0 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   17235           0 :   __PYX_ERR(1, 1253, __pyx_L1_error)
   17236             : 
   17237             :   /* "View.MemoryView":1252
   17238             :  * 
   17239             :  * @cname('__pyx_memoryview_err_dim')
   17240             :  * cdef int _err_dim(PyObject *error, str msg, int dim) except -1 with gil:             # <<<<<<<<<<<<<<
   17241             :  *     raise <object>error, msg % dim
   17242             :  * 
   17243             :  */
   17244             : 
   17245             :   /* function exit code */
   17246           0 :   __pyx_L1_error:;
   17247           0 :   __Pyx_XDECREF(__pyx_t_1);
   17248           0 :   __Pyx_XDECREF(__pyx_t_2);
   17249           0 :   __Pyx_AddTraceback("View.MemoryView._err_dim", __pyx_clineno, __pyx_lineno, __pyx_filename);
   17250           0 :   __pyx_r = -1;
   17251           0 :   __Pyx_XDECREF(__pyx_v_msg);
   17252           0 :   __Pyx_RefNannyFinishContext();
   17253             :   #ifdef WITH_THREAD
   17254           0 :   __Pyx_PyGILState_Release(__pyx_gilstate_save);
   17255             :   #endif
   17256           0 :   return __pyx_r;
   17257             : }
   17258             : 
   17259             : /* "View.MemoryView":1256
   17260             :  * 
   17261             :  * @cname('__pyx_memoryview_err')
   17262             :  * cdef int _err(PyObject *error, str msg) except -1 with gil:             # <<<<<<<<<<<<<<
   17263             :  *     raise <object>error, msg
   17264             :  * 
   17265             :  */
   17266             : 
   17267           0 : static int __pyx_memoryview_err(PyObject *__pyx_v_error, PyObject *__pyx_v_msg) {
   17268           0 :   int __pyx_r;
   17269             :   __Pyx_RefNannyDeclarations
   17270           0 :   int __pyx_lineno = 0;
   17271           0 :   const char *__pyx_filename = NULL;
   17272           0 :   int __pyx_clineno = 0;
   17273             :   #ifdef WITH_THREAD
   17274           0 :   PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
   17275             :   #endif
   17276           0 :   __Pyx_RefNannySetupContext("_err", 0);
   17277           0 :   __Pyx_INCREF(__pyx_v_msg);
   17278             : 
   17279             :   /* "View.MemoryView":1257
   17280             :  * @cname('__pyx_memoryview_err')
   17281             :  * cdef int _err(PyObject *error, str msg) except -1 with gil:
   17282             :  *     raise <object>error, msg             # <<<<<<<<<<<<<<
   17283             :  * 
   17284             :  * @cname('__pyx_memoryview_err_no_memory')
   17285             :  */
   17286           0 :   __Pyx_Raise(((PyObject *)__pyx_v_error), __pyx_v_msg, 0, 0);
   17287           0 :   __PYX_ERR(1, 1257, __pyx_L1_error)
   17288             : 
   17289             :   /* "View.MemoryView":1256
   17290             :  * 
   17291             :  * @cname('__pyx_memoryview_err')
   17292             :  * cdef int _err(PyObject *error, str msg) except -1 with gil:             # <<<<<<<<<<<<<<
   17293             :  *     raise <object>error, msg
   17294             :  * 
   17295             :  */
   17296             : 
   17297             :   /* function exit code */
   17298           0 :   __pyx_L1_error:;
   17299           0 :   __Pyx_AddTraceback("View.MemoryView._err", __pyx_clineno, __pyx_lineno, __pyx_filename);
   17300           0 :   __pyx_r = -1;
   17301           0 :   __Pyx_XDECREF(__pyx_v_msg);
   17302           0 :   __Pyx_RefNannyFinishContext();
   17303             :   #ifdef WITH_THREAD
   17304           0 :   __Pyx_PyGILState_Release(__pyx_gilstate_save);
   17305             :   #endif
   17306           0 :   return __pyx_r;
   17307             : }
   17308             : 
   17309             : /* "View.MemoryView":1260
   17310             :  * 
   17311             :  * @cname('__pyx_memoryview_err_no_memory')
   17312             :  * cdef int _err_no_memory() except -1 with gil:             # <<<<<<<<<<<<<<
   17313             :  *     raise MemoryError
   17314             :  * 
   17315             :  */
   17316             : 
   17317           0 : static int __pyx_memoryview_err_no_memory(void) {
   17318           0 :   int __pyx_r;
   17319           0 :   int __pyx_lineno = 0;
   17320           0 :   const char *__pyx_filename = NULL;
   17321           0 :   int __pyx_clineno = 0;
   17322             :   #ifdef WITH_THREAD
   17323           0 :   PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
   17324             :   #endif
   17325             : 
   17326             :   /* "View.MemoryView":1261
   17327             :  * @cname('__pyx_memoryview_err_no_memory')
   17328             :  * cdef int _err_no_memory() except -1 with gil:
   17329             :  *     raise MemoryError             # <<<<<<<<<<<<<<
   17330             :  * 
   17331             :  * 
   17332             :  */
   17333           0 :   PyErr_NoMemory(); __PYX_ERR(1, 1261, __pyx_L1_error)
   17334             : 
   17335             :   /* "View.MemoryView":1260
   17336             :  * 
   17337             :  * @cname('__pyx_memoryview_err_no_memory')
   17338             :  * cdef int _err_no_memory() except -1 with gil:             # <<<<<<<<<<<<<<
   17339             :  *     raise MemoryError
   17340             :  * 
   17341             :  */
   17342             : 
   17343             :   /* function exit code */
   17344           0 :   __pyx_L1_error:;
   17345           0 :   __Pyx_AddTraceback("View.MemoryView._err_no_memory", __pyx_clineno, __pyx_lineno, __pyx_filename);
   17346           0 :   __pyx_r = -1;
   17347             :   #ifdef WITH_THREAD
   17348           0 :   __Pyx_PyGILState_Release(__pyx_gilstate_save);
   17349             :   #endif
   17350           0 :   return __pyx_r;
   17351             : }
   17352             : 
   17353             : /* "View.MemoryView":1265
   17354             :  * 
   17355             :  * @cname('__pyx_memoryview_copy_contents')
   17356             :  * cdef int memoryview_copy_contents(__Pyx_memviewslice src,             # <<<<<<<<<<<<<<
   17357             :  *                                   __Pyx_memviewslice dst,
   17358             :  *                                   int src_ndim, int dst_ndim,
   17359             :  */
   17360             : 
   17361           0 : static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_memviewslice __pyx_v_dst, int __pyx_v_src_ndim, int __pyx_v_dst_ndim, int __pyx_v_dtype_is_object) {
   17362           0 :   void *__pyx_v_tmpdata;
   17363           0 :   size_t __pyx_v_itemsize;
   17364           0 :   int __pyx_v_i;
   17365           0 :   char __pyx_v_order;
   17366           0 :   int __pyx_v_broadcasting;
   17367           0 :   int __pyx_v_direct_copy;
   17368           0 :   __Pyx_memviewslice __pyx_v_tmp;
   17369           0 :   int __pyx_v_ndim;
   17370           0 :   int __pyx_r;
   17371           0 :   Py_ssize_t __pyx_t_1;
   17372           0 :   int __pyx_t_2;
   17373           0 :   int __pyx_t_3;
   17374           0 :   int __pyx_t_4;
   17375           0 :   int __pyx_t_5;
   17376           0 :   int __pyx_t_6;
   17377           0 :   void *__pyx_t_7;
   17378           0 :   int __pyx_lineno = 0;
   17379           0 :   const char *__pyx_filename = NULL;
   17380           0 :   int __pyx_clineno = 0;
   17381             :   #ifdef WITH_THREAD
   17382           0 :   PyGILState_STATE __pyx_gilstate_save;
   17383             :   #endif
   17384             : 
   17385             :   /* "View.MemoryView":1273
   17386             :  *     Check for overlapping memory and verify the shapes.
   17387             :  *     """
   17388             :  *     cdef void *tmpdata = NULL             # <<<<<<<<<<<<<<
   17389             :  *     cdef size_t itemsize = src.memview.view.itemsize
   17390             :  *     cdef int i
   17391             :  */
   17392           0 :   __pyx_v_tmpdata = NULL;
   17393             : 
   17394             :   /* "View.MemoryView":1274
   17395             :  *     """
   17396             :  *     cdef void *tmpdata = NULL
   17397             :  *     cdef size_t itemsize = src.memview.view.itemsize             # <<<<<<<<<<<<<<
   17398             :  *     cdef int i
   17399             :  *     cdef char order = get_best_order(&src, src_ndim)
   17400             :  */
   17401           0 :   __pyx_t_1 = __pyx_v_src.memview->view.itemsize;
   17402           0 :   __pyx_v_itemsize = __pyx_t_1;
   17403             : 
   17404             :   /* "View.MemoryView":1276
   17405             :  *     cdef size_t itemsize = src.memview.view.itemsize
   17406             :  *     cdef int i
   17407             :  *     cdef char order = get_best_order(&src, src_ndim)             # <<<<<<<<<<<<<<
   17408             :  *     cdef bint broadcasting = False
   17409             :  *     cdef bint direct_copy = False
   17410             :  */
   17411           0 :   __pyx_v_order = __pyx_get_best_slice_order((&__pyx_v_src), __pyx_v_src_ndim);
   17412             : 
   17413             :   /* "View.MemoryView":1277
   17414             :  *     cdef int i
   17415             :  *     cdef char order = get_best_order(&src, src_ndim)
   17416             :  *     cdef bint broadcasting = False             # <<<<<<<<<<<<<<
   17417             :  *     cdef bint direct_copy = False
   17418             :  *     cdef __Pyx_memviewslice tmp
   17419             :  */
   17420           0 :   __pyx_v_broadcasting = 0;
   17421             : 
   17422             :   /* "View.MemoryView":1278
   17423             :  *     cdef char order = get_best_order(&src, src_ndim)
   17424             :  *     cdef bint broadcasting = False
   17425             :  *     cdef bint direct_copy = False             # <<<<<<<<<<<<<<
   17426             :  *     cdef __Pyx_memviewslice tmp
   17427             :  * 
   17428             :  */
   17429           0 :   __pyx_v_direct_copy = 0;
   17430             : 
   17431             :   /* "View.MemoryView":1281
   17432             :  *     cdef __Pyx_memviewslice tmp
   17433             :  * 
   17434             :  *     if src_ndim < dst_ndim:             # <<<<<<<<<<<<<<
   17435             :  *         broadcast_leading(&src, src_ndim, dst_ndim)
   17436             :  *     elif dst_ndim < src_ndim:
   17437             :  */
   17438           0 :   __pyx_t_2 = (__pyx_v_src_ndim < __pyx_v_dst_ndim);
   17439           0 :   if (__pyx_t_2) {
   17440             : 
   17441             :     /* "View.MemoryView":1282
   17442             :  * 
   17443             :  *     if src_ndim < dst_ndim:
   17444             :  *         broadcast_leading(&src, src_ndim, dst_ndim)             # <<<<<<<<<<<<<<
   17445             :  *     elif dst_ndim < src_ndim:
   17446             :  *         broadcast_leading(&dst, dst_ndim, src_ndim)
   17447             :  */
   17448           0 :     __pyx_memoryview_broadcast_leading((&__pyx_v_src), __pyx_v_src_ndim, __pyx_v_dst_ndim);
   17449             : 
   17450             :     /* "View.MemoryView":1281
   17451             :  *     cdef __Pyx_memviewslice tmp
   17452             :  * 
   17453             :  *     if src_ndim < dst_ndim:             # <<<<<<<<<<<<<<
   17454             :  *         broadcast_leading(&src, src_ndim, dst_ndim)
   17455             :  *     elif dst_ndim < src_ndim:
   17456             :  */
   17457           0 :     goto __pyx_L3;
   17458             :   }
   17459             : 
   17460             :   /* "View.MemoryView":1283
   17461             :  *     if src_ndim < dst_ndim:
   17462             :  *         broadcast_leading(&src, src_ndim, dst_ndim)
   17463             :  *     elif dst_ndim < src_ndim:             # <<<<<<<<<<<<<<
   17464             :  *         broadcast_leading(&dst, dst_ndim, src_ndim)
   17465             :  * 
   17466             :  */
   17467           0 :   __pyx_t_2 = (__pyx_v_dst_ndim < __pyx_v_src_ndim);
   17468           0 :   if (__pyx_t_2) {
   17469             : 
   17470             :     /* "View.MemoryView":1284
   17471             :  *         broadcast_leading(&src, src_ndim, dst_ndim)
   17472             :  *     elif dst_ndim < src_ndim:
   17473             :  *         broadcast_leading(&dst, dst_ndim, src_ndim)             # <<<<<<<<<<<<<<
   17474             :  * 
   17475             :  *     cdef int ndim = max(src_ndim, dst_ndim)
   17476             :  */
   17477           0 :     __pyx_memoryview_broadcast_leading((&__pyx_v_dst), __pyx_v_dst_ndim, __pyx_v_src_ndim);
   17478             : 
   17479             :     /* "View.MemoryView":1283
   17480             :  *     if src_ndim < dst_ndim:
   17481             :  *         broadcast_leading(&src, src_ndim, dst_ndim)
   17482             :  *     elif dst_ndim < src_ndim:             # <<<<<<<<<<<<<<
   17483             :  *         broadcast_leading(&dst, dst_ndim, src_ndim)
   17484             :  * 
   17485             :  */
   17486             :   }
   17487           0 :   __pyx_L3:;
   17488             : 
   17489             :   /* "View.MemoryView":1286
   17490             :  *         broadcast_leading(&dst, dst_ndim, src_ndim)
   17491             :  * 
   17492             :  *     cdef int ndim = max(src_ndim, dst_ndim)             # <<<<<<<<<<<<<<
   17493             :  * 
   17494             :  *     for i in range(ndim):
   17495             :  */
   17496           0 :   __pyx_t_3 = __pyx_v_dst_ndim;
   17497           0 :   __pyx_t_4 = __pyx_v_src_ndim;
   17498           0 :   __pyx_t_2 = (__pyx_t_3 > __pyx_t_4);
   17499           0 :   if (__pyx_t_2) {
   17500             :     __pyx_t_5 = __pyx_t_3;
   17501             :   } else {
   17502             :     __pyx_t_5 = __pyx_t_4;
   17503             :   }
   17504           0 :   __pyx_v_ndim = __pyx_t_5;
   17505             : 
   17506             :   /* "View.MemoryView":1288
   17507             :  *     cdef int ndim = max(src_ndim, dst_ndim)
   17508             :  * 
   17509             :  *     for i in range(ndim):             # <<<<<<<<<<<<<<
   17510             :  *         if src.shape[i] != dst.shape[i]:
   17511             :  *             if src.shape[i] == 1:
   17512             :  */
   17513           0 :   __pyx_t_5 = __pyx_v_ndim;
   17514           0 :   __pyx_t_3 = __pyx_t_5;
   17515           0 :   for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
   17516           0 :     __pyx_v_i = __pyx_t_4;
   17517             : 
   17518             :     /* "View.MemoryView":1289
   17519             :  * 
   17520             :  *     for i in range(ndim):
   17521             :  *         if src.shape[i] != dst.shape[i]:             # <<<<<<<<<<<<<<
   17522             :  *             if src.shape[i] == 1:
   17523             :  *                 broadcasting = True
   17524             :  */
   17525           0 :     __pyx_t_2 = ((__pyx_v_src.shape[__pyx_v_i]) != (__pyx_v_dst.shape[__pyx_v_i]));
   17526           0 :     if (__pyx_t_2) {
   17527             : 
   17528             :       /* "View.MemoryView":1290
   17529             :  *     for i in range(ndim):
   17530             :  *         if src.shape[i] != dst.shape[i]:
   17531             :  *             if src.shape[i] == 1:             # <<<<<<<<<<<<<<
   17532             :  *                 broadcasting = True
   17533             :  *                 src.strides[i] = 0
   17534             :  */
   17535           0 :       __pyx_t_2 = ((__pyx_v_src.shape[__pyx_v_i]) == 1);
   17536           0 :       if (__pyx_t_2) {
   17537             : 
   17538             :         /* "View.MemoryView":1291
   17539             :  *         if src.shape[i] != dst.shape[i]:
   17540             :  *             if src.shape[i] == 1:
   17541             :  *                 broadcasting = True             # <<<<<<<<<<<<<<
   17542             :  *                 src.strides[i] = 0
   17543             :  *             else:
   17544             :  */
   17545           0 :         __pyx_v_broadcasting = 1;
   17546             : 
   17547             :         /* "View.MemoryView":1292
   17548             :  *             if src.shape[i] == 1:
   17549             :  *                 broadcasting = True
   17550             :  *                 src.strides[i] = 0             # <<<<<<<<<<<<<<
   17551             :  *             else:
   17552             :  *                 _err_extents(i, dst.shape[i], src.shape[i])
   17553             :  */
   17554           0 :         (__pyx_v_src.strides[__pyx_v_i]) = 0;
   17555             : 
   17556             :         /* "View.MemoryView":1290
   17557             :  *     for i in range(ndim):
   17558             :  *         if src.shape[i] != dst.shape[i]:
   17559             :  *             if src.shape[i] == 1:             # <<<<<<<<<<<<<<
   17560             :  *                 broadcasting = True
   17561             :  *                 src.strides[i] = 0
   17562             :  */
   17563           0 :         goto __pyx_L7;
   17564             :       }
   17565             : 
   17566             :       /* "View.MemoryView":1294
   17567             :  *                 src.strides[i] = 0
   17568             :  *             else:
   17569             :  *                 _err_extents(i, dst.shape[i], src.shape[i])             # <<<<<<<<<<<<<<
   17570             :  * 
   17571             :  *         if src.suboffsets[i] >= 0:
   17572             :  */
   17573             :       /*else*/ {
   17574           0 :         __pyx_t_6 = __pyx_memoryview_err_extents(__pyx_v_i, (__pyx_v_dst.shape[__pyx_v_i]), (__pyx_v_src.shape[__pyx_v_i])); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 1294, __pyx_L1_error)
   17575             :       }
   17576           0 :       __pyx_L7:;
   17577             : 
   17578             :       /* "View.MemoryView":1289
   17579             :  * 
   17580             :  *     for i in range(ndim):
   17581             :  *         if src.shape[i] != dst.shape[i]:             # <<<<<<<<<<<<<<
   17582             :  *             if src.shape[i] == 1:
   17583             :  *                 broadcasting = True
   17584             :  */
   17585             :     }
   17586             : 
   17587             :     /* "View.MemoryView":1296
   17588             :  *                 _err_extents(i, dst.shape[i], src.shape[i])
   17589             :  * 
   17590             :  *         if src.suboffsets[i] >= 0:             # <<<<<<<<<<<<<<
   17591             :  *             _err_dim(PyExc_ValueError, "Dimension %d is not direct", i)
   17592             :  * 
   17593             :  */
   17594           0 :     __pyx_t_2 = ((__pyx_v_src.suboffsets[__pyx_v_i]) >= 0);
   17595           0 :     if (__pyx_t_2) {
   17596             : 
   17597             :       /* "View.MemoryView":1297
   17598             :  * 
   17599             :  *         if src.suboffsets[i] >= 0:
   17600             :  *             _err_dim(PyExc_ValueError, "Dimension %d is not direct", i)             # <<<<<<<<<<<<<<
   17601             :  * 
   17602             :  *     if slices_overlap(&src, &dst, ndim, itemsize):
   17603             :  */
   17604           0 :       __pyx_t_6 = __pyx_memoryview_err_dim(PyExc_ValueError, __pyx_kp_s_Dimension_d_is_not_direct, __pyx_v_i); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 1297, __pyx_L1_error)
   17605             : 
   17606             :       /* "View.MemoryView":1296
   17607             :  *                 _err_extents(i, dst.shape[i], src.shape[i])
   17608             :  * 
   17609             :  *         if src.suboffsets[i] >= 0:             # <<<<<<<<<<<<<<
   17610             :  *             _err_dim(PyExc_ValueError, "Dimension %d is not direct", i)
   17611             :  * 
   17612             :  */
   17613             :     }
   17614             :   }
   17615             : 
   17616             :   /* "View.MemoryView":1299
   17617             :  *             _err_dim(PyExc_ValueError, "Dimension %d is not direct", i)
   17618             :  * 
   17619             :  *     if slices_overlap(&src, &dst, ndim, itemsize):             # <<<<<<<<<<<<<<
   17620             :  * 
   17621             :  *         if not slice_is_contig(src, order, ndim):
   17622             :  */
   17623           0 :   __pyx_t_2 = __pyx_slices_overlap((&__pyx_v_src), (&__pyx_v_dst), __pyx_v_ndim, __pyx_v_itemsize);
   17624           0 :   if (__pyx_t_2) {
   17625             : 
   17626             :     /* "View.MemoryView":1301
   17627             :  *     if slices_overlap(&src, &dst, ndim, itemsize):
   17628             :  * 
   17629             :  *         if not slice_is_contig(src, order, ndim):             # <<<<<<<<<<<<<<
   17630             :  *             order = get_best_order(&dst, ndim)
   17631             :  * 
   17632             :  */
   17633           0 :     __pyx_t_2 = (!__pyx_memviewslice_is_contig(__pyx_v_src, __pyx_v_order, __pyx_v_ndim));
   17634           0 :     if (__pyx_t_2) {
   17635             : 
   17636             :       /* "View.MemoryView":1302
   17637             :  * 
   17638             :  *         if not slice_is_contig(src, order, ndim):
   17639             :  *             order = get_best_order(&dst, ndim)             # <<<<<<<<<<<<<<
   17640             :  * 
   17641             :  *         tmpdata = copy_data_to_temp(&src, &tmp, order, ndim)
   17642             :  */
   17643           0 :       __pyx_v_order = __pyx_get_best_slice_order((&__pyx_v_dst), __pyx_v_ndim);
   17644             : 
   17645             :       /* "View.MemoryView":1301
   17646             :  *     if slices_overlap(&src, &dst, ndim, itemsize):
   17647             :  * 
   17648             :  *         if not slice_is_contig(src, order, ndim):             # <<<<<<<<<<<<<<
   17649             :  *             order = get_best_order(&dst, ndim)
   17650             :  * 
   17651             :  */
   17652             :     }
   17653             : 
   17654             :     /* "View.MemoryView":1304
   17655             :  *             order = get_best_order(&dst, ndim)
   17656             :  * 
   17657             :  *         tmpdata = copy_data_to_temp(&src, &tmp, order, ndim)             # <<<<<<<<<<<<<<
   17658             :  *         src = tmp
   17659             :  * 
   17660             :  */
   17661           0 :     __pyx_t_7 = __pyx_memoryview_copy_data_to_temp((&__pyx_v_src), (&__pyx_v_tmp), __pyx_v_order, __pyx_v_ndim); if (unlikely(__pyx_t_7 == ((void *)NULL))) __PYX_ERR(1, 1304, __pyx_L1_error)
   17662           0 :     __pyx_v_tmpdata = __pyx_t_7;
   17663             : 
   17664             :     /* "View.MemoryView":1305
   17665             :  * 
   17666             :  *         tmpdata = copy_data_to_temp(&src, &tmp, order, ndim)
   17667             :  *         src = tmp             # <<<<<<<<<<<<<<
   17668             :  * 
   17669             :  *     if not broadcasting:
   17670             :  */
   17671           0 :     __pyx_v_src = __pyx_v_tmp;
   17672             : 
   17673             :     /* "View.MemoryView":1299
   17674             :  *             _err_dim(PyExc_ValueError, "Dimension %d is not direct", i)
   17675             :  * 
   17676             :  *     if slices_overlap(&src, &dst, ndim, itemsize):             # <<<<<<<<<<<<<<
   17677             :  * 
   17678             :  *         if not slice_is_contig(src, order, ndim):
   17679             :  */
   17680             :   }
   17681             : 
   17682             :   /* "View.MemoryView":1307
   17683             :  *         src = tmp
   17684             :  * 
   17685             :  *     if not broadcasting:             # <<<<<<<<<<<<<<
   17686             :  * 
   17687             :  * 
   17688             :  */
   17689           0 :   __pyx_t_2 = (!__pyx_v_broadcasting);
   17690           0 :   if (__pyx_t_2) {
   17691             : 
   17692             :     /* "View.MemoryView":1310
   17693             :  * 
   17694             :  * 
   17695             :  *         if slice_is_contig(src, 'C', ndim):             # <<<<<<<<<<<<<<
   17696             :  *             direct_copy = slice_is_contig(dst, 'C', ndim)
   17697             :  *         elif slice_is_contig(src, 'F', ndim):
   17698             :  */
   17699           0 :     __pyx_t_2 = __pyx_memviewslice_is_contig(__pyx_v_src, 'C', __pyx_v_ndim);
   17700           0 :     if (__pyx_t_2) {
   17701             : 
   17702             :       /* "View.MemoryView":1311
   17703             :  * 
   17704             :  *         if slice_is_contig(src, 'C', ndim):
   17705             :  *             direct_copy = slice_is_contig(dst, 'C', ndim)             # <<<<<<<<<<<<<<
   17706             :  *         elif slice_is_contig(src, 'F', ndim):
   17707             :  *             direct_copy = slice_is_contig(dst, 'F', ndim)
   17708             :  */
   17709           0 :       __pyx_v_direct_copy = __pyx_memviewslice_is_contig(__pyx_v_dst, 'C', __pyx_v_ndim);
   17710             : 
   17711             :       /* "View.MemoryView":1310
   17712             :  * 
   17713             :  * 
   17714             :  *         if slice_is_contig(src, 'C', ndim):             # <<<<<<<<<<<<<<
   17715             :  *             direct_copy = slice_is_contig(dst, 'C', ndim)
   17716             :  *         elif slice_is_contig(src, 'F', ndim):
   17717             :  */
   17718           0 :       goto __pyx_L12;
   17719             :     }
   17720             : 
   17721             :     /* "View.MemoryView":1312
   17722             :  *         if slice_is_contig(src, 'C', ndim):
   17723             :  *             direct_copy = slice_is_contig(dst, 'C', ndim)
   17724             :  *         elif slice_is_contig(src, 'F', ndim):             # <<<<<<<<<<<<<<
   17725             :  *             direct_copy = slice_is_contig(dst, 'F', ndim)
   17726             :  * 
   17727             :  */
   17728           0 :     __pyx_t_2 = __pyx_memviewslice_is_contig(__pyx_v_src, 'F', __pyx_v_ndim);
   17729           0 :     if (__pyx_t_2) {
   17730             : 
   17731             :       /* "View.MemoryView":1313
   17732             :  *             direct_copy = slice_is_contig(dst, 'C', ndim)
   17733             :  *         elif slice_is_contig(src, 'F', ndim):
   17734             :  *             direct_copy = slice_is_contig(dst, 'F', ndim)             # <<<<<<<<<<<<<<
   17735             :  * 
   17736             :  *         if direct_copy:
   17737             :  */
   17738           0 :       __pyx_v_direct_copy = __pyx_memviewslice_is_contig(__pyx_v_dst, 'F', __pyx_v_ndim);
   17739             : 
   17740             :       /* "View.MemoryView":1312
   17741             :  *         if slice_is_contig(src, 'C', ndim):
   17742             :  *             direct_copy = slice_is_contig(dst, 'C', ndim)
   17743             :  *         elif slice_is_contig(src, 'F', ndim):             # <<<<<<<<<<<<<<
   17744             :  *             direct_copy = slice_is_contig(dst, 'F', ndim)
   17745             :  * 
   17746             :  */
   17747             :     }
   17748           0 :     __pyx_L12:;
   17749             : 
   17750             :     /* "View.MemoryView":1315
   17751             :  *             direct_copy = slice_is_contig(dst, 'F', ndim)
   17752             :  * 
   17753             :  *         if direct_copy:             # <<<<<<<<<<<<<<
   17754             :  * 
   17755             :  *             refcount_copying(&dst, dtype_is_object, ndim, inc=False)
   17756             :  */
   17757           0 :     if (__pyx_v_direct_copy) {
   17758             : 
   17759             :       /* "View.MemoryView":1317
   17760             :  *         if direct_copy:
   17761             :  * 
   17762             :  *             refcount_copying(&dst, dtype_is_object, ndim, inc=False)             # <<<<<<<<<<<<<<
   17763             :  *             memcpy(dst.data, src.data, slice_get_size(&src, ndim))
   17764             :  *             refcount_copying(&dst, dtype_is_object, ndim, inc=True)
   17765             :  */
   17766           0 :       __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 0);
   17767             : 
   17768             :       /* "View.MemoryView":1318
   17769             :  * 
   17770             :  *             refcount_copying(&dst, dtype_is_object, ndim, inc=False)
   17771             :  *             memcpy(dst.data, src.data, slice_get_size(&src, ndim))             # <<<<<<<<<<<<<<
   17772             :  *             refcount_copying(&dst, dtype_is_object, ndim, inc=True)
   17773             :  *             free(tmpdata)
   17774             :  */
   17775           0 :       (void)(memcpy(__pyx_v_dst.data, __pyx_v_src.data, __pyx_memoryview_slice_get_size((&__pyx_v_src), __pyx_v_ndim)));
   17776             : 
   17777             :       /* "View.MemoryView":1319
   17778             :  *             refcount_copying(&dst, dtype_is_object, ndim, inc=False)
   17779             :  *             memcpy(dst.data, src.data, slice_get_size(&src, ndim))
   17780             :  *             refcount_copying(&dst, dtype_is_object, ndim, inc=True)             # <<<<<<<<<<<<<<
   17781             :  *             free(tmpdata)
   17782             :  *             return 0
   17783             :  */
   17784           0 :       __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 1);
   17785             : 
   17786             :       /* "View.MemoryView":1320
   17787             :  *             memcpy(dst.data, src.data, slice_get_size(&src, ndim))
   17788             :  *             refcount_copying(&dst, dtype_is_object, ndim, inc=True)
   17789             :  *             free(tmpdata)             # <<<<<<<<<<<<<<
   17790             :  *             return 0
   17791             :  * 
   17792             :  */
   17793           0 :       free(__pyx_v_tmpdata);
   17794             : 
   17795             :       /* "View.MemoryView":1321
   17796             :  *             refcount_copying(&dst, dtype_is_object, ndim, inc=True)
   17797             :  *             free(tmpdata)
   17798             :  *             return 0             # <<<<<<<<<<<<<<
   17799             :  * 
   17800             :  *     if order == 'F' == get_best_order(&dst, ndim):
   17801             :  */
   17802           0 :       __pyx_r = 0;
   17803           0 :       goto __pyx_L0;
   17804             : 
   17805             :       /* "View.MemoryView":1315
   17806             :  *             direct_copy = slice_is_contig(dst, 'F', ndim)
   17807             :  * 
   17808             :  *         if direct_copy:             # <<<<<<<<<<<<<<
   17809             :  * 
   17810             :  *             refcount_copying(&dst, dtype_is_object, ndim, inc=False)
   17811             :  */
   17812             :     }
   17813             : 
   17814             :     /* "View.MemoryView":1307
   17815             :  *         src = tmp
   17816             :  * 
   17817             :  *     if not broadcasting:             # <<<<<<<<<<<<<<
   17818             :  * 
   17819             :  * 
   17820             :  */
   17821             :   }
   17822             : 
   17823             :   /* "View.MemoryView":1323
   17824             :  *             return 0
   17825             :  * 
   17826             :  *     if order == 'F' == get_best_order(&dst, ndim):             # <<<<<<<<<<<<<<
   17827             :  * 
   17828             :  * 
   17829             :  */
   17830           0 :   __pyx_t_2 = (__pyx_v_order == 'F');
   17831           0 :   if (__pyx_t_2) {
   17832           0 :     __pyx_t_2 = ('F' == __pyx_get_best_slice_order((&__pyx_v_dst), __pyx_v_ndim));
   17833             :   }
   17834           0 :   if (__pyx_t_2) {
   17835             : 
   17836             :     /* "View.MemoryView":1326
   17837             :  * 
   17838             :  * 
   17839             :  *         transpose_memslice(&src)             # <<<<<<<<<<<<<<
   17840             :  *         transpose_memslice(&dst)
   17841             :  * 
   17842             :  */
   17843           0 :     __pyx_t_5 = __pyx_memslice_transpose((&__pyx_v_src)); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 1326, __pyx_L1_error)
   17844             : 
   17845             :     /* "View.MemoryView":1327
   17846             :  * 
   17847             :  *         transpose_memslice(&src)
   17848             :  *         transpose_memslice(&dst)             # <<<<<<<<<<<<<<
   17849             :  * 
   17850             :  *     refcount_copying(&dst, dtype_is_object, ndim, inc=False)
   17851             :  */
   17852           0 :     __pyx_t_5 = __pyx_memslice_transpose((&__pyx_v_dst)); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 1327, __pyx_L1_error)
   17853             : 
   17854             :     /* "View.MemoryView":1323
   17855             :  *             return 0
   17856             :  * 
   17857             :  *     if order == 'F' == get_best_order(&dst, ndim):             # <<<<<<<<<<<<<<
   17858             :  * 
   17859             :  * 
   17860             :  */
   17861             :   }
   17862             : 
   17863             :   /* "View.MemoryView":1329
   17864             :  *         transpose_memslice(&dst)
   17865             :  * 
   17866             :  *     refcount_copying(&dst, dtype_is_object, ndim, inc=False)             # <<<<<<<<<<<<<<
   17867             :  *     copy_strided_to_strided(&src, &dst, ndim, itemsize)
   17868             :  *     refcount_copying(&dst, dtype_is_object, ndim, inc=True)
   17869             :  */
   17870           0 :   __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 0);
   17871             : 
   17872             :   /* "View.MemoryView":1330
   17873             :  * 
   17874             :  *     refcount_copying(&dst, dtype_is_object, ndim, inc=False)
   17875             :  *     copy_strided_to_strided(&src, &dst, ndim, itemsize)             # <<<<<<<<<<<<<<
   17876             :  *     refcount_copying(&dst, dtype_is_object, ndim, inc=True)
   17877             :  * 
   17878             :  */
   17879           0 :   copy_strided_to_strided((&__pyx_v_src), (&__pyx_v_dst), __pyx_v_ndim, __pyx_v_itemsize);
   17880             : 
   17881             :   /* "View.MemoryView":1331
   17882             :  *     refcount_copying(&dst, dtype_is_object, ndim, inc=False)
   17883             :  *     copy_strided_to_strided(&src, &dst, ndim, itemsize)
   17884             :  *     refcount_copying(&dst, dtype_is_object, ndim, inc=True)             # <<<<<<<<<<<<<<
   17885             :  * 
   17886             :  *     free(tmpdata)
   17887             :  */
   17888           0 :   __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 1);
   17889             : 
   17890             :   /* "View.MemoryView":1333
   17891             :  *     refcount_copying(&dst, dtype_is_object, ndim, inc=True)
   17892             :  * 
   17893             :  *     free(tmpdata)             # <<<<<<<<<<<<<<
   17894             :  *     return 0
   17895             :  * 
   17896             :  */
   17897           0 :   free(__pyx_v_tmpdata);
   17898             : 
   17899             :   /* "View.MemoryView":1334
   17900             :  * 
   17901             :  *     free(tmpdata)
   17902             :  *     return 0             # <<<<<<<<<<<<<<
   17903             :  * 
   17904             :  * @cname('__pyx_memoryview_broadcast_leading')
   17905             :  */
   17906           0 :   __pyx_r = 0;
   17907           0 :   goto __pyx_L0;
   17908             : 
   17909             :   /* "View.MemoryView":1265
   17910             :  * 
   17911             :  * @cname('__pyx_memoryview_copy_contents')
   17912             :  * cdef int memoryview_copy_contents(__Pyx_memviewslice src,             # <<<<<<<<<<<<<<
   17913             :  *                                   __Pyx_memviewslice dst,
   17914             :  *                                   int src_ndim, int dst_ndim,
   17915             :  */
   17916             : 
   17917             :   /* function exit code */
   17918           0 :   __pyx_L1_error:;
   17919             :   #ifdef WITH_THREAD
   17920           0 :   __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
   17921             :   #endif
   17922           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview_copy_contents", __pyx_clineno, __pyx_lineno, __pyx_filename);
   17923           0 :   __pyx_r = -1;
   17924             :   #ifdef WITH_THREAD
   17925           0 :   __Pyx_PyGILState_Release(__pyx_gilstate_save);
   17926             :   #endif
   17927           0 :   __pyx_L0:;
   17928           0 :   return __pyx_r;
   17929             : }
   17930             : 
   17931             : /* "View.MemoryView":1337
   17932             :  * 
   17933             :  * @cname('__pyx_memoryview_broadcast_leading')
   17934             :  * cdef void broadcast_leading(__Pyx_memviewslice *mslice,             # <<<<<<<<<<<<<<
   17935             :  *                             int ndim,
   17936             :  *                             int ndim_other) noexcept nogil:
   17937             :  */
   17938             : 
   17939           0 : static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *__pyx_v_mslice, int __pyx_v_ndim, int __pyx_v_ndim_other) {
   17940           0 :   int __pyx_v_i;
   17941           0 :   int __pyx_v_offset;
   17942           0 :   int __pyx_t_1;
   17943           0 :   int __pyx_t_2;
   17944           0 :   int __pyx_t_3;
   17945             : 
   17946             :   /* "View.MemoryView":1341
   17947             :  *                             int ndim_other) noexcept nogil:
   17948             :  *     cdef int i
   17949             :  *     cdef int offset = ndim_other - ndim             # <<<<<<<<<<<<<<
   17950             :  * 
   17951             :  *     for i in range(ndim - 1, -1, -1):
   17952             :  */
   17953           0 :   __pyx_v_offset = (__pyx_v_ndim_other - __pyx_v_ndim);
   17954             : 
   17955             :   /* "View.MemoryView":1343
   17956             :  *     cdef int offset = ndim_other - ndim
   17957             :  * 
   17958             :  *     for i in range(ndim - 1, -1, -1):             # <<<<<<<<<<<<<<
   17959             :  *         mslice.shape[i + offset] = mslice.shape[i]
   17960             :  *         mslice.strides[i + offset] = mslice.strides[i]
   17961             :  */
   17962           0 :   for (__pyx_t_1 = (__pyx_v_ndim - 1); __pyx_t_1 > -1; __pyx_t_1-=1) {
   17963           0 :     __pyx_v_i = __pyx_t_1;
   17964             : 
   17965             :     /* "View.MemoryView":1344
   17966             :  * 
   17967             :  *     for i in range(ndim - 1, -1, -1):
   17968             :  *         mslice.shape[i + offset] = mslice.shape[i]             # <<<<<<<<<<<<<<
   17969             :  *         mslice.strides[i + offset] = mslice.strides[i]
   17970             :  *         mslice.suboffsets[i + offset] = mslice.suboffsets[i]
   17971             :  */
   17972           0 :     (__pyx_v_mslice->shape[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->shape[__pyx_v_i]);
   17973             : 
   17974             :     /* "View.MemoryView":1345
   17975             :  *     for i in range(ndim - 1, -1, -1):
   17976             :  *         mslice.shape[i + offset] = mslice.shape[i]
   17977             :  *         mslice.strides[i + offset] = mslice.strides[i]             # <<<<<<<<<<<<<<
   17978             :  *         mslice.suboffsets[i + offset] = mslice.suboffsets[i]
   17979             :  * 
   17980             :  */
   17981           0 :     (__pyx_v_mslice->strides[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->strides[__pyx_v_i]);
   17982             : 
   17983             :     /* "View.MemoryView":1346
   17984             :  *         mslice.shape[i + offset] = mslice.shape[i]
   17985             :  *         mslice.strides[i + offset] = mslice.strides[i]
   17986             :  *         mslice.suboffsets[i + offset] = mslice.suboffsets[i]             # <<<<<<<<<<<<<<
   17987             :  * 
   17988             :  *     for i in range(offset):
   17989             :  */
   17990           0 :     (__pyx_v_mslice->suboffsets[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->suboffsets[__pyx_v_i]);
   17991             :   }
   17992             : 
   17993             :   /* "View.MemoryView":1348
   17994             :  *         mslice.suboffsets[i + offset] = mslice.suboffsets[i]
   17995             :  * 
   17996             :  *     for i in range(offset):             # <<<<<<<<<<<<<<
   17997             :  *         mslice.shape[i] = 1
   17998             :  *         mslice.strides[i] = mslice.strides[0]
   17999             :  */
   18000           0 :   __pyx_t_1 = __pyx_v_offset;
   18001             :   __pyx_t_2 = __pyx_t_1;
   18002           0 :   for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
   18003           0 :     __pyx_v_i = __pyx_t_3;
   18004             : 
   18005             :     /* "View.MemoryView":1349
   18006             :  * 
   18007             :  *     for i in range(offset):
   18008             :  *         mslice.shape[i] = 1             # <<<<<<<<<<<<<<
   18009             :  *         mslice.strides[i] = mslice.strides[0]
   18010             :  *         mslice.suboffsets[i] = -1
   18011             :  */
   18012           0 :     (__pyx_v_mslice->shape[__pyx_v_i]) = 1;
   18013             : 
   18014             :     /* "View.MemoryView":1350
   18015             :  *     for i in range(offset):
   18016             :  *         mslice.shape[i] = 1
   18017             :  *         mslice.strides[i] = mslice.strides[0]             # <<<<<<<<<<<<<<
   18018             :  *         mslice.suboffsets[i] = -1
   18019             :  * 
   18020             :  */
   18021           0 :     (__pyx_v_mslice->strides[__pyx_v_i]) = (__pyx_v_mslice->strides[0]);
   18022             : 
   18023             :     /* "View.MemoryView":1351
   18024             :  *         mslice.shape[i] = 1
   18025             :  *         mslice.strides[i] = mslice.strides[0]
   18026             :  *         mslice.suboffsets[i] = -1             # <<<<<<<<<<<<<<
   18027             :  * 
   18028             :  * 
   18029             :  */
   18030           0 :     (__pyx_v_mslice->suboffsets[__pyx_v_i]) = -1L;
   18031             :   }
   18032             : 
   18033             :   /* "View.MemoryView":1337
   18034             :  * 
   18035             :  * @cname('__pyx_memoryview_broadcast_leading')
   18036             :  * cdef void broadcast_leading(__Pyx_memviewslice *mslice,             # <<<<<<<<<<<<<<
   18037             :  *                             int ndim,
   18038             :  *                             int ndim_other) noexcept nogil:
   18039             :  */
   18040             : 
   18041             :   /* function exit code */
   18042           0 : }
   18043             : 
   18044             : /* "View.MemoryView":1359
   18045             :  * 
   18046             :  * @cname('__pyx_memoryview_refcount_copying')
   18047             :  * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, int ndim, bint inc) noexcept nogil:             # <<<<<<<<<<<<<<
   18048             :  * 
   18049             :  *     if dtype_is_object:
   18050             :  */
   18051             : 
   18052           0 : static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *__pyx_v_dst, int __pyx_v_dtype_is_object, int __pyx_v_ndim, int __pyx_v_inc) {
   18053             : 
   18054             :   /* "View.MemoryView":1361
   18055             :  * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, int ndim, bint inc) noexcept nogil:
   18056             :  * 
   18057             :  *     if dtype_is_object:             # <<<<<<<<<<<<<<
   18058             :  *         refcount_objects_in_slice_with_gil(dst.data, dst.shape, dst.strides, ndim, inc)
   18059             :  * 
   18060             :  */
   18061           0 :   if (__pyx_v_dtype_is_object) {
   18062             : 
   18063             :     /* "View.MemoryView":1362
   18064             :  * 
   18065             :  *     if dtype_is_object:
   18066             :  *         refcount_objects_in_slice_with_gil(dst.data, dst.shape, dst.strides, ndim, inc)             # <<<<<<<<<<<<<<
   18067             :  * 
   18068             :  * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil')
   18069             :  */
   18070           0 :     __pyx_memoryview_refcount_objects_in_slice_with_gil(__pyx_v_dst->data, __pyx_v_dst->shape, __pyx_v_dst->strides, __pyx_v_ndim, __pyx_v_inc);
   18071             : 
   18072             :     /* "View.MemoryView":1361
   18073             :  * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, int ndim, bint inc) noexcept nogil:
   18074             :  * 
   18075             :  *     if dtype_is_object:             # <<<<<<<<<<<<<<
   18076             :  *         refcount_objects_in_slice_with_gil(dst.data, dst.shape, dst.strides, ndim, inc)
   18077             :  * 
   18078             :  */
   18079             :   }
   18080             : 
   18081             :   /* "View.MemoryView":1359
   18082             :  * 
   18083             :  * @cname('__pyx_memoryview_refcount_copying')
   18084             :  * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, int ndim, bint inc) noexcept nogil:             # <<<<<<<<<<<<<<
   18085             :  * 
   18086             :  *     if dtype_is_object:
   18087             :  */
   18088             : 
   18089             :   /* function exit code */
   18090           0 : }
   18091             : 
   18092             : /* "View.MemoryView":1365
   18093             :  * 
   18094             :  * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil')
   18095             :  * cdef void refcount_objects_in_slice_with_gil(char *data, Py_ssize_t *shape,             # <<<<<<<<<<<<<<
   18096             :  *                                              Py_ssize_t *strides, int ndim,
   18097             :  *                                              bint inc) noexcept with gil:
   18098             :  */
   18099             : 
   18100           0 : static void __pyx_memoryview_refcount_objects_in_slice_with_gil(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, int __pyx_v_inc) {
   18101             :   #ifdef WITH_THREAD
   18102           0 :   PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
   18103             :   #endif
   18104             : 
   18105             :   /* "View.MemoryView":1368
   18106             :  *                                              Py_ssize_t *strides, int ndim,
   18107             :  *                                              bint inc) noexcept with gil:
   18108             :  *     refcount_objects_in_slice(data, shape, strides, ndim, inc)             # <<<<<<<<<<<<<<
   18109             :  * 
   18110             :  * @cname('__pyx_memoryview_refcount_objects_in_slice')
   18111             :  */
   18112           0 :   __pyx_memoryview_refcount_objects_in_slice(__pyx_v_data, __pyx_v_shape, __pyx_v_strides, __pyx_v_ndim, __pyx_v_inc);
   18113             : 
   18114             :   /* "View.MemoryView":1365
   18115             :  * 
   18116             :  * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil')
   18117             :  * cdef void refcount_objects_in_slice_with_gil(char *data, Py_ssize_t *shape,             # <<<<<<<<<<<<<<
   18118             :  *                                              Py_ssize_t *strides, int ndim,
   18119             :  *                                              bint inc) noexcept with gil:
   18120             :  */
   18121             : 
   18122             :   /* function exit code */
   18123             :   #ifdef WITH_THREAD
   18124           0 :   __Pyx_PyGILState_Release(__pyx_gilstate_save);
   18125             :   #endif
   18126           0 : }
   18127             : 
   18128             : /* "View.MemoryView":1371
   18129             :  * 
   18130             :  * @cname('__pyx_memoryview_refcount_objects_in_slice')
   18131             :  * cdef void refcount_objects_in_slice(char *data, Py_ssize_t *shape,             # <<<<<<<<<<<<<<
   18132             :  *                                     Py_ssize_t *strides, int ndim, bint inc) noexcept:
   18133             :  *     cdef Py_ssize_t i
   18134             :  */
   18135             : 
   18136           0 : static void __pyx_memoryview_refcount_objects_in_slice(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, int __pyx_v_inc) {
   18137           0 :   CYTHON_UNUSED Py_ssize_t __pyx_v_i;
   18138           0 :   Py_ssize_t __pyx_v_stride;
   18139           0 :   Py_ssize_t __pyx_t_1;
   18140           0 :   Py_ssize_t __pyx_t_2;
   18141           0 :   Py_ssize_t __pyx_t_3;
   18142           0 :   int __pyx_t_4;
   18143             : 
   18144             :   /* "View.MemoryView":1374
   18145             :  *                                     Py_ssize_t *strides, int ndim, bint inc) noexcept:
   18146             :  *     cdef Py_ssize_t i
   18147             :  *     cdef Py_ssize_t stride = strides[0]             # <<<<<<<<<<<<<<
   18148             :  * 
   18149             :  *     for i in range(shape[0]):
   18150             :  */
   18151           0 :   __pyx_v_stride = (__pyx_v_strides[0]);
   18152             : 
   18153             :   /* "View.MemoryView":1376
   18154             :  *     cdef Py_ssize_t stride = strides[0]
   18155             :  * 
   18156             :  *     for i in range(shape[0]):             # <<<<<<<<<<<<<<
   18157             :  *         if ndim == 1:
   18158             :  *             if inc:
   18159             :  */
   18160           0 :   __pyx_t_1 = (__pyx_v_shape[0]);
   18161           0 :   __pyx_t_2 = __pyx_t_1;
   18162           0 :   for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
   18163           0 :     __pyx_v_i = __pyx_t_3;
   18164             : 
   18165             :     /* "View.MemoryView":1377
   18166             :  * 
   18167             :  *     for i in range(shape[0]):
   18168             :  *         if ndim == 1:             # <<<<<<<<<<<<<<
   18169             :  *             if inc:
   18170             :  *                 Py_INCREF((<PyObject **> data)[0])
   18171             :  */
   18172           0 :     __pyx_t_4 = (__pyx_v_ndim == 1);
   18173           0 :     if (__pyx_t_4) {
   18174             : 
   18175             :       /* "View.MemoryView":1378
   18176             :  *     for i in range(shape[0]):
   18177             :  *         if ndim == 1:
   18178             :  *             if inc:             # <<<<<<<<<<<<<<
   18179             :  *                 Py_INCREF((<PyObject **> data)[0])
   18180             :  *             else:
   18181             :  */
   18182           0 :       if (__pyx_v_inc) {
   18183             : 
   18184             :         /* "View.MemoryView":1379
   18185             :  *         if ndim == 1:
   18186             :  *             if inc:
   18187             :  *                 Py_INCREF((<PyObject **> data)[0])             # <<<<<<<<<<<<<<
   18188             :  *             else:
   18189             :  *                 Py_DECREF((<PyObject **> data)[0])
   18190             :  */
   18191           0 :         Py_INCREF((((PyObject **)__pyx_v_data)[0]));
   18192             : 
   18193             :         /* "View.MemoryView":1378
   18194             :  *     for i in range(shape[0]):
   18195             :  *         if ndim == 1:
   18196             :  *             if inc:             # <<<<<<<<<<<<<<
   18197             :  *                 Py_INCREF((<PyObject **> data)[0])
   18198             :  *             else:
   18199             :  */
   18200           0 :         goto __pyx_L6;
   18201             :       }
   18202             : 
   18203             :       /* "View.MemoryView":1381
   18204             :  *                 Py_INCREF((<PyObject **> data)[0])
   18205             :  *             else:
   18206             :  *                 Py_DECREF((<PyObject **> data)[0])             # <<<<<<<<<<<<<<
   18207             :  *         else:
   18208             :  *             refcount_objects_in_slice(data, shape + 1, strides + 1, ndim - 1, inc)
   18209             :  */
   18210             :       /*else*/ {
   18211           0 :         Py_DECREF((((PyObject **)__pyx_v_data)[0]));
   18212             :       }
   18213           0 :       __pyx_L6:;
   18214             : 
   18215             :       /* "View.MemoryView":1377
   18216             :  * 
   18217             :  *     for i in range(shape[0]):
   18218             :  *         if ndim == 1:             # <<<<<<<<<<<<<<
   18219             :  *             if inc:
   18220             :  *                 Py_INCREF((<PyObject **> data)[0])
   18221             :  */
   18222           0 :       goto __pyx_L5;
   18223             :     }
   18224             : 
   18225             :     /* "View.MemoryView":1383
   18226             :  *                 Py_DECREF((<PyObject **> data)[0])
   18227             :  *         else:
   18228             :  *             refcount_objects_in_slice(data, shape + 1, strides + 1, ndim - 1, inc)             # <<<<<<<<<<<<<<
   18229             :  * 
   18230             :  *         data += stride
   18231             :  */
   18232             :     /*else*/ {
   18233           0 :       __pyx_memoryview_refcount_objects_in_slice(__pyx_v_data, (__pyx_v_shape + 1), (__pyx_v_strides + 1), (__pyx_v_ndim - 1), __pyx_v_inc);
   18234             :     }
   18235           0 :     __pyx_L5:;
   18236             : 
   18237             :     /* "View.MemoryView":1385
   18238             :  *             refcount_objects_in_slice(data, shape + 1, strides + 1, ndim - 1, inc)
   18239             :  * 
   18240             :  *         data += stride             # <<<<<<<<<<<<<<
   18241             :  * 
   18242             :  * 
   18243             :  */
   18244           0 :     __pyx_v_data = (__pyx_v_data + __pyx_v_stride);
   18245             :   }
   18246             : 
   18247             :   /* "View.MemoryView":1371
   18248             :  * 
   18249             :  * @cname('__pyx_memoryview_refcount_objects_in_slice')
   18250             :  * cdef void refcount_objects_in_slice(char *data, Py_ssize_t *shape,             # <<<<<<<<<<<<<<
   18251             :  *                                     Py_ssize_t *strides, int ndim, bint inc) noexcept:
   18252             :  *     cdef Py_ssize_t i
   18253             :  */
   18254             : 
   18255             :   /* function exit code */
   18256           0 : }
   18257             : 
   18258             : /* "View.MemoryView":1391
   18259             :  * 
   18260             :  * @cname('__pyx_memoryview_slice_assign_scalar')
   18261             :  * cdef void slice_assign_scalar(__Pyx_memviewslice *dst, int ndim,             # <<<<<<<<<<<<<<
   18262             :  *                               size_t itemsize, void *item,
   18263             :  *                               bint dtype_is_object) noexcept nogil:
   18264             :  */
   18265             : 
   18266           0 : static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *__pyx_v_dst, int __pyx_v_ndim, size_t __pyx_v_itemsize, void *__pyx_v_item, int __pyx_v_dtype_is_object) {
   18267             : 
   18268             :   /* "View.MemoryView":1394
   18269             :  *                               size_t itemsize, void *item,
   18270             :  *                               bint dtype_is_object) noexcept nogil:
   18271             :  *     refcount_copying(dst, dtype_is_object, ndim, inc=False)             # <<<<<<<<<<<<<<
   18272             :  *     _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim, itemsize, item)
   18273             :  *     refcount_copying(dst, dtype_is_object, ndim, inc=True)
   18274             :  */
   18275           0 :   __pyx_memoryview_refcount_copying(__pyx_v_dst, __pyx_v_dtype_is_object, __pyx_v_ndim, 0);
   18276             : 
   18277             :   /* "View.MemoryView":1395
   18278             :  *                               bint dtype_is_object) noexcept nogil:
   18279             :  *     refcount_copying(dst, dtype_is_object, ndim, inc=False)
   18280             :  *     _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim, itemsize, item)             # <<<<<<<<<<<<<<
   18281             :  *     refcount_copying(dst, dtype_is_object, ndim, inc=True)
   18282             :  * 
   18283             :  */
   18284           0 :   __pyx_memoryview__slice_assign_scalar(__pyx_v_dst->data, __pyx_v_dst->shape, __pyx_v_dst->strides, __pyx_v_ndim, __pyx_v_itemsize, __pyx_v_item);
   18285             : 
   18286             :   /* "View.MemoryView":1396
   18287             :  *     refcount_copying(dst, dtype_is_object, ndim, inc=False)
   18288             :  *     _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim, itemsize, item)
   18289             :  *     refcount_copying(dst, dtype_is_object, ndim, inc=True)             # <<<<<<<<<<<<<<
   18290             :  * 
   18291             :  * 
   18292             :  */
   18293           0 :   __pyx_memoryview_refcount_copying(__pyx_v_dst, __pyx_v_dtype_is_object, __pyx_v_ndim, 1);
   18294             : 
   18295             :   /* "View.MemoryView":1391
   18296             :  * 
   18297             :  * @cname('__pyx_memoryview_slice_assign_scalar')
   18298             :  * cdef void slice_assign_scalar(__Pyx_memviewslice *dst, int ndim,             # <<<<<<<<<<<<<<
   18299             :  *                               size_t itemsize, void *item,
   18300             :  *                               bint dtype_is_object) noexcept nogil:
   18301             :  */
   18302             : 
   18303             :   /* function exit code */
   18304           0 : }
   18305             : 
   18306             : /* "View.MemoryView":1400
   18307             :  * 
   18308             :  * @cname('__pyx_memoryview__slice_assign_scalar')
   18309             :  * cdef void _slice_assign_scalar(char *data, Py_ssize_t *shape,             # <<<<<<<<<<<<<<
   18310             :  *                               Py_ssize_t *strides, int ndim,
   18311             :  *                               size_t itemsize, void *item) noexcept nogil:
   18312             :  */
   18313             : 
   18314           0 : static void __pyx_memoryview__slice_assign_scalar(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, size_t __pyx_v_itemsize, void *__pyx_v_item) {
   18315           0 :   CYTHON_UNUSED Py_ssize_t __pyx_v_i;
   18316           0 :   Py_ssize_t __pyx_v_stride;
   18317           0 :   Py_ssize_t __pyx_v_extent;
   18318           0 :   int __pyx_t_1;
   18319           0 :   Py_ssize_t __pyx_t_2;
   18320           0 :   Py_ssize_t __pyx_t_3;
   18321           0 :   Py_ssize_t __pyx_t_4;
   18322             : 
   18323             :   /* "View.MemoryView":1404
   18324             :  *                               size_t itemsize, void *item) noexcept nogil:
   18325             :  *     cdef Py_ssize_t i
   18326             :  *     cdef Py_ssize_t stride = strides[0]             # <<<<<<<<<<<<<<
   18327             :  *     cdef Py_ssize_t extent = shape[0]
   18328             :  * 
   18329             :  */
   18330           0 :   __pyx_v_stride = (__pyx_v_strides[0]);
   18331             : 
   18332             :   /* "View.MemoryView":1405
   18333             :  *     cdef Py_ssize_t i
   18334             :  *     cdef Py_ssize_t stride = strides[0]
   18335             :  *     cdef Py_ssize_t extent = shape[0]             # <<<<<<<<<<<<<<
   18336             :  * 
   18337             :  *     if ndim == 1:
   18338             :  */
   18339           0 :   __pyx_v_extent = (__pyx_v_shape[0]);
   18340             : 
   18341             :   /* "View.MemoryView":1407
   18342             :  *     cdef Py_ssize_t extent = shape[0]
   18343             :  * 
   18344             :  *     if ndim == 1:             # <<<<<<<<<<<<<<
   18345             :  *         for i in range(extent):
   18346             :  *             memcpy(data, item, itemsize)
   18347             :  */
   18348           0 :   __pyx_t_1 = (__pyx_v_ndim == 1);
   18349           0 :   if (__pyx_t_1) {
   18350             : 
   18351             :     /* "View.MemoryView":1408
   18352             :  * 
   18353             :  *     if ndim == 1:
   18354             :  *         for i in range(extent):             # <<<<<<<<<<<<<<
   18355             :  *             memcpy(data, item, itemsize)
   18356             :  *             data += stride
   18357             :  */
   18358             :     __pyx_t_2 = __pyx_v_extent;
   18359             :     __pyx_t_3 = __pyx_t_2;
   18360           0 :     for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
   18361           0 :       __pyx_v_i = __pyx_t_4;
   18362             : 
   18363             :       /* "View.MemoryView":1409
   18364             :  *     if ndim == 1:
   18365             :  *         for i in range(extent):
   18366             :  *             memcpy(data, item, itemsize)             # <<<<<<<<<<<<<<
   18367             :  *             data += stride
   18368             :  *     else:
   18369             :  */
   18370           0 :       (void)(memcpy(__pyx_v_data, __pyx_v_item, __pyx_v_itemsize));
   18371             : 
   18372             :       /* "View.MemoryView":1410
   18373             :  *         for i in range(extent):
   18374             :  *             memcpy(data, item, itemsize)
   18375             :  *             data += stride             # <<<<<<<<<<<<<<
   18376             :  *     else:
   18377             :  *         for i in range(extent):
   18378             :  */
   18379           0 :       __pyx_v_data = (__pyx_v_data + __pyx_v_stride);
   18380             :     }
   18381             : 
   18382             :     /* "View.MemoryView":1407
   18383             :  *     cdef Py_ssize_t extent = shape[0]
   18384             :  * 
   18385             :  *     if ndim == 1:             # <<<<<<<<<<<<<<
   18386             :  *         for i in range(extent):
   18387             :  *             memcpy(data, item, itemsize)
   18388             :  */
   18389           0 :     goto __pyx_L3;
   18390             :   }
   18391             : 
   18392             :   /* "View.MemoryView":1412
   18393             :  *             data += stride
   18394             :  *     else:
   18395             :  *         for i in range(extent):             # <<<<<<<<<<<<<<
   18396             :  *             _slice_assign_scalar(data, shape + 1, strides + 1, ndim - 1, itemsize, item)
   18397             :  *             data += stride
   18398             :  */
   18399             :   /*else*/ {
   18400             :     __pyx_t_2 = __pyx_v_extent;
   18401             :     __pyx_t_3 = __pyx_t_2;
   18402           0 :     for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
   18403           0 :       __pyx_v_i = __pyx_t_4;
   18404             : 
   18405             :       /* "View.MemoryView":1413
   18406             :  *     else:
   18407             :  *         for i in range(extent):
   18408             :  *             _slice_assign_scalar(data, shape + 1, strides + 1, ndim - 1, itemsize, item)             # <<<<<<<<<<<<<<
   18409             :  *             data += stride
   18410             :  * 
   18411             :  */
   18412           0 :       __pyx_memoryview__slice_assign_scalar(__pyx_v_data, (__pyx_v_shape + 1), (__pyx_v_strides + 1), (__pyx_v_ndim - 1), __pyx_v_itemsize, __pyx_v_item);
   18413             : 
   18414             :       /* "View.MemoryView":1414
   18415             :  *         for i in range(extent):
   18416             :  *             _slice_assign_scalar(data, shape + 1, strides + 1, ndim - 1, itemsize, item)
   18417             :  *             data += stride             # <<<<<<<<<<<<<<
   18418             :  * 
   18419             :  * 
   18420             :  */
   18421           0 :       __pyx_v_data = (__pyx_v_data + __pyx_v_stride);
   18422             :     }
   18423             :   }
   18424           0 :   __pyx_L3:;
   18425             : 
   18426             :   /* "View.MemoryView":1400
   18427             :  * 
   18428             :  * @cname('__pyx_memoryview__slice_assign_scalar')
   18429             :  * cdef void _slice_assign_scalar(char *data, Py_ssize_t *shape,             # <<<<<<<<<<<<<<
   18430             :  *                               Py_ssize_t *strides, int ndim,
   18431             :  *                               size_t itemsize, void *item) noexcept nogil:
   18432             :  */
   18433             : 
   18434             :   /* function exit code */
   18435           0 : }
   18436             : 
   18437             : /* "(tree fragment)":1
   18438             :  * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
   18439             :  *     cdef object __pyx_PickleError
   18440             :  *     cdef object __pyx_result
   18441             :  */
   18442             : 
   18443             : /* Python wrapper */
   18444             : static PyObject *__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum(PyObject *__pyx_self, 
   18445             : #if CYTHON_METH_FASTCALL
   18446             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   18447             : #else
   18448             : PyObject *__pyx_args, PyObject *__pyx_kwds
   18449             : #endif
   18450             : ); /*proto*/
   18451             : static PyMethodDef __pyx_mdef_15View_dot_MemoryView_1__pyx_unpickle_Enum = {"__pyx_unpickle_Enum", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
   18452           0 : static PyObject *__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum(PyObject *__pyx_self, 
   18453             : #if CYTHON_METH_FASTCALL
   18454             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   18455             : #else
   18456             : PyObject *__pyx_args, PyObject *__pyx_kwds
   18457             : #endif
   18458             : ) {
   18459           0 :   PyObject *__pyx_v___pyx_type = 0;
   18460           0 :   long __pyx_v___pyx_checksum;
   18461           0 :   PyObject *__pyx_v___pyx_state = 0;
   18462             :   #if !CYTHON_METH_FASTCALL
   18463             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
   18464             :   #endif
   18465           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   18466           0 :   PyObject* values[3] = {0,0,0};
   18467           0 :   int __pyx_lineno = 0;
   18468           0 :   const char *__pyx_filename = NULL;
   18469           0 :   int __pyx_clineno = 0;
   18470           0 :   PyObject *__pyx_r = 0;
   18471             :   __Pyx_RefNannyDeclarations
   18472           0 :   __Pyx_RefNannySetupContext("__pyx_unpickle_Enum (wrapper)", 0);
   18473             :   #if !CYTHON_METH_FASTCALL
   18474             :   #if CYTHON_ASSUME_SAFE_MACROS
   18475             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
   18476             :   #else
   18477             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
   18478             :   #endif
   18479             :   #endif
   18480           0 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
   18481             :   {
   18482           0 :     PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
   18483           0 :     if (__pyx_kwds) {
   18484           0 :       Py_ssize_t kw_args;
   18485           0 :       switch (__pyx_nargs) {
   18486           0 :         case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
   18487           0 :         CYTHON_FALLTHROUGH;
   18488           0 :         case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
   18489           0 :         CYTHON_FALLTHROUGH;
   18490           0 :         case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
   18491           0 :         CYTHON_FALLTHROUGH;
   18492           0 :         case  0: break;
   18493           0 :         default: goto __pyx_L5_argtuple_error;
   18494             :       }
   18495           0 :       kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
   18496           0 :       switch (__pyx_nargs) {
   18497           0 :         case  0:
   18498           0 :         if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) {
   18499           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
   18500           0 :           kw_args--;
   18501             :         }
   18502           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
   18503           0 :         else goto __pyx_L5_argtuple_error;
   18504           0 :         CYTHON_FALLTHROUGH;
   18505             :         case  1:
   18506           0 :         if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) {
   18507           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
   18508           0 :           kw_args--;
   18509             :         }
   18510           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
   18511             :         else {
   18512           0 :           __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
   18513             :         }
   18514           0 :         CYTHON_FALLTHROUGH;
   18515             :         case  2:
   18516           0 :         if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
   18517           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
   18518           0 :           kw_args--;
   18519             :         }
   18520           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
   18521             :         else {
   18522           0 :           __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
   18523             :         }
   18524             :       }
   18525           0 :       if (unlikely(kw_args > 0)) {
   18526           0 :         const Py_ssize_t kwd_pos_args = __pyx_nargs;
   18527           0 :         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_Enum") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
   18528             :       }
   18529           0 :     } else if (unlikely(__pyx_nargs != 3)) {
   18530           0 :       goto __pyx_L5_argtuple_error;
   18531             :     } else {
   18532           0 :       values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
   18533           0 :       values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
   18534           0 :       values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
   18535             :     }
   18536           0 :     __pyx_v___pyx_type = values[0];
   18537           0 :     __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
   18538           0 :     __pyx_v___pyx_state = values[2];
   18539             :   }
   18540           0 :   goto __pyx_L6_skip;
   18541           0 :   __pyx_L5_argtuple_error:;
   18542           0 :   __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 1, __pyx_L3_error)
   18543           0 :   __pyx_L6_skip:;
   18544           0 :   goto __pyx_L4_argument_unpacking_done;
   18545           0 :   __pyx_L3_error:;
   18546             :   {
   18547           0 :     Py_ssize_t __pyx_temp;
   18548           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   18549             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
   18550             :     }
   18551             :   }
   18552           0 :   __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum", __pyx_clineno, __pyx_lineno, __pyx_filename);
   18553           0 :   __Pyx_RefNannyFinishContext();
   18554           0 :   return NULL;
   18555           0 :   __pyx_L4_argument_unpacking_done:;
   18556           0 :   __pyx_r = __pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
   18557             : 
   18558             :   /* function exit code */
   18559             :   {
   18560           0 :     Py_ssize_t __pyx_temp;
   18561           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   18562             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
   18563             :     }
   18564             :   }
   18565             :   __Pyx_RefNannyFinishContext();
   18566             :   return __pyx_r;
   18567             : }
   18568             : 
   18569           0 : static PyObject *__pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
   18570           0 :   PyObject *__pyx_v___pyx_PickleError = 0;
   18571           0 :   PyObject *__pyx_v___pyx_result = 0;
   18572           0 :   PyObject *__pyx_r = NULL;
   18573             :   __Pyx_RefNannyDeclarations
   18574           0 :   PyObject *__pyx_t_1 = NULL;
   18575           0 :   int __pyx_t_2;
   18576           0 :   PyObject *__pyx_t_3 = NULL;
   18577           0 :   PyObject *__pyx_t_4 = NULL;
   18578           0 :   unsigned int __pyx_t_5;
   18579           0 :   int __pyx_lineno = 0;
   18580           0 :   const char *__pyx_filename = NULL;
   18581           0 :   int __pyx_clineno = 0;
   18582           0 :   __Pyx_RefNannySetupContext("__pyx_unpickle_Enum", 1);
   18583             : 
   18584             :   /* "(tree fragment)":4
   18585             :  *     cdef object __pyx_PickleError
   18586             :  *     cdef object __pyx_result
   18587             :  *     if __pyx_checksum not in (0x82a3537, 0x6ae9995, 0xb068931):             # <<<<<<<<<<<<<<
   18588             :  *         from pickle import PickleError as __pyx_PickleError
   18589             :  *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x82a3537, 0x6ae9995, 0xb068931) = (name))" % __pyx_checksum
   18590             :  */
   18591           0 :   __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
   18592           0 :   __Pyx_GOTREF(__pyx_t_1);
   18593           0 :   __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__8, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(1, 4, __pyx_L1_error)
   18594           0 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   18595           0 :   if (__pyx_t_2) {
   18596             : 
   18597             :     /* "(tree fragment)":5
   18598             :  *     cdef object __pyx_result
   18599             :  *     if __pyx_checksum not in (0x82a3537, 0x6ae9995, 0xb068931):
   18600             :  *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
   18601             :  *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x82a3537, 0x6ae9995, 0xb068931) = (name))" % __pyx_checksum
   18602             :  *     __pyx_result = Enum.__new__(__pyx_type)
   18603             :  */
   18604           0 :     __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
   18605           0 :     __Pyx_GOTREF(__pyx_t_1);
   18606           0 :     __Pyx_INCREF(__pyx_n_s_PickleError);
   18607           0 :     __Pyx_GIVEREF(__pyx_n_s_PickleError);
   18608           0 :     if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError)) __PYX_ERR(1, 5, __pyx_L1_error);
   18609           0 :     __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
   18610           0 :     __Pyx_GOTREF(__pyx_t_3);
   18611           0 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   18612           0 :     __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
   18613           0 :     __Pyx_GOTREF(__pyx_t_1);
   18614           0 :     __Pyx_INCREF(__pyx_t_1);
   18615           0 :     __pyx_v___pyx_PickleError = __pyx_t_1;
   18616           0 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   18617           0 :     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   18618             : 
   18619             :     /* "(tree fragment)":6
   18620             :  *     if __pyx_checksum not in (0x82a3537, 0x6ae9995, 0xb068931):
   18621             :  *         from pickle import PickleError as __pyx_PickleError
   18622             :  *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x82a3537, 0x6ae9995, 0xb068931) = (name))" % __pyx_checksum             # <<<<<<<<<<<<<<
   18623             :  *     __pyx_result = Enum.__new__(__pyx_type)
   18624             :  *     if __pyx_state is not None:
   18625             :  */
   18626           0 :     __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
   18627           0 :     __Pyx_GOTREF(__pyx_t_3);
   18628           0 :     __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
   18629           0 :     __Pyx_GOTREF(__pyx_t_1);
   18630           0 :     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   18631           0 :     __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_1, 0, 0);
   18632           0 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   18633           0 :     __PYX_ERR(1, 6, __pyx_L1_error)
   18634             : 
   18635             :     /* "(tree fragment)":4
   18636             :  *     cdef object __pyx_PickleError
   18637             :  *     cdef object __pyx_result
   18638             :  *     if __pyx_checksum not in (0x82a3537, 0x6ae9995, 0xb068931):             # <<<<<<<<<<<<<<
   18639             :  *         from pickle import PickleError as __pyx_PickleError
   18640             :  *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x82a3537, 0x6ae9995, 0xb068931) = (name))" % __pyx_checksum
   18641             :  */
   18642             :   }
   18643             : 
   18644             :   /* "(tree fragment)":7
   18645             :  *         from pickle import PickleError as __pyx_PickleError
   18646             :  *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x82a3537, 0x6ae9995, 0xb068931) = (name))" % __pyx_checksum
   18647             :  *     __pyx_result = Enum.__new__(__pyx_type)             # <<<<<<<<<<<<<<
   18648             :  *     if __pyx_state is not None:
   18649             :  *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
   18650             :  */
   18651           0 :   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_MemviewEnum_type), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
   18652           0 :   __Pyx_GOTREF(__pyx_t_3);
   18653           0 :   __pyx_t_4 = NULL;
   18654           0 :   __pyx_t_5 = 0;
   18655             :   #if CYTHON_UNPACK_METHODS
   18656           0 :   if (likely(PyMethod_Check(__pyx_t_3))) {
   18657           0 :     __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
   18658           0 :     if (likely(__pyx_t_4)) {
   18659           0 :       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
   18660           0 :       __Pyx_INCREF(__pyx_t_4);
   18661           0 :       __Pyx_INCREF(function);
   18662           0 :       __Pyx_DECREF_SET(__pyx_t_3, function);
   18663             :       __pyx_t_5 = 1;
   18664             :     }
   18665             :   }
   18666             :   #endif
   18667             :   {
   18668           0 :     PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
   18669           0 :     __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
   18670           0 :     __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
   18671           0 :     if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
   18672           0 :     __Pyx_GOTREF(__pyx_t_1);
   18673           0 :     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   18674             :   }
   18675           0 :   __pyx_v___pyx_result = __pyx_t_1;
   18676           0 :   __pyx_t_1 = 0;
   18677             : 
   18678             :   /* "(tree fragment)":8
   18679             :  *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x82a3537, 0x6ae9995, 0xb068931) = (name))" % __pyx_checksum
   18680             :  *     __pyx_result = Enum.__new__(__pyx_type)
   18681             :  *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
   18682             :  *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
   18683             :  *     return __pyx_result
   18684             :  */
   18685           0 :   __pyx_t_2 = (__pyx_v___pyx_state != Py_None);
   18686           0 :   if (__pyx_t_2) {
   18687             : 
   18688             :     /* "(tree fragment)":9
   18689             :  *     __pyx_result = Enum.__new__(__pyx_type)
   18690             :  *     if __pyx_state is not None:
   18691             :  *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
   18692             :  *     return __pyx_result
   18693             :  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
   18694             :  */
   18695           0 :     if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(1, 9, __pyx_L1_error)
   18696           0 :     __pyx_t_1 = __pyx_unpickle_Enum__set_state(((struct __pyx_MemviewEnum_obj *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 9, __pyx_L1_error)
   18697           0 :     __Pyx_GOTREF(__pyx_t_1);
   18698           0 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   18699             : 
   18700             :     /* "(tree fragment)":8
   18701             :  *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x82a3537, 0x6ae9995, 0xb068931) = (name))" % __pyx_checksum
   18702             :  *     __pyx_result = Enum.__new__(__pyx_type)
   18703             :  *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
   18704             :  *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
   18705             :  *     return __pyx_result
   18706             :  */
   18707             :   }
   18708             : 
   18709             :   /* "(tree fragment)":10
   18710             :  *     if __pyx_state is not None:
   18711             :  *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
   18712             :  *     return __pyx_result             # <<<<<<<<<<<<<<
   18713             :  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
   18714             :  *     __pyx_result.name = __pyx_state[0]
   18715             :  */
   18716           0 :   __Pyx_XDECREF(__pyx_r);
   18717           0 :   __Pyx_INCREF(__pyx_v___pyx_result);
   18718           0 :   __pyx_r = __pyx_v___pyx_result;
   18719           0 :   goto __pyx_L0;
   18720             : 
   18721             :   /* "(tree fragment)":1
   18722             :  * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
   18723             :  *     cdef object __pyx_PickleError
   18724             :  *     cdef object __pyx_result
   18725             :  */
   18726             : 
   18727             :   /* function exit code */
   18728           0 :   __pyx_L1_error:;
   18729           0 :   __Pyx_XDECREF(__pyx_t_1);
   18730           0 :   __Pyx_XDECREF(__pyx_t_3);
   18731           0 :   __Pyx_XDECREF(__pyx_t_4);
   18732           0 :   __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum", __pyx_clineno, __pyx_lineno, __pyx_filename);
   18733           0 :   __pyx_r = NULL;
   18734           0 :   __pyx_L0:;
   18735           0 :   __Pyx_XDECREF(__pyx_v___pyx_PickleError);
   18736           0 :   __Pyx_XDECREF(__pyx_v___pyx_result);
   18737           0 :   __Pyx_XGIVEREF(__pyx_r);
   18738           0 :   __Pyx_RefNannyFinishContext();
   18739           0 :   return __pyx_r;
   18740             : }
   18741             : 
   18742             : /* "(tree fragment)":11
   18743             :  *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
   18744             :  *     return __pyx_result
   18745             :  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
   18746             :  *     __pyx_result.name = __pyx_state[0]
   18747             :  *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
   18748             :  */
   18749             : 
   18750           0 : static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
   18751           0 :   PyObject *__pyx_r = NULL;
   18752             :   __Pyx_RefNannyDeclarations
   18753           0 :   PyObject *__pyx_t_1 = NULL;
   18754           0 :   int __pyx_t_2;
   18755           0 :   Py_ssize_t __pyx_t_3;
   18756           0 :   int __pyx_t_4;
   18757           0 :   PyObject *__pyx_t_5 = NULL;
   18758           0 :   PyObject *__pyx_t_6 = NULL;
   18759           0 :   PyObject *__pyx_t_7 = NULL;
   18760           0 :   unsigned int __pyx_t_8;
   18761           0 :   int __pyx_lineno = 0;
   18762           0 :   const char *__pyx_filename = NULL;
   18763           0 :   int __pyx_clineno = 0;
   18764           0 :   __Pyx_RefNannySetupContext("__pyx_unpickle_Enum__set_state", 1);
   18765             : 
   18766             :   /* "(tree fragment)":12
   18767             :  *     return __pyx_result
   18768             :  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
   18769             :  *     __pyx_result.name = __pyx_state[0]             # <<<<<<<<<<<<<<
   18770             :  *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
   18771             :  *         __pyx_result.__dict__.update(__pyx_state[1])
   18772             :  */
   18773           0 :   if (unlikely(__pyx_v___pyx_state == Py_None)) {
   18774           0 :     PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
   18775           0 :     __PYX_ERR(1, 12, __pyx_L1_error)
   18776             :   }
   18777           0 :   __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
   18778           0 :   __Pyx_GOTREF(__pyx_t_1);
   18779           0 :   __Pyx_GIVEREF(__pyx_t_1);
   18780           0 :   __Pyx_GOTREF(__pyx_v___pyx_result->name);
   18781           0 :   __Pyx_DECREF(__pyx_v___pyx_result->name);
   18782           0 :   __pyx_v___pyx_result->name = __pyx_t_1;
   18783           0 :   __pyx_t_1 = 0;
   18784             : 
   18785             :   /* "(tree fragment)":13
   18786             :  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
   18787             :  *     __pyx_result.name = __pyx_state[0]
   18788             :  *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
   18789             :  *         __pyx_result.__dict__.update(__pyx_state[1])
   18790             :  */
   18791           0 :   if (unlikely(__pyx_v___pyx_state == Py_None)) {
   18792             :     PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
   18793             :     __PYX_ERR(1, 13, __pyx_L1_error)
   18794             :   }
   18795           0 :   __pyx_t_3 = __Pyx_PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
   18796           0 :   __pyx_t_4 = (__pyx_t_3 > 1);
   18797           0 :   if (__pyx_t_4) {
   18798           0 :   } else {
   18799           0 :     __pyx_t_2 = __pyx_t_4;
   18800           0 :     goto __pyx_L4_bool_binop_done;
   18801             :   }
   18802           0 :   __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
   18803             :   __pyx_t_2 = __pyx_t_4;
   18804           0 :   __pyx_L4_bool_binop_done:;
   18805           0 :   if (__pyx_t_2) {
   18806             : 
   18807             :     /* "(tree fragment)":14
   18808             :  *     __pyx_result.name = __pyx_state[0]
   18809             :  *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
   18810             :  *         __pyx_result.__dict__.update(__pyx_state[1])             # <<<<<<<<<<<<<<
   18811             :  */
   18812           0 :     __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 14, __pyx_L1_error)
   18813           0 :     __Pyx_GOTREF(__pyx_t_5);
   18814           0 :     __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_update); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
   18815           0 :     __Pyx_GOTREF(__pyx_t_6);
   18816           0 :     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   18817           0 :     if (unlikely(__pyx_v___pyx_state == Py_None)) {
   18818             :       PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
   18819             :       __PYX_ERR(1, 14, __pyx_L1_error)
   18820             :     }
   18821           0 :     __pyx_t_5 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 14, __pyx_L1_error)
   18822           0 :     __Pyx_GOTREF(__pyx_t_5);
   18823           0 :     __pyx_t_7 = NULL;
   18824           0 :     __pyx_t_8 = 0;
   18825             :     #if CYTHON_UNPACK_METHODS
   18826           0 :     if (likely(PyMethod_Check(__pyx_t_6))) {
   18827           0 :       __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
   18828           0 :       if (likely(__pyx_t_7)) {
   18829           0 :         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
   18830           0 :         __Pyx_INCREF(__pyx_t_7);
   18831           0 :         __Pyx_INCREF(function);
   18832           0 :         __Pyx_DECREF_SET(__pyx_t_6, function);
   18833             :         __pyx_t_8 = 1;
   18834             :       }
   18835             :     }
   18836             :     #endif
   18837             :     {
   18838           0 :       PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_5};
   18839           0 :       __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
   18840           0 :       __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
   18841           0 :       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   18842           0 :       if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
   18843           0 :       __Pyx_GOTREF(__pyx_t_1);
   18844           0 :       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
   18845             :     }
   18846           0 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   18847             : 
   18848             :     /* "(tree fragment)":13
   18849             :  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
   18850             :  *     __pyx_result.name = __pyx_state[0]
   18851             :  *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
   18852             :  *         __pyx_result.__dict__.update(__pyx_state[1])
   18853             :  */
   18854             :   }
   18855             : 
   18856             :   /* "(tree fragment)":11
   18857             :  *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
   18858             :  *     return __pyx_result
   18859             :  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
   18860             :  *     __pyx_result.name = __pyx_state[0]
   18861             :  *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
   18862             :  */
   18863             : 
   18864             :   /* function exit code */
   18865           0 :   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   18866           0 :   goto __pyx_L0;
   18867           0 :   __pyx_L1_error:;
   18868           0 :   __Pyx_XDECREF(__pyx_t_1);
   18869           0 :   __Pyx_XDECREF(__pyx_t_5);
   18870           0 :   __Pyx_XDECREF(__pyx_t_6);
   18871           0 :   __Pyx_XDECREF(__pyx_t_7);
   18872           0 :   __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
   18873           0 :   __pyx_r = 0;
   18874           0 :   __pyx_L0:;
   18875           0 :   __Pyx_XGIVEREF(__pyx_r);
   18876           0 :   __Pyx_RefNannyFinishContext();
   18877           0 :   return __pyx_r;
   18878             : }
   18879             : 
   18880             : /* "scipy/interpolate/_interpnd.pyx":58
   18881             :  *     """
   18882             :  * 
   18883             :  *     def __init__(self, points, values, fill_value=np.nan, ndim=None,             # <<<<<<<<<<<<<<
   18884             :  *                  rescale=False, need_contiguous=True, need_values=True):
   18885             :  *         """
   18886             :  */
   18887             : 
   18888           0 : static PyObject *__pyx_pf_5scipy_11interpolate_9_interpnd_4__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
   18889           0 :   PyObject *__pyx_r = NULL;
   18890             :   __Pyx_RefNannyDeclarations
   18891           0 :   PyObject *__pyx_t_1 = NULL;
   18892           0 :   PyObject *__pyx_t_2 = NULL;
   18893           0 :   int __pyx_lineno = 0;
   18894           0 :   const char *__pyx_filename = NULL;
   18895           0 :   int __pyx_clineno = 0;
   18896           0 :   __Pyx_RefNannySetupContext("__defaults__", 1);
   18897           0 :   __Pyx_XDECREF(__pyx_r);
   18898             : 
   18899             :   /* "scipy/interpolate/_interpnd.pyx":59
   18900             :  * 
   18901             :  *     def __init__(self, points, values, fill_value=np.nan, ndim=None,
   18902             :  *                  rescale=False, need_contiguous=True, need_values=True):             # <<<<<<<<<<<<<<
   18903             :  *         """
   18904             :  *         Check shape of points and values arrays, and reshape values to
   18905             :  */
   18906           0 :   __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 58, __pyx_L1_error)
   18907           0 :   __Pyx_GOTREF(__pyx_t_1);
   18908           0 :   __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_fill_value);
   18909           0 :   __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_fill_value);
   18910           0 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_fill_value)) __PYX_ERR(0, 58, __pyx_L1_error);
   18911           0 :   __Pyx_INCREF(Py_None);
   18912           0 :   __Pyx_GIVEREF(Py_None);
   18913           0 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, Py_None)) __PYX_ERR(0, 58, __pyx_L1_error);
   18914           0 :   __Pyx_INCREF(((PyObject *)Py_False));
   18915           0 :   __Pyx_GIVEREF(((PyObject *)Py_False));
   18916           0 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)Py_False))) __PYX_ERR(0, 58, __pyx_L1_error);
   18917           0 :   __Pyx_INCREF(((PyObject *)Py_True));
   18918           0 :   __Pyx_GIVEREF(((PyObject *)Py_True));
   18919           0 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 3, ((PyObject *)Py_True))) __PYX_ERR(0, 58, __pyx_L1_error);
   18920           0 :   __Pyx_INCREF(((PyObject *)Py_True));
   18921           0 :   __Pyx_GIVEREF(((PyObject *)Py_True));
   18922           0 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 4, ((PyObject *)Py_True))) __PYX_ERR(0, 58, __pyx_L1_error);
   18923             : 
   18924             :   /* "scipy/interpolate/_interpnd.pyx":58
   18925             :  *     """
   18926             :  * 
   18927             :  *     def __init__(self, points, values, fill_value=np.nan, ndim=None,             # <<<<<<<<<<<<<<
   18928             :  *                  rescale=False, need_contiguous=True, need_values=True):
   18929             :  *         """
   18930             :  */
   18931           0 :   __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 58, __pyx_L1_error)
   18932           0 :   __Pyx_GOTREF(__pyx_t_2);
   18933           0 :   __Pyx_GIVEREF(__pyx_t_1);
   18934           0 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(0, 58, __pyx_L1_error);
   18935           0 :   __Pyx_INCREF(Py_None);
   18936           0 :   __Pyx_GIVEREF(Py_None);
   18937           0 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None)) __PYX_ERR(0, 58, __pyx_L1_error);
   18938           0 :   __pyx_t_1 = 0;
   18939           0 :   __pyx_r = __pyx_t_2;
   18940           0 :   __pyx_t_2 = 0;
   18941           0 :   goto __pyx_L0;
   18942             : 
   18943             :   /* function exit code */
   18944           0 :   __pyx_L1_error:;
   18945           0 :   __Pyx_XDECREF(__pyx_t_1);
   18946           0 :   __Pyx_XDECREF(__pyx_t_2);
   18947           0 :   __Pyx_AddTraceback("scipy.interpolate._interpnd.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   18948           0 :   __pyx_r = NULL;
   18949           0 :   __pyx_L0:;
   18950           0 :   __Pyx_XGIVEREF(__pyx_r);
   18951           0 :   __Pyx_RefNannyFinishContext();
   18952           0 :   return __pyx_r;
   18953             : }
   18954             : 
   18955             : /* Python wrapper */
   18956             : static PyObject *__pyx_pw_5scipy_11interpolate_9_interpnd_18NDInterpolatorBase_1__init__(PyObject *__pyx_self, 
   18957             : #if CYTHON_METH_FASTCALL
   18958             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   18959             : #else
   18960             : PyObject *__pyx_args, PyObject *__pyx_kwds
   18961             : #endif
   18962             : ); /*proto*/
   18963             : PyDoc_STRVAR(__pyx_doc_5scipy_11interpolate_9_interpnd_18NDInterpolatorBase___init__, "\n        Check shape of points and values arrays, and reshape values to\n        (npoints, nvalues).  Ensure the `points` and values arrays are\n        C-contiguous, and of correct type.\n        ");
   18964             : static PyMethodDef __pyx_mdef_5scipy_11interpolate_9_interpnd_18NDInterpolatorBase_1__init__ = {"__init__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5scipy_11interpolate_9_interpnd_18NDInterpolatorBase_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5scipy_11interpolate_9_interpnd_18NDInterpolatorBase___init__};
   18965         113 : static PyObject *__pyx_pw_5scipy_11interpolate_9_interpnd_18NDInterpolatorBase_1__init__(PyObject *__pyx_self, 
   18966             : #if CYTHON_METH_FASTCALL
   18967             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   18968             : #else
   18969             : PyObject *__pyx_args, PyObject *__pyx_kwds
   18970             : #endif
   18971             : ) {
   18972         113 :   PyObject *__pyx_v_self = 0;
   18973         113 :   PyObject *__pyx_v_points = 0;
   18974         113 :   PyObject *__pyx_v_values = 0;
   18975         113 :   PyObject *__pyx_v_fill_value = 0;
   18976         113 :   PyObject *__pyx_v_ndim = 0;
   18977         113 :   PyObject *__pyx_v_rescale = 0;
   18978         113 :   PyObject *__pyx_v_need_contiguous = 0;
   18979         113 :   PyObject *__pyx_v_need_values = 0;
   18980             :   #if !CYTHON_METH_FASTCALL
   18981             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
   18982             :   #endif
   18983         113 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   18984         113 :   PyObject* values[8] = {0,0,0,0,0,0,0,0};
   18985         113 :   int __pyx_lineno = 0;
   18986         113 :   const char *__pyx_filename = NULL;
   18987         113 :   int __pyx_clineno = 0;
   18988         113 :   PyObject *__pyx_r = 0;
   18989             :   __Pyx_RefNannyDeclarations
   18990         113 :   __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
   18991             :   #if !CYTHON_METH_FASTCALL
   18992             :   #if CYTHON_ASSUME_SAFE_MACROS
   18993             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
   18994             :   #else
   18995             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
   18996             :   #endif
   18997             :   #endif
   18998         113 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
   18999             :   {
   19000         113 :     PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_points,&__pyx_n_s_values,&__pyx_n_s_fill_value,&__pyx_n_s_ndim,&__pyx_n_s_rescale,&__pyx_n_s_need_contiguous,&__pyx_n_s_need_values,0};
   19001         113 :     __pyx_defaults *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self);
   19002         113 :     values[3] = __Pyx_Arg_NewRef_FASTCALL(__pyx_dynamic_args->__pyx_arg_fill_value);
   19003         113 :     values[4] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
   19004         113 :     values[5] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_False)));
   19005         113 :     values[6] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_True)));
   19006         113 :     values[7] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_True)));
   19007         113 :     if (__pyx_kwds) {
   19008         113 :       Py_ssize_t kw_args;
   19009         113 :       switch (__pyx_nargs) {
   19010           0 :         case  8: values[7] = __Pyx_Arg_FASTCALL(__pyx_args, 7);
   19011           0 :         CYTHON_FALLTHROUGH;
   19012           0 :         case  7: values[6] = __Pyx_Arg_FASTCALL(__pyx_args, 6);
   19013           0 :         CYTHON_FALLTHROUGH;
   19014           0 :         case  6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
   19015           0 :         CYTHON_FALLTHROUGH;
   19016           0 :         case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
   19017           0 :         CYTHON_FALLTHROUGH;
   19018           0 :         case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
   19019         113 :         CYTHON_FALLTHROUGH;
   19020         113 :         case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
   19021         113 :         CYTHON_FALLTHROUGH;
   19022         113 :         case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
   19023         113 :         CYTHON_FALLTHROUGH;
   19024         113 :         case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
   19025         113 :         CYTHON_FALLTHROUGH;
   19026         113 :         case  0: break;
   19027           0 :         default: goto __pyx_L5_argtuple_error;
   19028             :       }
   19029         113 :       kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
   19030         113 :       switch (__pyx_nargs) {
   19031           0 :         case  0:
   19032           0 :         if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
   19033           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
   19034           0 :           kw_args--;
   19035             :         }
   19036           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 58, __pyx_L3_error)
   19037           0 :         else goto __pyx_L5_argtuple_error;
   19038           0 :         CYTHON_FALLTHROUGH;
   19039             :         case  1:
   19040           0 :         if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_points)) != 0)) {
   19041           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
   19042           0 :           kw_args--;
   19043             :         }
   19044           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 58, __pyx_L3_error)
   19045             :         else {
   19046           0 :           __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 8, 1); __PYX_ERR(0, 58, __pyx_L3_error)
   19047             :         }
   19048           0 :         CYTHON_FALLTHROUGH;
   19049             :         case  2:
   19050           0 :         if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_values)) != 0)) {
   19051           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
   19052           0 :           kw_args--;
   19053             :         }
   19054           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 58, __pyx_L3_error)
   19055             :         else {
   19056           0 :           __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 8, 2); __PYX_ERR(0, 58, __pyx_L3_error)
   19057             :         }
   19058         113 :         CYTHON_FALLTHROUGH;
   19059             :         case  3:
   19060         113 :         if (kw_args > 0) {
   19061         113 :           PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fill_value);
   19062         113 :           if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
   19063          24 :           else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 58, __pyx_L3_error)
   19064             :         }
   19065         113 :         CYTHON_FALLTHROUGH;
   19066             :         case  4:
   19067         113 :         if (kw_args > 0) {
   19068         113 :           PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ndim);
   19069         113 :           if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
   19070          55 :           else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 58, __pyx_L3_error)
   19071             :         }
   19072         113 :         CYTHON_FALLTHROUGH;
   19073             :         case  5:
   19074         113 :         if (kw_args > 0) {
   19075         113 :           PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_rescale);
   19076         113 :           if (value) { values[5] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
   19077           0 :           else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 58, __pyx_L3_error)
   19078             :         }
   19079         113 :         CYTHON_FALLTHROUGH;
   19080             :         case  6:
   19081         113 :         if (kw_args > 0) {
   19082          82 :           PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_need_contiguous);
   19083          82 :           if (value) { values[6] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
   19084          58 :           else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 58, __pyx_L3_error)
   19085             :         }
   19086          82 :         CYTHON_FALLTHROUGH;
   19087             :         case  7:
   19088          82 :         if (kw_args > 0) {
   19089          82 :           PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_need_values);
   19090          82 :           if (value) { values[7] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
   19091           0 :           else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 58, __pyx_L3_error)
   19092             :         }
   19093             :       }
   19094         113 :       if (unlikely(kw_args > 0)) {
   19095           0 :         const Py_ssize_t kwd_pos_args = __pyx_nargs;
   19096           0 :         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 58, __pyx_L3_error)
   19097             :       }
   19098             :     } else {
   19099           0 :       switch (__pyx_nargs) {
   19100           0 :         case  8: values[7] = __Pyx_Arg_FASTCALL(__pyx_args, 7);
   19101           0 :         CYTHON_FALLTHROUGH;
   19102           0 :         case  7: values[6] = __Pyx_Arg_FASTCALL(__pyx_args, 6);
   19103           0 :         CYTHON_FALLTHROUGH;
   19104           0 :         case  6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
   19105           0 :         CYTHON_FALLTHROUGH;
   19106           0 :         case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
   19107           0 :         CYTHON_FALLTHROUGH;
   19108           0 :         case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
   19109           0 :         CYTHON_FALLTHROUGH;
   19110           0 :         case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
   19111           0 :         values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
   19112           0 :         values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
   19113           0 :         break;
   19114           0 :         default: goto __pyx_L5_argtuple_error;
   19115             :       }
   19116             :     }
   19117         113 :     __pyx_v_self = values[0];
   19118         113 :     __pyx_v_points = values[1];
   19119         113 :     __pyx_v_values = values[2];
   19120         113 :     __pyx_v_fill_value = values[3];
   19121         113 :     __pyx_v_ndim = values[4];
   19122         113 :     __pyx_v_rescale = values[5];
   19123         113 :     __pyx_v_need_contiguous = values[6];
   19124         113 :     __pyx_v_need_values = values[7];
   19125             :   }
   19126         113 :   goto __pyx_L6_skip;
   19127           0 :   __pyx_L5_argtuple_error:;
   19128           0 :   __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 8, __pyx_nargs); __PYX_ERR(0, 58, __pyx_L3_error)
   19129         113 :   __pyx_L6_skip:;
   19130         113 :   goto __pyx_L4_argument_unpacking_done;
   19131           0 :   __pyx_L3_error:;
   19132             :   {
   19133           0 :     Py_ssize_t __pyx_temp;
   19134           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   19135             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
   19136             :     }
   19137             :   }
   19138           0 :   __Pyx_AddTraceback("scipy.interpolate._interpnd.NDInterpolatorBase.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   19139           0 :   __Pyx_RefNannyFinishContext();
   19140           0 :   return NULL;
   19141         113 :   __pyx_L4_argument_unpacking_done:;
   19142         113 :   __pyx_r = __pyx_pf_5scipy_11interpolate_9_interpnd_18NDInterpolatorBase___init__(__pyx_self, __pyx_v_self, __pyx_v_points, __pyx_v_values, __pyx_v_fill_value, __pyx_v_ndim, __pyx_v_rescale, __pyx_v_need_contiguous, __pyx_v_need_values);
   19143             : 
   19144             :   /* function exit code */
   19145             :   {
   19146         113 :     Py_ssize_t __pyx_temp;
   19147         113 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   19148             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
   19149             :     }
   19150             :   }
   19151             :   __Pyx_RefNannyFinishContext();
   19152             :   return __pyx_r;
   19153             : }
   19154             : 
   19155         113 : static PyObject *__pyx_pf_5scipy_11interpolate_9_interpnd_18NDInterpolatorBase___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_points, PyObject *__pyx_v_values, PyObject *__pyx_v_fill_value, PyObject *__pyx_v_ndim, PyObject *__pyx_v_rescale, PyObject *__pyx_v_need_contiguous, PyObject *__pyx_v_need_values) {
   19156         113 :   PyObject *__pyx_r = NULL;
   19157             :   __Pyx_RefNannyDeclarations
   19158         113 :   PyObject *__pyx_t_1 = NULL;
   19159         113 :   PyObject *__pyx_t_2 = NULL;
   19160         113 :   int __pyx_t_3;
   19161         113 :   PyObject *__pyx_t_4 = NULL;
   19162         113 :   PyObject *__pyx_t_5 = NULL;
   19163         113 :   PyObject *__pyx_t_6 = NULL;
   19164         113 :   int __pyx_t_7;
   19165         113 :   unsigned int __pyx_t_8;
   19166         113 :   int __pyx_lineno = 0;
   19167         113 :   const char *__pyx_filename = NULL;
   19168         113 :   int __pyx_clineno = 0;
   19169         113 :   __Pyx_RefNannySetupContext("__init__", 0);
   19170         113 :   __Pyx_INCREF(__pyx_v_points);
   19171             : 
   19172             :   /* "scipy/interpolate/_interpnd.pyx":66
   19173             :  *         """
   19174             :  * 
   19175             :  *         if isinstance(points, qhull.Delaunay):             # <<<<<<<<<<<<<<
   19176             :  *             # Precomputed triangulation was passed in
   19177             :  *             if rescale:
   19178             :  */
   19179         113 :   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_qhull); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 66, __pyx_L1_error)
   19180         113 :   __Pyx_GOTREF(__pyx_t_1);
   19181         113 :   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Delaunay); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 66, __pyx_L1_error)
   19182         113 :   __Pyx_GOTREF(__pyx_t_2);
   19183         113 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   19184         113 :   __pyx_t_3 = PyObject_IsInstance(__pyx_v_points, __pyx_t_2); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 66, __pyx_L1_error)
   19185         113 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   19186         113 :   if (__pyx_t_3) {
   19187             : 
   19188             :     /* "scipy/interpolate/_interpnd.pyx":68
   19189             :  *         if isinstance(points, qhull.Delaunay):
   19190             :  *             # Precomputed triangulation was passed in
   19191             :  *             if rescale:             # <<<<<<<<<<<<<<
   19192             :  *                 raise ValueError("Rescaling is not supported when passing "
   19193             :  *                                  "a Delaunay triangulation as ``points``.")
   19194             :  */
   19195           4 :     __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_rescale); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 68, __pyx_L1_error)
   19196           4 :     if (unlikely(__pyx_t_3)) {
   19197             : 
   19198             :       /* "scipy/interpolate/_interpnd.pyx":69
   19199             :  *             # Precomputed triangulation was passed in
   19200             :  *             if rescale:
   19201             :  *                 raise ValueError("Rescaling is not supported when passing "             # <<<<<<<<<<<<<<
   19202             :  *                                  "a Delaunay triangulation as ``points``.")
   19203             :  *             self.tri = points
   19204             :  */
   19205           2 :       __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 69, __pyx_L1_error)
   19206           2 :       __Pyx_GOTREF(__pyx_t_2);
   19207           2 :       __Pyx_Raise(__pyx_t_2, 0, 0, 0);
   19208           2 :       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   19209           2 :       __PYX_ERR(0, 69, __pyx_L1_error)
   19210             : 
   19211             :       /* "scipy/interpolate/_interpnd.pyx":68
   19212             :  *         if isinstance(points, qhull.Delaunay):
   19213             :  *             # Precomputed triangulation was passed in
   19214             :  *             if rescale:             # <<<<<<<<<<<<<<
   19215             :  *                 raise ValueError("Rescaling is not supported when passing "
   19216             :  *                                  "a Delaunay triangulation as ``points``.")
   19217             :  */
   19218             :     }
   19219             : 
   19220             :     /* "scipy/interpolate/_interpnd.pyx":71
   19221             :  *                 raise ValueError("Rescaling is not supported when passing "
   19222             :  *                                  "a Delaunay triangulation as ``points``.")
   19223             :  *             self.tri = points             # <<<<<<<<<<<<<<
   19224             :  *             points = points.points
   19225             :  *         else:
   19226             :  */
   19227           2 :     if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_tri, __pyx_v_points) < 0) __PYX_ERR(0, 71, __pyx_L1_error)
   19228             : 
   19229             :     /* "scipy/interpolate/_interpnd.pyx":72
   19230             :  *                                  "a Delaunay triangulation as ``points``.")
   19231             :  *             self.tri = points
   19232             :  *             points = points.points             # <<<<<<<<<<<<<<
   19233             :  *         else:
   19234             :  *             self.tri = None
   19235             :  */
   19236           2 :     __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_points, __pyx_n_s_points); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 72, __pyx_L1_error)
   19237           2 :     __Pyx_GOTREF(__pyx_t_2);
   19238           2 :     __Pyx_DECREF_SET(__pyx_v_points, __pyx_t_2);
   19239           2 :     __pyx_t_2 = 0;
   19240             : 
   19241             :     /* "scipy/interpolate/_interpnd.pyx":66
   19242             :  *         """
   19243             :  * 
   19244             :  *         if isinstance(points, qhull.Delaunay):             # <<<<<<<<<<<<<<
   19245             :  *             # Precomputed triangulation was passed in
   19246             :  *             if rescale:
   19247             :  */
   19248           2 :     goto __pyx_L3;
   19249             :   }
   19250             : 
   19251             :   /* "scipy/interpolate/_interpnd.pyx":74
   19252             :  *             points = points.points
   19253             :  *         else:
   19254             :  *             self.tri = None             # <<<<<<<<<<<<<<
   19255             :  * 
   19256             :  *         points = _ndim_coords_from_arrays(points)
   19257             :  */
   19258             :   /*else*/ {
   19259         109 :     if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_tri, Py_None) < 0) __PYX_ERR(0, 74, __pyx_L1_error)
   19260             :   }
   19261         109 :   __pyx_L3:;
   19262             : 
   19263             :   /* "scipy/interpolate/_interpnd.pyx":76
   19264             :  *             self.tri = None
   19265             :  * 
   19266             :  *         points = _ndim_coords_from_arrays(points)             # <<<<<<<<<<<<<<
   19267             :  * 
   19268             :  *         if need_contiguous:
   19269             :  */
   19270         111 :   __pyx_t_2 = __pyx_f_5scipy_11interpolate_9_interpnd__ndim_coords_from_arrays(__pyx_v_points, 0, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 76, __pyx_L1_error)
   19271         111 :   __Pyx_GOTREF(__pyx_t_2);
   19272         111 :   __Pyx_DECREF_SET(__pyx_v_points, __pyx_t_2);
   19273         111 :   __pyx_t_2 = 0;
   19274             : 
   19275             :   /* "scipy/interpolate/_interpnd.pyx":78
   19276             :  *         points = _ndim_coords_from_arrays(points)
   19277             :  * 
   19278             :  *         if need_contiguous:             # <<<<<<<<<<<<<<
   19279             :  *             points = np.ascontiguousarray(points, dtype=np.float64)
   19280             :  * 
   19281             :  */
   19282         111 :   __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_need_contiguous); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 78, __pyx_L1_error)
   19283         111 :   if (__pyx_t_3) {
   19284             : 
   19285             :     /* "scipy/interpolate/_interpnd.pyx":79
   19286             :  * 
   19287             :  *         if need_contiguous:
   19288             :  *             points = np.ascontiguousarray(points, dtype=np.float64)             # <<<<<<<<<<<<<<
   19289             :  * 
   19290             :  *         if not rescale:
   19291             :  */
   19292          87 :     __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 79, __pyx_L1_error)
   19293          87 :     __Pyx_GOTREF(__pyx_t_2);
   19294          87 :     __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ascontiguousarray); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 79, __pyx_L1_error)
   19295          87 :     __Pyx_GOTREF(__pyx_t_1);
   19296          87 :     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   19297          87 :     __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 79, __pyx_L1_error)
   19298          87 :     __Pyx_GOTREF(__pyx_t_2);
   19299          87 :     __Pyx_INCREF(__pyx_v_points);
   19300          87 :     __Pyx_GIVEREF(__pyx_v_points);
   19301          87 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_points)) __PYX_ERR(0, 79, __pyx_L1_error);
   19302          87 :     __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 79, __pyx_L1_error)
   19303          87 :     __Pyx_GOTREF(__pyx_t_4);
   19304          87 :     __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 79, __pyx_L1_error)
   19305          87 :     __Pyx_GOTREF(__pyx_t_5);
   19306          87 :     __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_float64); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 79, __pyx_L1_error)
   19307          87 :     __Pyx_GOTREF(__pyx_t_6);
   19308          87 :     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   19309          87 :     if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 79, __pyx_L1_error)
   19310          87 :     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
   19311          87 :     __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 79, __pyx_L1_error)
   19312          87 :     __Pyx_GOTREF(__pyx_t_6);
   19313          87 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   19314          87 :     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   19315          87 :     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   19316          87 :     __Pyx_DECREF_SET(__pyx_v_points, __pyx_t_6);
   19317             :     __pyx_t_6 = 0;
   19318             : 
   19319             :     /* "scipy/interpolate/_interpnd.pyx":78
   19320             :  *         points = _ndim_coords_from_arrays(points)
   19321             :  * 
   19322             :  *         if need_contiguous:             # <<<<<<<<<<<<<<
   19323             :  *             points = np.ascontiguousarray(points, dtype=np.float64)
   19324             :  * 
   19325             :  */
   19326             :   }
   19327             : 
   19328             :   /* "scipy/interpolate/_interpnd.pyx":81
   19329             :  *             points = np.ascontiguousarray(points, dtype=np.float64)
   19330             :  * 
   19331             :  *         if not rescale:             # <<<<<<<<<<<<<<
   19332             :  *             self.scale = None
   19333             :  *             self.points = points
   19334             :  */
   19335         111 :   __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_rescale); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 81, __pyx_L1_error)
   19336         111 :   __pyx_t_7 = (!__pyx_t_3);
   19337         111 :   if (__pyx_t_7) {
   19338             : 
   19339             :     /* "scipy/interpolate/_interpnd.pyx":82
   19340             :  * 
   19341             :  *         if not rescale:
   19342             :  *             self.scale = None             # <<<<<<<<<<<<<<
   19343             :  *             self.points = points
   19344             :  *         else:
   19345             :  */
   19346          75 :     if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_scale, Py_None) < 0) __PYX_ERR(0, 82, __pyx_L1_error)
   19347             : 
   19348             :     /* "scipy/interpolate/_interpnd.pyx":83
   19349             :  *         if not rescale:
   19350             :  *             self.scale = None
   19351             :  *             self.points = points             # <<<<<<<<<<<<<<
   19352             :  *         else:
   19353             :  *             # scale to unit cube centered at 0
   19354             :  */
   19355          75 :     if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_points, __pyx_v_points) < 0) __PYX_ERR(0, 83, __pyx_L1_error)
   19356             : 
   19357             :     /* "scipy/interpolate/_interpnd.pyx":81
   19358             :  *             points = np.ascontiguousarray(points, dtype=np.float64)
   19359             :  * 
   19360             :  *         if not rescale:             # <<<<<<<<<<<<<<
   19361             :  *             self.scale = None
   19362             :  *             self.points = points
   19363             :  */
   19364          75 :     goto __pyx_L6;
   19365             :   }
   19366             : 
   19367             :   /* "scipy/interpolate/_interpnd.pyx":86
   19368             :  *         else:
   19369             :  *             # scale to unit cube centered at 0
   19370             :  *             self.offset = np.mean(points, axis=0)             # <<<<<<<<<<<<<<
   19371             :  *             self.points = points - self.offset
   19372             :  *             self.scale = np.ptp(points, axis=0)
   19373             :  */
   19374             :   /*else*/ {
   19375          36 :     __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 86, __pyx_L1_error)
   19376          36 :     __Pyx_GOTREF(__pyx_t_6);
   19377          36 :     __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_mean); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 86, __pyx_L1_error)
   19378          36 :     __Pyx_GOTREF(__pyx_t_4);
   19379          36 :     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
   19380          36 :     __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 86, __pyx_L1_error)
   19381          36 :     __Pyx_GOTREF(__pyx_t_6);
   19382          36 :     __Pyx_INCREF(__pyx_v_points);
   19383          36 :     __Pyx_GIVEREF(__pyx_v_points);
   19384          36 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_points)) __PYX_ERR(0, 86, __pyx_L1_error);
   19385          36 :     __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 86, __pyx_L1_error)
   19386          36 :     __Pyx_GOTREF(__pyx_t_2);
   19387          36 :     if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_axis, __pyx_int_0) < 0) __PYX_ERR(0, 86, __pyx_L1_error)
   19388          36 :     __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 86, __pyx_L1_error)
   19389          36 :     __Pyx_GOTREF(__pyx_t_1);
   19390          36 :     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   19391          36 :     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
   19392          36 :     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   19393          36 :     if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_offset, __pyx_t_1) < 0) __PYX_ERR(0, 86, __pyx_L1_error)
   19394          36 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   19395             : 
   19396             :     /* "scipy/interpolate/_interpnd.pyx":87
   19397             :  *             # scale to unit cube centered at 0
   19398             :  *             self.offset = np.mean(points, axis=0)
   19399             :  *             self.points = points - self.offset             # <<<<<<<<<<<<<<
   19400             :  *             self.scale = np.ptp(points, axis=0)
   19401             :  *             self.scale[~(self.scale > 0)] = 1.0  # avoid division by 0
   19402             :  */
   19403          36 :     __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_offset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 87, __pyx_L1_error)
   19404          36 :     __Pyx_GOTREF(__pyx_t_1);
   19405          36 :     __pyx_t_2 = PyNumber_Subtract(__pyx_v_points, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 87, __pyx_L1_error)
   19406          36 :     __Pyx_GOTREF(__pyx_t_2);
   19407          36 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   19408          36 :     if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_points, __pyx_t_2) < 0) __PYX_ERR(0, 87, __pyx_L1_error)
   19409          36 :     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   19410             : 
   19411             :     /* "scipy/interpolate/_interpnd.pyx":88
   19412             :  *             self.offset = np.mean(points, axis=0)
   19413             :  *             self.points = points - self.offset
   19414             :  *             self.scale = np.ptp(points, axis=0)             # <<<<<<<<<<<<<<
   19415             :  *             self.scale[~(self.scale > 0)] = 1.0  # avoid division by 0
   19416             :  *             self.points /= self.scale
   19417             :  */
   19418          36 :     __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 88, __pyx_L1_error)
   19419          36 :     __Pyx_GOTREF(__pyx_t_2);
   19420          36 :     __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ptp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 88, __pyx_L1_error)
   19421          36 :     __Pyx_GOTREF(__pyx_t_1);
   19422          36 :     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   19423          36 :     __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 88, __pyx_L1_error)
   19424          36 :     __Pyx_GOTREF(__pyx_t_2);
   19425          36 :     __Pyx_INCREF(__pyx_v_points);
   19426          36 :     __Pyx_GIVEREF(__pyx_v_points);
   19427          36 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_points)) __PYX_ERR(0, 88, __pyx_L1_error);
   19428          36 :     __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 88, __pyx_L1_error)
   19429          36 :     __Pyx_GOTREF(__pyx_t_6);
   19430          36 :     if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_axis, __pyx_int_0) < 0) __PYX_ERR(0, 88, __pyx_L1_error)
   19431          36 :     __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 88, __pyx_L1_error)
   19432          36 :     __Pyx_GOTREF(__pyx_t_4);
   19433          36 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   19434          36 :     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   19435          36 :     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
   19436          36 :     if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_scale, __pyx_t_4) < 0) __PYX_ERR(0, 88, __pyx_L1_error)
   19437          36 :     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   19438             : 
   19439             :     /* "scipy/interpolate/_interpnd.pyx":89
   19440             :  *             self.points = points - self.offset
   19441             :  *             self.scale = np.ptp(points, axis=0)
   19442             :  *             self.scale[~(self.scale > 0)] = 1.0  # avoid division by 0             # <<<<<<<<<<<<<<
   19443             :  *             self.points /= self.scale
   19444             :  * 
   19445             :  */
   19446          36 :     __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_scale); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 89, __pyx_L1_error)
   19447          36 :     __Pyx_GOTREF(__pyx_t_4);
   19448          36 :     __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_scale); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 89, __pyx_L1_error)
   19449          36 :     __Pyx_GOTREF(__pyx_t_6);
   19450          36 :     __pyx_t_2 = PyObject_RichCompare(__pyx_t_6, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 89, __pyx_L1_error)
   19451          36 :     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
   19452          36 :     __pyx_t_6 = PyNumber_Invert(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 89, __pyx_L1_error)
   19453          36 :     __Pyx_GOTREF(__pyx_t_6);
   19454          36 :     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   19455          36 :     if (unlikely((PyObject_SetItem(__pyx_t_4, __pyx_t_6, __pyx_float_1_0) < 0))) __PYX_ERR(0, 89, __pyx_L1_error)
   19456          36 :     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   19457          36 :     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
   19458             : 
   19459             :     /* "scipy/interpolate/_interpnd.pyx":90
   19460             :  *             self.scale = np.ptp(points, axis=0)
   19461             :  *             self.scale[~(self.scale > 0)] = 1.0  # avoid division by 0
   19462             :  *             self.points /= self.scale             # <<<<<<<<<<<<<<
   19463             :  * 
   19464             :  *         if self.tri is None:
   19465             :  */
   19466          36 :     __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_points); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 90, __pyx_L1_error)
   19467          36 :     __Pyx_GOTREF(__pyx_t_6);
   19468          36 :     __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_scale); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 90, __pyx_L1_error)
   19469          36 :     __Pyx_GOTREF(__pyx_t_4);
   19470          36 :     __pyx_t_2 = __Pyx_PyNumber_InPlaceDivide(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 90, __pyx_L1_error)
   19471          36 :     __Pyx_GOTREF(__pyx_t_2);
   19472          36 :     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
   19473          36 :     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   19474          36 :     if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_points, __pyx_t_2) < 0) __PYX_ERR(0, 90, __pyx_L1_error)
   19475          36 :     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   19476             :   }
   19477         111 :   __pyx_L6:;
   19478             : 
   19479             :   /* "scipy/interpolate/_interpnd.pyx":92
   19480             :  *             self.points /= self.scale
   19481             :  * 
   19482             :  *         if self.tri is None:             # <<<<<<<<<<<<<<
   19483             :  *             self._calculate_triangulation(self.points)
   19484             :  * 
   19485             :  */
   19486         111 :   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tri); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 92, __pyx_L1_error)
   19487         111 :   __Pyx_GOTREF(__pyx_t_2);
   19488         111 :   __pyx_t_7 = (__pyx_t_2 == Py_None);
   19489         111 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   19490         111 :   if (__pyx_t_7) {
   19491             : 
   19492             :     /* "scipy/interpolate/_interpnd.pyx":93
   19493             :  * 
   19494             :  *         if self.tri is None:
   19495             :  *             self._calculate_triangulation(self.points)             # <<<<<<<<<<<<<<
   19496             :  * 
   19497             :  *         if need_values or values is not None:
   19498             :  */
   19499         109 :     __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_calculate_triangulation); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 93, __pyx_L1_error)
   19500         109 :     __Pyx_GOTREF(__pyx_t_4);
   19501         109 :     __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_points); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 93, __pyx_L1_error)
   19502         109 :     __Pyx_GOTREF(__pyx_t_6);
   19503         109 :     __pyx_t_1 = NULL;
   19504         109 :     __pyx_t_8 = 0;
   19505             :     #if CYTHON_UNPACK_METHODS
   19506         109 :     if (likely(PyMethod_Check(__pyx_t_4))) {
   19507         109 :       __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
   19508         109 :       if (likely(__pyx_t_1)) {
   19509         109 :         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
   19510         109 :         __Pyx_INCREF(__pyx_t_1);
   19511         109 :         __Pyx_INCREF(function);
   19512         109 :         __Pyx_DECREF_SET(__pyx_t_4, function);
   19513             :         __pyx_t_8 = 1;
   19514             :       }
   19515             :     }
   19516             :     #endif
   19517             :     {
   19518         109 :       PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_6};
   19519         109 :       __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
   19520         109 :       __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
   19521         109 :       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
   19522         109 :       if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 93, __pyx_L1_error)
   19523         109 :       __Pyx_GOTREF(__pyx_t_2);
   19524         109 :       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   19525             :     }
   19526         109 :     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   19527             : 
   19528             :     /* "scipy/interpolate/_interpnd.pyx":92
   19529             :  *             self.points /= self.scale
   19530             :  * 
   19531             :  *         if self.tri is None:             # <<<<<<<<<<<<<<
   19532             :  *             self._calculate_triangulation(self.points)
   19533             :  * 
   19534             :  */
   19535             :   }
   19536             : 
   19537             :   /* "scipy/interpolate/_interpnd.pyx":95
   19538             :  *             self._calculate_triangulation(self.points)
   19539             :  * 
   19540             :  *         if need_values or values is not None:             # <<<<<<<<<<<<<<
   19541             :  *             self._set_values(values, fill_value, need_contiguous, ndim)
   19542             :  *         else:
   19543             :  */
   19544         111 :   __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_need_values); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 95, __pyx_L1_error)
   19545         111 :   if (!__pyx_t_3) {
   19546          81 :   } else {
   19547          30 :     __pyx_t_7 = __pyx_t_3;
   19548          30 :     goto __pyx_L9_bool_binop_done;
   19549             :   }
   19550          81 :   __pyx_t_3 = (__pyx_v_values != Py_None);
   19551          81 :   __pyx_t_7 = __pyx_t_3;
   19552         111 :   __pyx_L9_bool_binop_done:;
   19553         111 :   if (__pyx_t_7) {
   19554             : 
   19555             :     /* "scipy/interpolate/_interpnd.pyx":96
   19556             :  * 
   19557             :  *         if need_values or values is not None:
   19558             :  *             self._set_values(values, fill_value, need_contiguous, ndim)             # <<<<<<<<<<<<<<
   19559             :  *         else:
   19560             :  *             self.values = None
   19561             :  */
   19562         111 :     __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_set_values); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 96, __pyx_L1_error)
   19563         111 :     __Pyx_GOTREF(__pyx_t_4);
   19564         111 :     __pyx_t_6 = NULL;
   19565         111 :     __pyx_t_8 = 0;
   19566             :     #if CYTHON_UNPACK_METHODS
   19567         111 :     if (likely(PyMethod_Check(__pyx_t_4))) {
   19568         111 :       __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
   19569         111 :       if (likely(__pyx_t_6)) {
   19570         111 :         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
   19571         111 :         __Pyx_INCREF(__pyx_t_6);
   19572         111 :         __Pyx_INCREF(function);
   19573         111 :         __Pyx_DECREF_SET(__pyx_t_4, function);
   19574             :         __pyx_t_8 = 1;
   19575             :       }
   19576             :     }
   19577             :     #endif
   19578             :     {
   19579         111 :       PyObject *__pyx_callargs[5] = {__pyx_t_6, __pyx_v_values, __pyx_v_fill_value, __pyx_v_need_contiguous, __pyx_v_ndim};
   19580         111 :       __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_8, 4+__pyx_t_8);
   19581         111 :       __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
   19582         111 :       if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 96, __pyx_L1_error)
   19583         110 :       __Pyx_GOTREF(__pyx_t_2);
   19584         110 :       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   19585             :     }
   19586         110 :     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   19587             : 
   19588             :     /* "scipy/interpolate/_interpnd.pyx":95
   19589             :  *             self._calculate_triangulation(self.points)
   19590             :  * 
   19591             :  *         if need_values or values is not None:             # <<<<<<<<<<<<<<
   19592             :  *             self._set_values(values, fill_value, need_contiguous, ndim)
   19593             :  *         else:
   19594             :  */
   19595         110 :     goto __pyx_L8;
   19596             :   }
   19597             : 
   19598             :   /* "scipy/interpolate/_interpnd.pyx":98
   19599             :  *             self._set_values(values, fill_value, need_contiguous, ndim)
   19600             :  *         else:
   19601             :  *             self.values = None             # <<<<<<<<<<<<<<
   19602             :  * 
   19603             :  *     def _calculate_triangulation(self, points):
   19604             :  */
   19605             :   /*else*/ {
   19606           0 :     if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_values, Py_None) < 0) __PYX_ERR(0, 98, __pyx_L1_error)
   19607             :   }
   19608           0 :   __pyx_L8:;
   19609             : 
   19610             :   /* "scipy/interpolate/_interpnd.pyx":58
   19611             :  *     """
   19612             :  * 
   19613             :  *     def __init__(self, points, values, fill_value=np.nan, ndim=None,             # <<<<<<<<<<<<<<
   19614             :  *                  rescale=False, need_contiguous=True, need_values=True):
   19615             :  *         """
   19616             :  */
   19617             : 
   19618             :   /* function exit code */
   19619         110 :   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   19620         110 :   goto __pyx_L0;
   19621           3 :   __pyx_L1_error:;
   19622           3 :   __Pyx_XDECREF(__pyx_t_1);
   19623           3 :   __Pyx_XDECREF(__pyx_t_2);
   19624           3 :   __Pyx_XDECREF(__pyx_t_4);
   19625           3 :   __Pyx_XDECREF(__pyx_t_5);
   19626           3 :   __Pyx_XDECREF(__pyx_t_6);
   19627           3 :   __Pyx_AddTraceback("scipy.interpolate._interpnd.NDInterpolatorBase.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   19628           3 :   __pyx_r = NULL;
   19629         113 :   __pyx_L0:;
   19630         113 :   __Pyx_XDECREF(__pyx_v_points);
   19631         113 :   __Pyx_XGIVEREF(__pyx_r);
   19632         113 :   __Pyx_RefNannyFinishContext();
   19633         113 :   return __pyx_r;
   19634             : }
   19635             : 
   19636             : /* "scipy/interpolate/_interpnd.pyx":100
   19637             :  *             self.values = None
   19638             :  * 
   19639             :  *     def _calculate_triangulation(self, points):             # <<<<<<<<<<<<<<
   19640             :  *         pass
   19641             :  * 
   19642             :  */
   19643             : 
   19644             : /* Python wrapper */
   19645             : static PyObject *__pyx_pw_5scipy_11interpolate_9_interpnd_18NDInterpolatorBase_3_calculate_triangulation(PyObject *__pyx_self, 
   19646             : #if CYTHON_METH_FASTCALL
   19647             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   19648             : #else
   19649             : PyObject *__pyx_args, PyObject *__pyx_kwds
   19650             : #endif
   19651             : ); /*proto*/
   19652             : static PyMethodDef __pyx_mdef_5scipy_11interpolate_9_interpnd_18NDInterpolatorBase_3_calculate_triangulation = {"_calculate_triangulation", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5scipy_11interpolate_9_interpnd_18NDInterpolatorBase_3_calculate_triangulation, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
   19653          24 : static PyObject *__pyx_pw_5scipy_11interpolate_9_interpnd_18NDInterpolatorBase_3_calculate_triangulation(PyObject *__pyx_self, 
   19654             : #if CYTHON_METH_FASTCALL
   19655             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   19656             : #else
   19657             : PyObject *__pyx_args, PyObject *__pyx_kwds
   19658             : #endif
   19659             : ) {
   19660          24 :   CYTHON_UNUSED PyObject *__pyx_v_self = 0;
   19661          24 :   CYTHON_UNUSED PyObject *__pyx_v_points = 0;
   19662             :   #if !CYTHON_METH_FASTCALL
   19663             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
   19664             :   #endif
   19665          24 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   19666          24 :   PyObject* values[2] = {0,0};
   19667          24 :   int __pyx_lineno = 0;
   19668          24 :   const char *__pyx_filename = NULL;
   19669          24 :   int __pyx_clineno = 0;
   19670          24 :   PyObject *__pyx_r = 0;
   19671             :   __Pyx_RefNannyDeclarations
   19672          24 :   __Pyx_RefNannySetupContext("_calculate_triangulation (wrapper)", 0);
   19673             :   #if !CYTHON_METH_FASTCALL
   19674             :   #if CYTHON_ASSUME_SAFE_MACROS
   19675             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
   19676             :   #else
   19677             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
   19678             :   #endif
   19679             :   #endif
   19680          24 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
   19681             :   {
   19682          24 :     PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_points,0};
   19683          24 :     if (__pyx_kwds) {
   19684           0 :       Py_ssize_t kw_args;
   19685           0 :       switch (__pyx_nargs) {
   19686           0 :         case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
   19687           0 :         CYTHON_FALLTHROUGH;
   19688           0 :         case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
   19689           0 :         CYTHON_FALLTHROUGH;
   19690           0 :         case  0: break;
   19691           0 :         default: goto __pyx_L5_argtuple_error;
   19692             :       }
   19693           0 :       kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
   19694           0 :       switch (__pyx_nargs) {
   19695             :         case  0:
   19696           0 :         if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
   19697           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
   19698           0 :           kw_args--;
   19699             :         }
   19700           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 100, __pyx_L3_error)
   19701           0 :         else goto __pyx_L5_argtuple_error;
   19702           0 :         CYTHON_FALLTHROUGH;
   19703             :         case  1:
   19704           0 :         if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_points)) != 0)) {
   19705           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
   19706           0 :           kw_args--;
   19707             :         }
   19708           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 100, __pyx_L3_error)
   19709             :         else {
   19710           0 :           __Pyx_RaiseArgtupleInvalid("_calculate_triangulation", 1, 2, 2, 1); __PYX_ERR(0, 100, __pyx_L3_error)
   19711             :         }
   19712             :       }
   19713           0 :       if (unlikely(kw_args > 0)) {
   19714           0 :         const Py_ssize_t kwd_pos_args = __pyx_nargs;
   19715           0 :         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_calculate_triangulation") < 0)) __PYX_ERR(0, 100, __pyx_L3_error)
   19716             :       }
   19717          24 :     } else if (unlikely(__pyx_nargs != 2)) {
   19718           0 :       goto __pyx_L5_argtuple_error;
   19719             :     } else {
   19720             :       values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
   19721             :       values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
   19722             :     }
   19723          24 :     __pyx_v_self = values[0];
   19724          24 :     __pyx_v_points = values[1];
   19725             :   }
   19726          24 :   goto __pyx_L6_skip;
   19727           0 :   __pyx_L5_argtuple_error:;
   19728           0 :   __Pyx_RaiseArgtupleInvalid("_calculate_triangulation", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 100, __pyx_L3_error)
   19729          24 :   __pyx_L6_skip:;
   19730          24 :   goto __pyx_L4_argument_unpacking_done;
   19731           0 :   __pyx_L3_error:;
   19732             :   {
   19733           0 :     Py_ssize_t __pyx_temp;
   19734           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   19735             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
   19736             :     }
   19737             :   }
   19738           0 :   __Pyx_AddTraceback("scipy.interpolate._interpnd.NDInterpolatorBase._calculate_triangulation", __pyx_clineno, __pyx_lineno, __pyx_filename);
   19739           0 :   __Pyx_RefNannyFinishContext();
   19740           0 :   return NULL;
   19741          24 :   __pyx_L4_argument_unpacking_done:;
   19742          48 :   __pyx_r = __pyx_pf_5scipy_11interpolate_9_interpnd_18NDInterpolatorBase_2_calculate_triangulation(__pyx_self, __pyx_v_self, __pyx_v_points);
   19743             : 
   19744             :   /* function exit code */
   19745             :   {
   19746          24 :     Py_ssize_t __pyx_temp;
   19747          24 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   19748             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
   19749             :     }
   19750             :   }
   19751             :   __Pyx_RefNannyFinishContext();
   19752             :   return __pyx_r;
   19753             : }
   19754             : 
   19755          24 : static PyObject *__pyx_pf_5scipy_11interpolate_9_interpnd_18NDInterpolatorBase_2_calculate_triangulation(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_points) {
   19756          24 :   PyObject *__pyx_r = NULL;
   19757             :   __Pyx_RefNannyDeclarations
   19758          24 :   __Pyx_RefNannySetupContext("_calculate_triangulation", 1);
   19759             : 
   19760             :   /* function exit code */
   19761          24 :   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   19762          24 :   __Pyx_XGIVEREF(__pyx_r);
   19763          24 :   __Pyx_RefNannyFinishContext();
   19764          24 :   return __pyx_r;
   19765             : }
   19766             : 
   19767             : /* "scipy/interpolate/_interpnd.pyx":103
   19768             :  *         pass
   19769             :  * 
   19770             :  *     def _set_values(self, values, fill_value=np.nan, need_contiguous=True, ndim=None):             # <<<<<<<<<<<<<<
   19771             :  *         values = np.asarray(values)
   19772             :  *         _check_init_shape(self.points, values, ndim=ndim)
   19773             :  */
   19774             : 
   19775           0 : static PyObject *__pyx_pf_5scipy_11interpolate_9_interpnd_6__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
   19776           0 :   PyObject *__pyx_r = NULL;
   19777             :   __Pyx_RefNannyDeclarations
   19778           0 :   PyObject *__pyx_t_1 = NULL;
   19779           0 :   PyObject *__pyx_t_2 = NULL;
   19780           0 :   int __pyx_lineno = 0;
   19781           0 :   const char *__pyx_filename = NULL;
   19782           0 :   int __pyx_clineno = 0;
   19783           0 :   __Pyx_RefNannySetupContext("__defaults__", 1);
   19784           0 :   __Pyx_XDECREF(__pyx_r);
   19785           0 :   __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 103, __pyx_L1_error)
   19786           0 :   __Pyx_GOTREF(__pyx_t_1);
   19787           0 :   __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_self)->__pyx_arg_fill_value);
   19788           0 :   __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_self)->__pyx_arg_fill_value);
   19789           0 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_self)->__pyx_arg_fill_value)) __PYX_ERR(0, 103, __pyx_L1_error);
   19790           0 :   __Pyx_INCREF(((PyObject *)Py_True));
   19791           0 :   __Pyx_GIVEREF(((PyObject *)Py_True));
   19792           0 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)Py_True))) __PYX_ERR(0, 103, __pyx_L1_error);
   19793           0 :   __Pyx_INCREF(Py_None);
   19794           0 :   __Pyx_GIVEREF(Py_None);
   19795           0 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None)) __PYX_ERR(0, 103, __pyx_L1_error);
   19796           0 :   __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 103, __pyx_L1_error)
   19797           0 :   __Pyx_GOTREF(__pyx_t_2);
   19798           0 :   __Pyx_GIVEREF(__pyx_t_1);
   19799           0 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(0, 103, __pyx_L1_error);
   19800           0 :   __Pyx_INCREF(Py_None);
   19801           0 :   __Pyx_GIVEREF(Py_None);
   19802           0 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None)) __PYX_ERR(0, 103, __pyx_L1_error);
   19803           0 :   __pyx_t_1 = 0;
   19804           0 :   __pyx_r = __pyx_t_2;
   19805           0 :   __pyx_t_2 = 0;
   19806           0 :   goto __pyx_L0;
   19807             : 
   19808             :   /* function exit code */
   19809           0 :   __pyx_L1_error:;
   19810           0 :   __Pyx_XDECREF(__pyx_t_1);
   19811           0 :   __Pyx_XDECREF(__pyx_t_2);
   19812           0 :   __Pyx_AddTraceback("scipy.interpolate._interpnd.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   19813           0 :   __pyx_r = NULL;
   19814           0 :   __pyx_L0:;
   19815           0 :   __Pyx_XGIVEREF(__pyx_r);
   19816           0 :   __Pyx_RefNannyFinishContext();
   19817           0 :   return __pyx_r;
   19818             : }
   19819             : 
   19820             : /* Python wrapper */
   19821             : static PyObject *__pyx_pw_5scipy_11interpolate_9_interpnd_18NDInterpolatorBase_5_set_values(PyObject *__pyx_self, 
   19822             : #if CYTHON_METH_FASTCALL
   19823             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   19824             : #else
   19825             : PyObject *__pyx_args, PyObject *__pyx_kwds
   19826             : #endif
   19827             : ); /*proto*/
   19828             : static PyMethodDef __pyx_mdef_5scipy_11interpolate_9_interpnd_18NDInterpolatorBase_5_set_values = {"_set_values", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5scipy_11interpolate_9_interpnd_18NDInterpolatorBase_5_set_values, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
   19829         111 : static PyObject *__pyx_pw_5scipy_11interpolate_9_interpnd_18NDInterpolatorBase_5_set_values(PyObject *__pyx_self, 
   19830             : #if CYTHON_METH_FASTCALL
   19831             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   19832             : #else
   19833             : PyObject *__pyx_args, PyObject *__pyx_kwds
   19834             : #endif
   19835             : ) {
   19836         111 :   PyObject *__pyx_v_self = 0;
   19837         111 :   PyObject *__pyx_v_values = 0;
   19838         111 :   PyObject *__pyx_v_fill_value = 0;
   19839         111 :   PyObject *__pyx_v_need_contiguous = 0;
   19840         111 :   PyObject *__pyx_v_ndim = 0;
   19841             :   #if !CYTHON_METH_FASTCALL
   19842             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
   19843             :   #endif
   19844         111 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   19845         111 :   PyObject* values[5] = {0,0,0,0,0};
   19846         111 :   int __pyx_lineno = 0;
   19847         111 :   const char *__pyx_filename = NULL;
   19848         111 :   int __pyx_clineno = 0;
   19849         111 :   PyObject *__pyx_r = 0;
   19850             :   __Pyx_RefNannyDeclarations
   19851         111 :   __Pyx_RefNannySetupContext("_set_values (wrapper)", 0);
   19852             :   #if !CYTHON_METH_FASTCALL
   19853             :   #if CYTHON_ASSUME_SAFE_MACROS
   19854             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
   19855             :   #else
   19856             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
   19857             :   #endif
   19858             :   #endif
   19859         111 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
   19860             :   {
   19861         111 :     PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_values,&__pyx_n_s_fill_value,&__pyx_n_s_need_contiguous,&__pyx_n_s_ndim,0};
   19862         111 :     __pyx_defaults1 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_self);
   19863         111 :     values[2] = __Pyx_Arg_NewRef_FASTCALL(__pyx_dynamic_args->__pyx_arg_fill_value);
   19864         111 :     values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_True)));
   19865         111 :     values[4] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
   19866         111 :     if (__pyx_kwds) {
   19867          57 :       Py_ssize_t kw_args;
   19868          57 :       switch (__pyx_nargs) {
   19869           0 :         case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
   19870           0 :         CYTHON_FALLTHROUGH;
   19871           0 :         case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
   19872           0 :         CYTHON_FALLTHROUGH;
   19873           0 :         case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
   19874          57 :         CYTHON_FALLTHROUGH;
   19875          57 :         case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
   19876          57 :         CYTHON_FALLTHROUGH;
   19877          57 :         case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
   19878          57 :         CYTHON_FALLTHROUGH;
   19879          57 :         case  0: break;
   19880           0 :         default: goto __pyx_L5_argtuple_error;
   19881             :       }
   19882          57 :       kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
   19883          57 :       switch (__pyx_nargs) {
   19884           0 :         case  0:
   19885           0 :         if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
   19886           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
   19887           0 :           kw_args--;
   19888             :         }
   19889           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 103, __pyx_L3_error)
   19890           0 :         else goto __pyx_L5_argtuple_error;
   19891           0 :         CYTHON_FALLTHROUGH;
   19892             :         case  1:
   19893           0 :         if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_values)) != 0)) {
   19894           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
   19895           0 :           kw_args--;
   19896             :         }
   19897           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 103, __pyx_L3_error)
   19898             :         else {
   19899           0 :           __Pyx_RaiseArgtupleInvalid("_set_values", 0, 2, 5, 1); __PYX_ERR(0, 103, __pyx_L3_error)
   19900             :         }
   19901          57 :         CYTHON_FALLTHROUGH;
   19902             :         case  2:
   19903          57 :         if (kw_args > 0) {
   19904          57 :           PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fill_value);
   19905          57 :           if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
   19906           0 :           else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 103, __pyx_L3_error)
   19907             :         }
   19908          57 :         CYTHON_FALLTHROUGH;
   19909             :         case  3:
   19910          57 :         if (kw_args > 0) {
   19911          57 :           PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_need_contiguous);
   19912          57 :           if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
   19913           0 :           else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 103, __pyx_L3_error)
   19914             :         }
   19915          57 :         CYTHON_FALLTHROUGH;
   19916             :         case  4:
   19917          57 :         if (kw_args > 0) {
   19918          57 :           PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ndim);
   19919          57 :           if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
   19920           0 :           else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 103, __pyx_L3_error)
   19921             :         }
   19922             :       }
   19923          57 :       if (unlikely(kw_args > 0)) {
   19924           0 :         const Py_ssize_t kwd_pos_args = __pyx_nargs;
   19925           0 :         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_set_values") < 0)) __PYX_ERR(0, 103, __pyx_L3_error)
   19926             :       }
   19927             :     } else {
   19928          54 :       switch (__pyx_nargs) {
   19929          54 :         case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
   19930          54 :         CYTHON_FALLTHROUGH;
   19931          54 :         case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
   19932          54 :         CYTHON_FALLTHROUGH;
   19933          54 :         case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
   19934          54 :         CYTHON_FALLTHROUGH;
   19935          54 :         case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
   19936          54 :         values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
   19937          54 :         break;
   19938           0 :         default: goto __pyx_L5_argtuple_error;
   19939             :       }
   19940             :     }
   19941         111 :     __pyx_v_self = values[0];
   19942         111 :     __pyx_v_values = values[1];
   19943         111 :     __pyx_v_fill_value = values[2];
   19944         111 :     __pyx_v_need_contiguous = values[3];
   19945         111 :     __pyx_v_ndim = values[4];
   19946             :   }
   19947         111 :   goto __pyx_L6_skip;
   19948           0 :   __pyx_L5_argtuple_error:;
   19949           0 :   __Pyx_RaiseArgtupleInvalid("_set_values", 0, 2, 5, __pyx_nargs); __PYX_ERR(0, 103, __pyx_L3_error)
   19950         111 :   __pyx_L6_skip:;
   19951         111 :   goto __pyx_L4_argument_unpacking_done;
   19952           0 :   __pyx_L3_error:;
   19953             :   {
   19954           0 :     Py_ssize_t __pyx_temp;
   19955           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   19956             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
   19957             :     }
   19958             :   }
   19959           0 :   __Pyx_AddTraceback("scipy.interpolate._interpnd.NDInterpolatorBase._set_values", __pyx_clineno, __pyx_lineno, __pyx_filename);
   19960           0 :   __Pyx_RefNannyFinishContext();
   19961           0 :   return NULL;
   19962         111 :   __pyx_L4_argument_unpacking_done:;
   19963         111 :   __pyx_r = __pyx_pf_5scipy_11interpolate_9_interpnd_18NDInterpolatorBase_4_set_values(__pyx_self, __pyx_v_self, __pyx_v_values, __pyx_v_fill_value, __pyx_v_need_contiguous, __pyx_v_ndim);
   19964             : 
   19965             :   /* function exit code */
   19966             :   {
   19967         111 :     Py_ssize_t __pyx_temp;
   19968         111 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   19969             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
   19970             :     }
   19971             :   }
   19972             :   __Pyx_RefNannyFinishContext();
   19973             :   return __pyx_r;
   19974             : }
   19975             : 
   19976         111 : static PyObject *__pyx_pf_5scipy_11interpolate_9_interpnd_18NDInterpolatorBase_4_set_values(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_values, PyObject *__pyx_v_fill_value, PyObject *__pyx_v_need_contiguous, PyObject *__pyx_v_ndim) {
   19977         111 :   PyObject *__pyx_r = NULL;
   19978             :   __Pyx_RefNannyDeclarations
   19979         111 :   PyObject *__pyx_t_1 = NULL;
   19980         111 :   PyObject *__pyx_t_2 = NULL;
   19981         111 :   PyObject *__pyx_t_3 = NULL;
   19982         111 :   unsigned int __pyx_t_4;
   19983         111 :   struct __pyx_opt_args_5scipy_11interpolate_9_interpnd__check_init_shape __pyx_t_5;
   19984         111 :   int __pyx_t_6;
   19985         111 :   PyObject *__pyx_t_7 = NULL;
   19986         111 :   PyObject *__pyx_t_8 = NULL;
   19987         111 :   PyObject *__pyx_t_9 = NULL;
   19988         111 :   PyObject *__pyx_t_10 = NULL;
   19989         111 :   int __pyx_lineno = 0;
   19990         111 :   const char *__pyx_filename = NULL;
   19991         111 :   int __pyx_clineno = 0;
   19992         111 :   __Pyx_RefNannySetupContext("_set_values", 0);
   19993         111 :   __Pyx_INCREF(__pyx_v_values);
   19994             : 
   19995             :   /* "scipy/interpolate/_interpnd.pyx":104
   19996             :  * 
   19997             :  *     def _set_values(self, values, fill_value=np.nan, need_contiguous=True, ndim=None):
   19998             :  *         values = np.asarray(values)             # <<<<<<<<<<<<<<
   19999             :  *         _check_init_shape(self.points, values, ndim=ndim)
   20000             :  * 
   20001             :  */
   20002         111 :   __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 104, __pyx_L1_error)
   20003         111 :   __Pyx_GOTREF(__pyx_t_2);
   20004         111 :   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 104, __pyx_L1_error)
   20005         111 :   __Pyx_GOTREF(__pyx_t_3);
   20006         111 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   20007         111 :   __pyx_t_2 = NULL;
   20008         111 :   __pyx_t_4 = 0;
   20009             :   #if CYTHON_UNPACK_METHODS
   20010         111 :   if (unlikely(PyMethod_Check(__pyx_t_3))) {
   20011           0 :     __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
   20012           0 :     if (likely(__pyx_t_2)) {
   20013           0 :       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
   20014           0 :       __Pyx_INCREF(__pyx_t_2);
   20015           0 :       __Pyx_INCREF(function);
   20016           0 :       __Pyx_DECREF_SET(__pyx_t_3, function);
   20017             :       __pyx_t_4 = 1;
   20018             :     }
   20019             :   }
   20020             :   #endif
   20021             :   {
   20022         111 :     PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_values};
   20023         111 :     __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
   20024         111 :     __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
   20025         111 :     if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 104, __pyx_L1_error)
   20026         111 :     __Pyx_GOTREF(__pyx_t_1);
   20027         111 :     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   20028             :   }
   20029         111 :   __Pyx_DECREF_SET(__pyx_v_values, __pyx_t_1);
   20030         111 :   __pyx_t_1 = 0;
   20031             : 
   20032             :   /* "scipy/interpolate/_interpnd.pyx":105
   20033             :  *     def _set_values(self, values, fill_value=np.nan, need_contiguous=True, ndim=None):
   20034             :  *         values = np.asarray(values)
   20035             :  *         _check_init_shape(self.points, values, ndim=ndim)             # <<<<<<<<<<<<<<
   20036             :  * 
   20037             :  *         self.values_shape = values.shape[1:]
   20038             :  */
   20039         111 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_points); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 105, __pyx_L1_error)
   20040         111 :   __Pyx_GOTREF(__pyx_t_1);
   20041         111 :   __pyx_t_5.__pyx_n = 1;
   20042         111 :   __pyx_t_5.ndim = __pyx_v_ndim;
   20043         111 :   __pyx_t_3 = __pyx_f_5scipy_11interpolate_9_interpnd__check_init_shape(__pyx_t_1, __pyx_v_values, &__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 105, __pyx_L1_error)
   20044         110 :   __Pyx_GOTREF(__pyx_t_3);
   20045         110 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   20046         110 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   20047             : 
   20048             :   /* "scipy/interpolate/_interpnd.pyx":107
   20049             :  *         _check_init_shape(self.points, values, ndim=ndim)
   20050             :  * 
   20051             :  *         self.values_shape = values.shape[1:]             # <<<<<<<<<<<<<<
   20052             :  *         if values.ndim == 1:
   20053             :  *             self.values = values[:,None]
   20054             :  */
   20055         110 :   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_values, __pyx_n_s_shape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 107, __pyx_L1_error)
   20056         110 :   __Pyx_GOTREF(__pyx_t_3);
   20057         110 :   __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_t_3, 1, 0, NULL, NULL, &__pyx_slice__10, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 107, __pyx_L1_error)
   20058         110 :   __Pyx_GOTREF(__pyx_t_1);
   20059         110 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   20060         110 :   if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_values_shape, __pyx_t_1) < 0) __PYX_ERR(0, 107, __pyx_L1_error)
   20061         110 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   20062             : 
   20063             :   /* "scipy/interpolate/_interpnd.pyx":108
   20064             :  * 
   20065             :  *         self.values_shape = values.shape[1:]
   20066             :  *         if values.ndim == 1:             # <<<<<<<<<<<<<<
   20067             :  *             self.values = values[:,None]
   20068             :  *         elif values.ndim == 2:
   20069             :  */
   20070         110 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_values, __pyx_n_s_ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 108, __pyx_L1_error)
   20071         110 :   __Pyx_GOTREF(__pyx_t_1);
   20072         110 :   __pyx_t_6 = (__Pyx_PyInt_BoolEqObjC(__pyx_t_1, __pyx_int_1, 1, 0)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 108, __pyx_L1_error)
   20073         110 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   20074         110 :   if (__pyx_t_6) {
   20075             : 
   20076             :     /* "scipy/interpolate/_interpnd.pyx":109
   20077             :  *         self.values_shape = values.shape[1:]
   20078             :  *         if values.ndim == 1:
   20079             :  *             self.values = values[:,None]             # <<<<<<<<<<<<<<
   20080             :  *         elif values.ndim == 2:
   20081             :  *             self.values = values
   20082             :  */
   20083          98 :     __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_values, __pyx_tuple__11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 109, __pyx_L1_error)
   20084          98 :     __Pyx_GOTREF(__pyx_t_1);
   20085          98 :     if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_values, __pyx_t_1) < 0) __PYX_ERR(0, 109, __pyx_L1_error)
   20086          98 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   20087             : 
   20088             :     /* "scipy/interpolate/_interpnd.pyx":108
   20089             :  * 
   20090             :  *         self.values_shape = values.shape[1:]
   20091             :  *         if values.ndim == 1:             # <<<<<<<<<<<<<<
   20092             :  *             self.values = values[:,None]
   20093             :  *         elif values.ndim == 2:
   20094             :  */
   20095          98 :     goto __pyx_L3;
   20096             :   }
   20097             : 
   20098             :   /* "scipy/interpolate/_interpnd.pyx":110
   20099             :  *         if values.ndim == 1:
   20100             :  *             self.values = values[:,None]
   20101             :  *         elif values.ndim == 2:             # <<<<<<<<<<<<<<
   20102             :  *             self.values = values
   20103             :  *         else:
   20104             :  */
   20105          12 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_values, __pyx_n_s_ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 110, __pyx_L1_error)
   20106          12 :   __Pyx_GOTREF(__pyx_t_1);
   20107          12 :   __pyx_t_6 = (__Pyx_PyInt_BoolEqObjC(__pyx_t_1, __pyx_int_2, 2, 0)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 110, __pyx_L1_error)
   20108          12 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   20109          12 :   if (__pyx_t_6) {
   20110             : 
   20111             :     /* "scipy/interpolate/_interpnd.pyx":111
   20112             :  *             self.values = values[:,None]
   20113             :  *         elif values.ndim == 2:
   20114             :  *             self.values = values             # <<<<<<<<<<<<<<
   20115             :  *         else:
   20116             :  *             self.values = values.reshape(values.shape[0],
   20117             :  */
   20118          12 :     if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_values, __pyx_v_values) < 0) __PYX_ERR(0, 111, __pyx_L1_error)
   20119             : 
   20120             :     /* "scipy/interpolate/_interpnd.pyx":110
   20121             :  *         if values.ndim == 1:
   20122             :  *             self.values = values[:,None]
   20123             :  *         elif values.ndim == 2:             # <<<<<<<<<<<<<<
   20124             :  *             self.values = values
   20125             :  *         else:
   20126             :  */
   20127          12 :     goto __pyx_L3;
   20128             :   }
   20129             : 
   20130             :   /* "scipy/interpolate/_interpnd.pyx":113
   20131             :  *             self.values = values
   20132             :  *         else:
   20133             :  *             self.values = values.reshape(values.shape[0],             # <<<<<<<<<<<<<<
   20134             :  *                                             np.prod(values.shape[1:]))
   20135             :  * 
   20136             :  */
   20137             :   /*else*/ {
   20138           0 :     __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_values, __pyx_n_s_reshape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 113, __pyx_L1_error)
   20139           0 :     __Pyx_GOTREF(__pyx_t_3);
   20140           0 :     __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_values, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 113, __pyx_L1_error)
   20141           0 :     __Pyx_GOTREF(__pyx_t_2);
   20142           0 :     __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 113, __pyx_L1_error)
   20143           0 :     __Pyx_GOTREF(__pyx_t_7);
   20144           0 :     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   20145             : 
   20146             :     /* "scipy/interpolate/_interpnd.pyx":114
   20147             :  *         else:
   20148             :  *             self.values = values.reshape(values.shape[0],
   20149             :  *                                             np.prod(values.shape[1:]))             # <<<<<<<<<<<<<<
   20150             :  * 
   20151             :  *         # Complex or real?
   20152             :  */
   20153           0 :     __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 114, __pyx_L1_error)
   20154           0 :     __Pyx_GOTREF(__pyx_t_8);
   20155           0 :     __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_prod); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 114, __pyx_L1_error)
   20156           0 :     __Pyx_GOTREF(__pyx_t_9);
   20157           0 :     __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   20158           0 :     __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_values, __pyx_n_s_shape); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 114, __pyx_L1_error)
   20159           0 :     __Pyx_GOTREF(__pyx_t_8);
   20160           0 :     __pyx_t_10 = __Pyx_PyObject_GetSlice(__pyx_t_8, 1, 0, NULL, NULL, &__pyx_slice__10, 1, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 114, __pyx_L1_error)
   20161           0 :     __Pyx_GOTREF(__pyx_t_10);
   20162           0 :     __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   20163           0 :     __pyx_t_8 = NULL;
   20164           0 :     __pyx_t_4 = 0;
   20165             :     #if CYTHON_UNPACK_METHODS
   20166           0 :     if (unlikely(PyMethod_Check(__pyx_t_9))) {
   20167           0 :       __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_9);
   20168           0 :       if (likely(__pyx_t_8)) {
   20169           0 :         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
   20170           0 :         __Pyx_INCREF(__pyx_t_8);
   20171           0 :         __Pyx_INCREF(function);
   20172           0 :         __Pyx_DECREF_SET(__pyx_t_9, function);
   20173             :         __pyx_t_4 = 1;
   20174             :       }
   20175             :     }
   20176             :     #endif
   20177             :     {
   20178           0 :       PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_10};
   20179           0 :       __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
   20180           0 :       __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
   20181           0 :       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
   20182           0 :       if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 114, __pyx_L1_error)
   20183           0 :       __Pyx_GOTREF(__pyx_t_2);
   20184           0 :       __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
   20185             :     }
   20186           0 :     __pyx_t_9 = NULL;
   20187           0 :     __pyx_t_4 = 0;
   20188             :     #if CYTHON_UNPACK_METHODS
   20189           0 :     if (likely(PyMethod_Check(__pyx_t_3))) {
   20190           0 :       __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
   20191           0 :       if (likely(__pyx_t_9)) {
   20192           0 :         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
   20193           0 :         __Pyx_INCREF(__pyx_t_9);
   20194           0 :         __Pyx_INCREF(function);
   20195           0 :         __Pyx_DECREF_SET(__pyx_t_3, function);
   20196             :         __pyx_t_4 = 1;
   20197             :       }
   20198             :     }
   20199             :     #endif
   20200             :     {
   20201           0 :       PyObject *__pyx_callargs[3] = {__pyx_t_9, __pyx_t_7, __pyx_t_2};
   20202           0 :       __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
   20203           0 :       __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
   20204           0 :       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   20205           0 :       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   20206           0 :       if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 113, __pyx_L1_error)
   20207           0 :       __Pyx_GOTREF(__pyx_t_1);
   20208           0 :       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   20209             :     }
   20210             : 
   20211             :     /* "scipy/interpolate/_interpnd.pyx":113
   20212             :  *             self.values = values
   20213             :  *         else:
   20214             :  *             self.values = values.reshape(values.shape[0],             # <<<<<<<<<<<<<<
   20215             :  *                                             np.prod(values.shape[1:]))
   20216             :  * 
   20217             :  */
   20218           0 :     if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_values, __pyx_t_1) < 0) __PYX_ERR(0, 113, __pyx_L1_error)
   20219           0 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   20220             :   }
   20221         110 :   __pyx_L3:;
   20222             : 
   20223             :   /* "scipy/interpolate/_interpnd.pyx":117
   20224             :  * 
   20225             :  *         # Complex or real?
   20226             :  *         self.is_complex = np.issubdtype(self.values.dtype, np.complexfloating)             # <<<<<<<<<<<<<<
   20227             :  *         if self.is_complex:
   20228             :  *             if need_contiguous:
   20229             :  */
   20230         110 :   __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 117, __pyx_L1_error)
   20231         110 :   __Pyx_GOTREF(__pyx_t_3);
   20232         110 :   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_issubdtype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 117, __pyx_L1_error)
   20233         110 :   __Pyx_GOTREF(__pyx_t_2);
   20234         110 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   20235         110 :   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_values); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 117, __pyx_L1_error)
   20236         110 :   __Pyx_GOTREF(__pyx_t_3);
   20237         110 :   __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_dtype); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 117, __pyx_L1_error)
   20238         110 :   __Pyx_GOTREF(__pyx_t_7);
   20239         110 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   20240         110 :   __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 117, __pyx_L1_error)
   20241         110 :   __Pyx_GOTREF(__pyx_t_3);
   20242         110 :   __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_complexfloating); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 117, __pyx_L1_error)
   20243         110 :   __Pyx_GOTREF(__pyx_t_9);
   20244         110 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   20245         110 :   __pyx_t_3 = NULL;
   20246         110 :   __pyx_t_4 = 0;
   20247             :   #if CYTHON_UNPACK_METHODS
   20248         110 :   if (unlikely(PyMethod_Check(__pyx_t_2))) {
   20249           0 :     __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
   20250           0 :     if (likely(__pyx_t_3)) {
   20251           0 :       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
   20252           0 :       __Pyx_INCREF(__pyx_t_3);
   20253           0 :       __Pyx_INCREF(function);
   20254           0 :       __Pyx_DECREF_SET(__pyx_t_2, function);
   20255             :       __pyx_t_4 = 1;
   20256             :     }
   20257             :   }
   20258             :   #endif
   20259             :   {
   20260         110 :     PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_t_7, __pyx_t_9};
   20261         110 :     __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
   20262         110 :     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
   20263         110 :     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   20264         110 :     __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
   20265         110 :     if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 117, __pyx_L1_error)
   20266         110 :     __Pyx_GOTREF(__pyx_t_1);
   20267         110 :     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   20268             :   }
   20269         110 :   if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_is_complex, __pyx_t_1) < 0) __PYX_ERR(0, 117, __pyx_L1_error)
   20270         110 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   20271             : 
   20272             :   /* "scipy/interpolate/_interpnd.pyx":118
   20273             :  *         # Complex or real?
   20274             :  *         self.is_complex = np.issubdtype(self.values.dtype, np.complexfloating)
   20275             :  *         if self.is_complex:             # <<<<<<<<<<<<<<
   20276             :  *             if need_contiguous:
   20277             :  *                 self.values = np.ascontiguousarray(self.values,
   20278             :  */
   20279         110 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_is_complex); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 118, __pyx_L1_error)
   20280         110 :   __Pyx_GOTREF(__pyx_t_1);
   20281         110 :   __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 118, __pyx_L1_error)
   20282         110 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   20283         110 :   if (__pyx_t_6) {
   20284             : 
   20285             :     /* "scipy/interpolate/_interpnd.pyx":119
   20286             :  *         self.is_complex = np.issubdtype(self.values.dtype, np.complexfloating)
   20287             :  *         if self.is_complex:
   20288             :  *             if need_contiguous:             # <<<<<<<<<<<<<<
   20289             :  *                 self.values = np.ascontiguousarray(self.values,
   20290             :  *                                                     dtype=np.complex128)
   20291             :  */
   20292          27 :     __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_need_contiguous); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 119, __pyx_L1_error)
   20293          27 :     if (__pyx_t_6) {
   20294             : 
   20295             :       /* "scipy/interpolate/_interpnd.pyx":120
   20296             :  *         if self.is_complex:
   20297             :  *             if need_contiguous:
   20298             :  *                 self.values = np.ascontiguousarray(self.values,             # <<<<<<<<<<<<<<
   20299             :  *                                                     dtype=np.complex128)
   20300             :  *             self.fill_value = complex(fill_value)
   20301             :  */
   20302          21 :       __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 120, __pyx_L1_error)
   20303          21 :       __Pyx_GOTREF(__pyx_t_1);
   20304          21 :       __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_ascontiguousarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 120, __pyx_L1_error)
   20305          21 :       __Pyx_GOTREF(__pyx_t_2);
   20306          21 :       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   20307          21 :       __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 120, __pyx_L1_error)
   20308          21 :       __Pyx_GOTREF(__pyx_t_1);
   20309          21 :       __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 120, __pyx_L1_error)
   20310          21 :       __Pyx_GOTREF(__pyx_t_9);
   20311          21 :       __Pyx_GIVEREF(__pyx_t_1);
   20312          21 :       if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_1)) __PYX_ERR(0, 120, __pyx_L1_error);
   20313          21 :       __pyx_t_1 = 0;
   20314             : 
   20315             :       /* "scipy/interpolate/_interpnd.pyx":121
   20316             :  *             if need_contiguous:
   20317             :  *                 self.values = np.ascontiguousarray(self.values,
   20318             :  *                                                     dtype=np.complex128)             # <<<<<<<<<<<<<<
   20319             :  *             self.fill_value = complex(fill_value)
   20320             :  *         else:
   20321             :  */
   20322          21 :       __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 121, __pyx_L1_error)
   20323          21 :       __Pyx_GOTREF(__pyx_t_1);
   20324          21 :       __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 121, __pyx_L1_error)
   20325          21 :       __Pyx_GOTREF(__pyx_t_7);
   20326          21 :       __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_complex128); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 121, __pyx_L1_error)
   20327          21 :       __Pyx_GOTREF(__pyx_t_3);
   20328          21 :       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   20329          21 :       if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(0, 121, __pyx_L1_error)
   20330          21 :       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   20331             : 
   20332             :       /* "scipy/interpolate/_interpnd.pyx":120
   20333             :  *         if self.is_complex:
   20334             :  *             if need_contiguous:
   20335             :  *                 self.values = np.ascontiguousarray(self.values,             # <<<<<<<<<<<<<<
   20336             :  *                                                     dtype=np.complex128)
   20337             :  *             self.fill_value = complex(fill_value)
   20338             :  */
   20339          21 :       __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 120, __pyx_L1_error)
   20340          21 :       __Pyx_GOTREF(__pyx_t_3);
   20341          21 :       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   20342          21 :       __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
   20343          21 :       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   20344          21 :       if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_values, __pyx_t_3) < 0) __PYX_ERR(0, 120, __pyx_L1_error)
   20345          21 :       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   20346             : 
   20347             :       /* "scipy/interpolate/_interpnd.pyx":119
   20348             :  *         self.is_complex = np.issubdtype(self.values.dtype, np.complexfloating)
   20349             :  *         if self.is_complex:
   20350             :  *             if need_contiguous:             # <<<<<<<<<<<<<<
   20351             :  *                 self.values = np.ascontiguousarray(self.values,
   20352             :  *                                                     dtype=np.complex128)
   20353             :  */
   20354             :     }
   20355             : 
   20356             :     /* "scipy/interpolate/_interpnd.pyx":122
   20357             :  *                 self.values = np.ascontiguousarray(self.values,
   20358             :  *                                                     dtype=np.complex128)
   20359             :  *             self.fill_value = complex(fill_value)             # <<<<<<<<<<<<<<
   20360             :  *         else:
   20361             :  *             if need_contiguous:
   20362             :  */
   20363          27 :     __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyComplex_Type)), __pyx_v_fill_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 122, __pyx_L1_error)
   20364          27 :     __Pyx_GOTREF(__pyx_t_3);
   20365          27 :     if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_fill_value, __pyx_t_3) < 0) __PYX_ERR(0, 122, __pyx_L1_error)
   20366          27 :     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   20367             : 
   20368             :     /* "scipy/interpolate/_interpnd.pyx":118
   20369             :  *         # Complex or real?
   20370             :  *         self.is_complex = np.issubdtype(self.values.dtype, np.complexfloating)
   20371             :  *         if self.is_complex:             # <<<<<<<<<<<<<<
   20372             :  *             if need_contiguous:
   20373             :  *                 self.values = np.ascontiguousarray(self.values,
   20374             :  */
   20375          27 :     goto __pyx_L4;
   20376             :   }
   20377             : 
   20378             :   /* "scipy/interpolate/_interpnd.pyx":124
   20379             :  *             self.fill_value = complex(fill_value)
   20380             :  *         else:
   20381             :  *             if need_contiguous:             # <<<<<<<<<<<<<<
   20382             :  *                 self.values = np.ascontiguousarray(
   20383             :  *                     self.values, dtype=np.float64
   20384             :  */
   20385             :   /*else*/ {
   20386          83 :     __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_need_contiguous); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 124, __pyx_L1_error)
   20387          83 :     if (__pyx_t_6) {
   20388             : 
   20389             :       /* "scipy/interpolate/_interpnd.pyx":125
   20390             :  *         else:
   20391             :  *             if need_contiguous:
   20392             :  *                 self.values = np.ascontiguousarray(             # <<<<<<<<<<<<<<
   20393             :  *                     self.values, dtype=np.float64
   20394             :  *                 )
   20395             :  */
   20396          65 :       __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 125, __pyx_L1_error)
   20397          65 :       __Pyx_GOTREF(__pyx_t_3);
   20398          65 :       __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_ascontiguousarray); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 125, __pyx_L1_error)
   20399          65 :       __Pyx_GOTREF(__pyx_t_1);
   20400          65 :       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   20401             : 
   20402             :       /* "scipy/interpolate/_interpnd.pyx":126
   20403             :  *             if need_contiguous:
   20404             :  *                 self.values = np.ascontiguousarray(
   20405             :  *                     self.values, dtype=np.float64             # <<<<<<<<<<<<<<
   20406             :  *                 )
   20407             :  *             self.fill_value = float(fill_value)
   20408             :  */
   20409          65 :       __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_values); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 126, __pyx_L1_error)
   20410          65 :       __Pyx_GOTREF(__pyx_t_3);
   20411             : 
   20412             :       /* "scipy/interpolate/_interpnd.pyx":125
   20413             :  *         else:
   20414             :  *             if need_contiguous:
   20415             :  *                 self.values = np.ascontiguousarray(             # <<<<<<<<<<<<<<
   20416             :  *                     self.values, dtype=np.float64
   20417             :  *                 )
   20418             :  */
   20419          65 :       __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 125, __pyx_L1_error)
   20420          65 :       __Pyx_GOTREF(__pyx_t_9);
   20421          65 :       __Pyx_GIVEREF(__pyx_t_3);
   20422          65 :       if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_3)) __PYX_ERR(0, 125, __pyx_L1_error);
   20423          65 :       __pyx_t_3 = 0;
   20424             : 
   20425             :       /* "scipy/interpolate/_interpnd.pyx":126
   20426             :  *             if need_contiguous:
   20427             :  *                 self.values = np.ascontiguousarray(
   20428             :  *                     self.values, dtype=np.float64             # <<<<<<<<<<<<<<
   20429             :  *                 )
   20430             :  *             self.fill_value = float(fill_value)
   20431             :  */
   20432          65 :       __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 126, __pyx_L1_error)
   20433          65 :       __Pyx_GOTREF(__pyx_t_3);
   20434          65 :       __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 126, __pyx_L1_error)
   20435          65 :       __Pyx_GOTREF(__pyx_t_2);
   20436          65 :       __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_float64); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 126, __pyx_L1_error)
   20437          65 :       __Pyx_GOTREF(__pyx_t_7);
   20438          65 :       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   20439          65 :       if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_7) < 0) __PYX_ERR(0, 126, __pyx_L1_error)
   20440          65 :       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   20441             : 
   20442             :       /* "scipy/interpolate/_interpnd.pyx":125
   20443             :  *         else:
   20444             :  *             if need_contiguous:
   20445             :  *                 self.values = np.ascontiguousarray(             # <<<<<<<<<<<<<<
   20446             :  *                     self.values, dtype=np.float64
   20447             :  *                 )
   20448             :  */
   20449          65 :       __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 125, __pyx_L1_error)
   20450          65 :       __Pyx_GOTREF(__pyx_t_7);
   20451          65 :       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   20452          65 :       __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
   20453          65 :       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   20454          65 :       if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_values, __pyx_t_7) < 0) __PYX_ERR(0, 125, __pyx_L1_error)
   20455          65 :       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   20456             : 
   20457             :       /* "scipy/interpolate/_interpnd.pyx":124
   20458             :  *             self.fill_value = complex(fill_value)
   20459             :  *         else:
   20460             :  *             if need_contiguous:             # <<<<<<<<<<<<<<
   20461             :  *                 self.values = np.ascontiguousarray(
   20462             :  *                     self.values, dtype=np.float64
   20463             :  */
   20464             :     }
   20465             : 
   20466             :     /* "scipy/interpolate/_interpnd.pyx":128
   20467             :  *                     self.values, dtype=np.float64
   20468             :  *                 )
   20469             :  *             self.fill_value = float(fill_value)             # <<<<<<<<<<<<<<
   20470             :  * 
   20471             :  *     def _check_call_shape(self, xi):
   20472             :  */
   20473         165 :     __pyx_t_7 = __Pyx_PyNumber_Float(__pyx_v_fill_value); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 128, __pyx_L1_error)
   20474          83 :     __Pyx_GOTREF(__pyx_t_7);
   20475          83 :     if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_fill_value, __pyx_t_7) < 0) __PYX_ERR(0, 128, __pyx_L1_error)
   20476          83 :     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   20477             :   }
   20478         110 :   __pyx_L4:;
   20479             : 
   20480             :   /* "scipy/interpolate/_interpnd.pyx":103
   20481             :  *         pass
   20482             :  * 
   20483             :  *     def _set_values(self, values, fill_value=np.nan, need_contiguous=True, ndim=None):             # <<<<<<<<<<<<<<
   20484             :  *         values = np.asarray(values)
   20485             :  *         _check_init_shape(self.points, values, ndim=ndim)
   20486             :  */
   20487             : 
   20488             :   /* function exit code */
   20489         110 :   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   20490         110 :   goto __pyx_L0;
   20491           1 :   __pyx_L1_error:;
   20492           1 :   __Pyx_XDECREF(__pyx_t_1);
   20493           1 :   __Pyx_XDECREF(__pyx_t_2);
   20494           1 :   __Pyx_XDECREF(__pyx_t_3);
   20495           1 :   __Pyx_XDECREF(__pyx_t_7);
   20496           1 :   __Pyx_XDECREF(__pyx_t_8);
   20497           1 :   __Pyx_XDECREF(__pyx_t_9);
   20498           1 :   __Pyx_XDECREF(__pyx_t_10);
   20499           1 :   __Pyx_AddTraceback("scipy.interpolate._interpnd.NDInterpolatorBase._set_values", __pyx_clineno, __pyx_lineno, __pyx_filename);
   20500           1 :   __pyx_r = NULL;
   20501         111 :   __pyx_L0:;
   20502         111 :   __Pyx_XDECREF(__pyx_v_values);
   20503         111 :   __Pyx_XGIVEREF(__pyx_r);
   20504         111 :   __Pyx_RefNannyFinishContext();
   20505         111 :   return __pyx_r;
   20506             : }
   20507             : 
   20508             : /* "scipy/interpolate/_interpnd.pyx":130
   20509             :  *             self.fill_value = float(fill_value)
   20510             :  * 
   20511             :  *     def _check_call_shape(self, xi):             # <<<<<<<<<<<<<<
   20512             :  *         xi = np.asanyarray(xi)
   20513             :  *         if xi.shape[-1] != self.points.shape[1]:
   20514             :  */
   20515             : 
   20516             : /* Python wrapper */
   20517             : static PyObject *__pyx_pw_5scipy_11interpolate_9_interpnd_18NDInterpolatorBase_7_check_call_shape(PyObject *__pyx_self, 
   20518             : #if CYTHON_METH_FASTCALL
   20519             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   20520             : #else
   20521             : PyObject *__pyx_args, PyObject *__pyx_kwds
   20522             : #endif
   20523             : ); /*proto*/
   20524             : static PyMethodDef __pyx_mdef_5scipy_11interpolate_9_interpnd_18NDInterpolatorBase_7_check_call_shape = {"_check_call_shape", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5scipy_11interpolate_9_interpnd_18NDInterpolatorBase_7_check_call_shape, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
   20525         131 : static PyObject *__pyx_pw_5scipy_11interpolate_9_interpnd_18NDInterpolatorBase_7_check_call_shape(PyObject *__pyx_self, 
   20526             : #if CYTHON_METH_FASTCALL
   20527             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   20528             : #else
   20529             : PyObject *__pyx_args, PyObject *__pyx_kwds
   20530             : #endif
   20531             : ) {
   20532         131 :   PyObject *__pyx_v_self = 0;
   20533         131 :   PyObject *__pyx_v_xi = 0;
   20534             :   #if !CYTHON_METH_FASTCALL
   20535             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
   20536             :   #endif
   20537         131 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   20538         131 :   PyObject* values[2] = {0,0};
   20539         131 :   int __pyx_lineno = 0;
   20540         131 :   const char *__pyx_filename = NULL;
   20541         131 :   int __pyx_clineno = 0;
   20542         131 :   PyObject *__pyx_r = 0;
   20543             :   __Pyx_RefNannyDeclarations
   20544         131 :   __Pyx_RefNannySetupContext("_check_call_shape (wrapper)", 0);
   20545             :   #if !CYTHON_METH_FASTCALL
   20546             :   #if CYTHON_ASSUME_SAFE_MACROS
   20547             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
   20548             :   #else
   20549             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
   20550             :   #endif
   20551             :   #endif
   20552         131 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
   20553             :   {
   20554         131 :     PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_xi,0};
   20555         131 :     if (__pyx_kwds) {
   20556           0 :       Py_ssize_t kw_args;
   20557           0 :       switch (__pyx_nargs) {
   20558           0 :         case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
   20559           0 :         CYTHON_FALLTHROUGH;
   20560           0 :         case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
   20561           0 :         CYTHON_FALLTHROUGH;
   20562           0 :         case  0: break;
   20563           0 :         default: goto __pyx_L5_argtuple_error;
   20564             :       }
   20565           0 :       kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
   20566           0 :       switch (__pyx_nargs) {
   20567             :         case  0:
   20568           0 :         if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
   20569           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
   20570           0 :           kw_args--;
   20571             :         }
   20572           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 130, __pyx_L3_error)
   20573           0 :         else goto __pyx_L5_argtuple_error;
   20574           0 :         CYTHON_FALLTHROUGH;
   20575             :         case  1:
   20576           0 :         if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_xi)) != 0)) {
   20577           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
   20578           0 :           kw_args--;
   20579             :         }
   20580           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 130, __pyx_L3_error)
   20581             :         else {
   20582           0 :           __Pyx_RaiseArgtupleInvalid("_check_call_shape", 1, 2, 2, 1); __PYX_ERR(0, 130, __pyx_L3_error)
   20583             :         }
   20584             :       }
   20585           0 :       if (unlikely(kw_args > 0)) {
   20586           0 :         const Py_ssize_t kwd_pos_args = __pyx_nargs;
   20587           0 :         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_check_call_shape") < 0)) __PYX_ERR(0, 130, __pyx_L3_error)
   20588             :       }
   20589         131 :     } else if (unlikely(__pyx_nargs != 2)) {
   20590           0 :       goto __pyx_L5_argtuple_error;
   20591             :     } else {
   20592         131 :       values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
   20593         131 :       values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
   20594             :     }
   20595         131 :     __pyx_v_self = values[0];
   20596         131 :     __pyx_v_xi = values[1];
   20597             :   }
   20598         131 :   goto __pyx_L6_skip;
   20599           0 :   __pyx_L5_argtuple_error:;
   20600           0 :   __Pyx_RaiseArgtupleInvalid("_check_call_shape", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 130, __pyx_L3_error)
   20601         131 :   __pyx_L6_skip:;
   20602         131 :   goto __pyx_L4_argument_unpacking_done;
   20603           0 :   __pyx_L3_error:;
   20604             :   {
   20605           0 :     Py_ssize_t __pyx_temp;
   20606           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   20607             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
   20608             :     }
   20609             :   }
   20610           0 :   __Pyx_AddTraceback("scipy.interpolate._interpnd.NDInterpolatorBase._check_call_shape", __pyx_clineno, __pyx_lineno, __pyx_filename);
   20611           0 :   __Pyx_RefNannyFinishContext();
   20612           0 :   return NULL;
   20613         131 :   __pyx_L4_argument_unpacking_done:;
   20614         131 :   __pyx_r = __pyx_pf_5scipy_11interpolate_9_interpnd_18NDInterpolatorBase_6_check_call_shape(__pyx_self, __pyx_v_self, __pyx_v_xi);
   20615             : 
   20616             :   /* function exit code */
   20617             :   {
   20618         131 :     Py_ssize_t __pyx_temp;
   20619         131 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   20620             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
   20621             :     }
   20622             :   }
   20623             :   __Pyx_RefNannyFinishContext();
   20624             :   return __pyx_r;
   20625             : }
   20626             : 
   20627         131 : static PyObject *__pyx_pf_5scipy_11interpolate_9_interpnd_18NDInterpolatorBase_6_check_call_shape(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_xi) {
   20628         131 :   PyObject *__pyx_r = NULL;
   20629             :   __Pyx_RefNannyDeclarations
   20630         131 :   PyObject *__pyx_t_1 = NULL;
   20631         131 :   PyObject *__pyx_t_2 = NULL;
   20632         131 :   PyObject *__pyx_t_3 = NULL;
   20633         131 :   unsigned int __pyx_t_4;
   20634         131 :   int __pyx_t_5;
   20635         131 :   int __pyx_lineno = 0;
   20636         131 :   const char *__pyx_filename = NULL;
   20637         131 :   int __pyx_clineno = 0;
   20638         131 :   __Pyx_RefNannySetupContext("_check_call_shape", 0);
   20639         131 :   __Pyx_INCREF(__pyx_v_xi);
   20640             : 
   20641             :   /* "scipy/interpolate/_interpnd.pyx":131
   20642             :  * 
   20643             :  *     def _check_call_shape(self, xi):
   20644             :  *         xi = np.asanyarray(xi)             # <<<<<<<<<<<<<<
   20645             :  *         if xi.shape[-1] != self.points.shape[1]:
   20646             :  *             raise ValueError("number of dimensions in xi does not match x")
   20647             :  */
   20648         131 :   __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 131, __pyx_L1_error)
   20649         131 :   __Pyx_GOTREF(__pyx_t_2);
   20650         131 :   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asanyarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 131, __pyx_L1_error)
   20651         131 :   __Pyx_GOTREF(__pyx_t_3);
   20652         131 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   20653         131 :   __pyx_t_2 = NULL;
   20654         131 :   __pyx_t_4 = 0;
   20655             :   #if CYTHON_UNPACK_METHODS
   20656         131 :   if (unlikely(PyMethod_Check(__pyx_t_3))) {
   20657           0 :     __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
   20658           0 :     if (likely(__pyx_t_2)) {
   20659           0 :       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
   20660           0 :       __Pyx_INCREF(__pyx_t_2);
   20661           0 :       __Pyx_INCREF(function);
   20662           0 :       __Pyx_DECREF_SET(__pyx_t_3, function);
   20663             :       __pyx_t_4 = 1;
   20664             :     }
   20665             :   }
   20666             :   #endif
   20667             :   {
   20668         131 :     PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_xi};
   20669         131 :     __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
   20670         131 :     __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
   20671         131 :     if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 131, __pyx_L1_error)
   20672         131 :     __Pyx_GOTREF(__pyx_t_1);
   20673         131 :     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   20674             :   }
   20675         131 :   __Pyx_DECREF_SET(__pyx_v_xi, __pyx_t_1);
   20676         131 :   __pyx_t_1 = 0;
   20677             : 
   20678             :   /* "scipy/interpolate/_interpnd.pyx":132
   20679             :  *     def _check_call_shape(self, xi):
   20680             :  *         xi = np.asanyarray(xi)
   20681             :  *         if xi.shape[-1] != self.points.shape[1]:             # <<<<<<<<<<<<<<
   20682             :  *             raise ValueError("number of dimensions in xi does not match x")
   20683             :  *         return xi
   20684             :  */
   20685         131 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_xi, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 132, __pyx_L1_error)
   20686         131 :   __Pyx_GOTREF(__pyx_t_1);
   20687         131 :   __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 132, __pyx_L1_error)
   20688         131 :   __Pyx_GOTREF(__pyx_t_3);
   20689         131 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   20690         131 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_points); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 132, __pyx_L1_error)
   20691         131 :   __Pyx_GOTREF(__pyx_t_1);
   20692         131 :   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 132, __pyx_L1_error)
   20693         131 :   __Pyx_GOTREF(__pyx_t_2);
   20694         131 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   20695         131 :   __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 132, __pyx_L1_error)
   20696         131 :   __Pyx_GOTREF(__pyx_t_1);
   20697         131 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   20698         131 :   __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 132, __pyx_L1_error)
   20699         131 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   20700         131 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   20701         131 :   __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 132, __pyx_L1_error)
   20702         131 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   20703         131 :   if (unlikely(__pyx_t_5)) {
   20704             : 
   20705             :     /* "scipy/interpolate/_interpnd.pyx":133
   20706             :  *         xi = np.asanyarray(xi)
   20707             :  *         if xi.shape[-1] != self.points.shape[1]:
   20708             :  *             raise ValueError("number of dimensions in xi does not match x")             # <<<<<<<<<<<<<<
   20709             :  *         return xi
   20710             :  * 
   20711             :  */
   20712           0 :     __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 133, __pyx_L1_error)
   20713           0 :     __Pyx_GOTREF(__pyx_t_2);
   20714           0 :     __Pyx_Raise(__pyx_t_2, 0, 0, 0);
   20715           0 :     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   20716           0 :     __PYX_ERR(0, 133, __pyx_L1_error)
   20717             : 
   20718             :     /* "scipy/interpolate/_interpnd.pyx":132
   20719             :  *     def _check_call_shape(self, xi):
   20720             :  *         xi = np.asanyarray(xi)
   20721             :  *         if xi.shape[-1] != self.points.shape[1]:             # <<<<<<<<<<<<<<
   20722             :  *             raise ValueError("number of dimensions in xi does not match x")
   20723             :  *         return xi
   20724             :  */
   20725             :   }
   20726             : 
   20727             :   /* "scipy/interpolate/_interpnd.pyx":134
   20728             :  *         if xi.shape[-1] != self.points.shape[1]:
   20729             :  *             raise ValueError("number of dimensions in xi does not match x")
   20730             :  *         return xi             # <<<<<<<<<<<<<<
   20731             :  * 
   20732             :  *     def _scale_x(self, xi):
   20733             :  */
   20734         131 :   __Pyx_XDECREF(__pyx_r);
   20735         131 :   __Pyx_INCREF(__pyx_v_xi);
   20736         131 :   __pyx_r = __pyx_v_xi;
   20737         131 :   goto __pyx_L0;
   20738             : 
   20739             :   /* "scipy/interpolate/_interpnd.pyx":130
   20740             :  *             self.fill_value = float(fill_value)
   20741             :  * 
   20742             :  *     def _check_call_shape(self, xi):             # <<<<<<<<<<<<<<
   20743             :  *         xi = np.asanyarray(xi)
   20744             :  *         if xi.shape[-1] != self.points.shape[1]:
   20745             :  */
   20746             : 
   20747             :   /* function exit code */
   20748           0 :   __pyx_L1_error:;
   20749           0 :   __Pyx_XDECREF(__pyx_t_1);
   20750           0 :   __Pyx_XDECREF(__pyx_t_2);
   20751           0 :   __Pyx_XDECREF(__pyx_t_3);
   20752           0 :   __Pyx_AddTraceback("scipy.interpolate._interpnd.NDInterpolatorBase._check_call_shape", __pyx_clineno, __pyx_lineno, __pyx_filename);
   20753           0 :   __pyx_r = NULL;
   20754         131 :   __pyx_L0:;
   20755         131 :   __Pyx_XDECREF(__pyx_v_xi);
   20756         131 :   __Pyx_XGIVEREF(__pyx_r);
   20757         131 :   __Pyx_RefNannyFinishContext();
   20758         131 :   return __pyx_r;
   20759             : }
   20760             : 
   20761             : /* "scipy/interpolate/_interpnd.pyx":136
   20762             :  *         return xi
   20763             :  * 
   20764             :  *     def _scale_x(self, xi):             # <<<<<<<<<<<<<<
   20765             :  *         if self.scale is None:
   20766             :  *             return xi
   20767             :  */
   20768             : 
   20769             : /* Python wrapper */
   20770             : static PyObject *__pyx_pw_5scipy_11interpolate_9_interpnd_18NDInterpolatorBase_9_scale_x(PyObject *__pyx_self, 
   20771             : #if CYTHON_METH_FASTCALL
   20772             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   20773             : #else
   20774             : PyObject *__pyx_args, PyObject *__pyx_kwds
   20775             : #endif
   20776             : ); /*proto*/
   20777             : static PyMethodDef __pyx_mdef_5scipy_11interpolate_9_interpnd_18NDInterpolatorBase_9_scale_x = {"_scale_x", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5scipy_11interpolate_9_interpnd_18NDInterpolatorBase_9_scale_x, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
   20778         131 : static PyObject *__pyx_pw_5scipy_11interpolate_9_interpnd_18NDInterpolatorBase_9_scale_x(PyObject *__pyx_self, 
   20779             : #if CYTHON_METH_FASTCALL
   20780             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   20781             : #else
   20782             : PyObject *__pyx_args, PyObject *__pyx_kwds
   20783             : #endif
   20784             : ) {
   20785         131 :   PyObject *__pyx_v_self = 0;
   20786         131 :   PyObject *__pyx_v_xi = 0;
   20787             :   #if !CYTHON_METH_FASTCALL
   20788             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
   20789             :   #endif
   20790         131 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   20791         131 :   PyObject* values[2] = {0,0};
   20792         131 :   int __pyx_lineno = 0;
   20793         131 :   const char *__pyx_filename = NULL;
   20794         131 :   int __pyx_clineno = 0;
   20795         131 :   PyObject *__pyx_r = 0;
   20796             :   __Pyx_RefNannyDeclarations
   20797         131 :   __Pyx_RefNannySetupContext("_scale_x (wrapper)", 0);
   20798             :   #if !CYTHON_METH_FASTCALL
   20799             :   #if CYTHON_ASSUME_SAFE_MACROS
   20800             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
   20801             :   #else
   20802             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
   20803             :   #endif
   20804             :   #endif
   20805         131 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
   20806             :   {
   20807         131 :     PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_xi,0};
   20808         131 :     if (__pyx_kwds) {
   20809           0 :       Py_ssize_t kw_args;
   20810           0 :       switch (__pyx_nargs) {
   20811           0 :         case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
   20812           0 :         CYTHON_FALLTHROUGH;
   20813           0 :         case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
   20814           0 :         CYTHON_FALLTHROUGH;
   20815           0 :         case  0: break;
   20816           0 :         default: goto __pyx_L5_argtuple_error;
   20817             :       }
   20818           0 :       kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
   20819           0 :       switch (__pyx_nargs) {
   20820             :         case  0:
   20821           0 :         if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
   20822           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
   20823           0 :           kw_args--;
   20824             :         }
   20825           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 136, __pyx_L3_error)
   20826           0 :         else goto __pyx_L5_argtuple_error;
   20827           0 :         CYTHON_FALLTHROUGH;
   20828             :         case  1:
   20829           0 :         if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_xi)) != 0)) {
   20830           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
   20831           0 :           kw_args--;
   20832             :         }
   20833           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 136, __pyx_L3_error)
   20834             :         else {
   20835           0 :           __Pyx_RaiseArgtupleInvalid("_scale_x", 1, 2, 2, 1); __PYX_ERR(0, 136, __pyx_L3_error)
   20836             :         }
   20837             :       }
   20838           0 :       if (unlikely(kw_args > 0)) {
   20839           0 :         const Py_ssize_t kwd_pos_args = __pyx_nargs;
   20840           0 :         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_scale_x") < 0)) __PYX_ERR(0, 136, __pyx_L3_error)
   20841             :       }
   20842         131 :     } else if (unlikely(__pyx_nargs != 2)) {
   20843           0 :       goto __pyx_L5_argtuple_error;
   20844             :     } else {
   20845         131 :       values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
   20846         131 :       values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
   20847             :     }
   20848         131 :     __pyx_v_self = values[0];
   20849         131 :     __pyx_v_xi = values[1];
   20850             :   }
   20851         131 :   goto __pyx_L6_skip;
   20852           0 :   __pyx_L5_argtuple_error:;
   20853           0 :   __Pyx_RaiseArgtupleInvalid("_scale_x", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 136, __pyx_L3_error)
   20854         131 :   __pyx_L6_skip:;
   20855         131 :   goto __pyx_L4_argument_unpacking_done;
   20856           0 :   __pyx_L3_error:;
   20857             :   {
   20858           0 :     Py_ssize_t __pyx_temp;
   20859           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   20860             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
   20861             :     }
   20862             :   }
   20863           0 :   __Pyx_AddTraceback("scipy.interpolate._interpnd.NDInterpolatorBase._scale_x", __pyx_clineno, __pyx_lineno, __pyx_filename);
   20864           0 :   __Pyx_RefNannyFinishContext();
   20865           0 :   return NULL;
   20866         131 :   __pyx_L4_argument_unpacking_done:;
   20867         131 :   __pyx_r = __pyx_pf_5scipy_11interpolate_9_interpnd_18NDInterpolatorBase_8_scale_x(__pyx_self, __pyx_v_self, __pyx_v_xi);
   20868             : 
   20869             :   /* function exit code */
   20870             :   {
   20871         131 :     Py_ssize_t __pyx_temp;
   20872         131 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   20873             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
   20874             :     }
   20875             :   }
   20876             :   __Pyx_RefNannyFinishContext();
   20877             :   return __pyx_r;
   20878             : }
   20879             : 
   20880         131 : static PyObject *__pyx_pf_5scipy_11interpolate_9_interpnd_18NDInterpolatorBase_8_scale_x(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_xi) {
   20881         131 :   PyObject *__pyx_r = NULL;
   20882             :   __Pyx_RefNannyDeclarations
   20883         131 :   PyObject *__pyx_t_1 = NULL;
   20884         131 :   int __pyx_t_2;
   20885         131 :   PyObject *__pyx_t_3 = NULL;
   20886         131 :   PyObject *__pyx_t_4 = NULL;
   20887         131 :   int __pyx_lineno = 0;
   20888         131 :   const char *__pyx_filename = NULL;
   20889         131 :   int __pyx_clineno = 0;
   20890         131 :   __Pyx_RefNannySetupContext("_scale_x", 1);
   20891             : 
   20892             :   /* "scipy/interpolate/_interpnd.pyx":137
   20893             :  * 
   20894             :  *     def _scale_x(self, xi):
   20895             :  *         if self.scale is None:             # <<<<<<<<<<<<<<
   20896             :  *             return xi
   20897             :  *         else:
   20898             :  */
   20899         131 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_scale); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 137, __pyx_L1_error)
   20900         131 :   __Pyx_GOTREF(__pyx_t_1);
   20901         131 :   __pyx_t_2 = (__pyx_t_1 == Py_None);
   20902         131 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   20903         131 :   if (__pyx_t_2) {
   20904             : 
   20905             :     /* "scipy/interpolate/_interpnd.pyx":138
   20906             :  *     def _scale_x(self, xi):
   20907             :  *         if self.scale is None:
   20908             :  *             return xi             # <<<<<<<<<<<<<<
   20909             :  *         else:
   20910             :  *             return (xi - self.offset) / self.scale
   20911             :  */
   20912          95 :     __Pyx_XDECREF(__pyx_r);
   20913          95 :     __Pyx_INCREF(__pyx_v_xi);
   20914          95 :     __pyx_r = __pyx_v_xi;
   20915          95 :     goto __pyx_L0;
   20916             : 
   20917             :     /* "scipy/interpolate/_interpnd.pyx":137
   20918             :  * 
   20919             :  *     def _scale_x(self, xi):
   20920             :  *         if self.scale is None:             # <<<<<<<<<<<<<<
   20921             :  *             return xi
   20922             :  *         else:
   20923             :  */
   20924             :   }
   20925             : 
   20926             :   /* "scipy/interpolate/_interpnd.pyx":140
   20927             :  *             return xi
   20928             :  *         else:
   20929             :  *             return (xi - self.offset) / self.scale             # <<<<<<<<<<<<<<
   20930             :  * 
   20931             :  *     def _preprocess_xi(self, *args):
   20932             :  */
   20933             :   /*else*/ {
   20934          36 :     __Pyx_XDECREF(__pyx_r);
   20935          36 :     __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_offset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 140, __pyx_L1_error)
   20936          36 :     __Pyx_GOTREF(__pyx_t_1);
   20937          36 :     __pyx_t_3 = PyNumber_Subtract(__pyx_v_xi, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 140, __pyx_L1_error)
   20938          36 :     __Pyx_GOTREF(__pyx_t_3);
   20939          36 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   20940          36 :     __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_scale); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 140, __pyx_L1_error)
   20941          36 :     __Pyx_GOTREF(__pyx_t_1);
   20942          36 :     __pyx_t_4 = __Pyx_PyNumber_Divide(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 140, __pyx_L1_error)
   20943          36 :     __Pyx_GOTREF(__pyx_t_4);
   20944          36 :     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   20945          36 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   20946          36 :     __pyx_r = __pyx_t_4;
   20947          36 :     __pyx_t_4 = 0;
   20948          36 :     goto __pyx_L0;
   20949             :   }
   20950             : 
   20951             :   /* "scipy/interpolate/_interpnd.pyx":136
   20952             :  *         return xi
   20953             :  * 
   20954             :  *     def _scale_x(self, xi):             # <<<<<<<<<<<<<<
   20955             :  *         if self.scale is None:
   20956             :  *             return xi
   20957             :  */
   20958             : 
   20959             :   /* function exit code */
   20960           0 :   __pyx_L1_error:;
   20961           0 :   __Pyx_XDECREF(__pyx_t_1);
   20962           0 :   __Pyx_XDECREF(__pyx_t_3);
   20963           0 :   __Pyx_XDECREF(__pyx_t_4);
   20964           0 :   __Pyx_AddTraceback("scipy.interpolate._interpnd.NDInterpolatorBase._scale_x", __pyx_clineno, __pyx_lineno, __pyx_filename);
   20965           0 :   __pyx_r = NULL;
   20966         131 :   __pyx_L0:;
   20967         131 :   __Pyx_XGIVEREF(__pyx_r);
   20968         131 :   __Pyx_RefNannyFinishContext();
   20969         131 :   return __pyx_r;
   20970             : }
   20971             : 
   20972             : /* "scipy/interpolate/_interpnd.pyx":142
   20973             :  *             return (xi - self.offset) / self.scale
   20974             :  * 
   20975             :  *     def _preprocess_xi(self, *args):             # <<<<<<<<<<<<<<
   20976             :  *         xi = _ndim_coords_from_arrays(args, ndim=self.points.shape[1])
   20977             :  *         xi = self._check_call_shape(xi)
   20978             :  */
   20979             : 
   20980             : /* Python wrapper */
   20981             : static PyObject *__pyx_pw_5scipy_11interpolate_9_interpnd_18NDInterpolatorBase_11_preprocess_xi(PyObject *__pyx_self, 
   20982             : #if CYTHON_METH_FASTCALL
   20983             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   20984             : #else
   20985             : PyObject *__pyx_args, PyObject *__pyx_kwds
   20986             : #endif
   20987             : ); /*proto*/
   20988             : static PyMethodDef __pyx_mdef_5scipy_11interpolate_9_interpnd_18NDInterpolatorBase_11_preprocess_xi = {"_preprocess_xi", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5scipy_11interpolate_9_interpnd_18NDInterpolatorBase_11_preprocess_xi, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
   20989          98 : static PyObject *__pyx_pw_5scipy_11interpolate_9_interpnd_18NDInterpolatorBase_11_preprocess_xi(PyObject *__pyx_self, 
   20990             : #if CYTHON_METH_FASTCALL
   20991             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   20992             : #else
   20993             : PyObject *__pyx_args, PyObject *__pyx_kwds
   20994             : #endif
   20995             : ) {
   20996          98 :   PyObject *__pyx_v_self = 0;
   20997          98 :   PyObject *__pyx_v_args = 0;
   20998             :   #if !CYTHON_METH_FASTCALL
   20999             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
   21000             :   #endif
   21001          98 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   21002          98 :   PyObject* values[1] = {0};
   21003          98 :   int __pyx_lineno = 0;
   21004          98 :   const char *__pyx_filename = NULL;
   21005          98 :   int __pyx_clineno = 0;
   21006          98 :   PyObject *__pyx_r = 0;
   21007             :   __Pyx_RefNannyDeclarations
   21008          98 :   __Pyx_RefNannySetupContext("_preprocess_xi (wrapper)", 0);
   21009             :   #if !CYTHON_METH_FASTCALL
   21010             :   #if CYTHON_ASSUME_SAFE_MACROS
   21011             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
   21012             :   #else
   21013             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
   21014             :   #endif
   21015             :   #endif
   21016          98 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
   21017          98 :   __pyx_v_args = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 1, __pyx_nargs);
   21018          98 :   if (unlikely(!__pyx_v_args)) {
   21019             :     __Pyx_RefNannyFinishContext();
   21020             :     return NULL;
   21021             :   }
   21022          98 :   __Pyx_GOTREF(__pyx_v_args);
   21023             :   {
   21024          98 :     PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
   21025          98 :     if (__pyx_kwds) {
   21026           0 :       Py_ssize_t kw_args;
   21027           0 :       switch (__pyx_nargs) {
   21028           0 :         default:
   21029           0 :         case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
   21030           0 :         CYTHON_FALLTHROUGH;
   21031           0 :         case  0: break;
   21032             :       }
   21033           0 :       kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
   21034           0 :       switch (__pyx_nargs) {
   21035             :         case  0:
   21036           0 :         if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
   21037           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
   21038           0 :           kw_args--;
   21039             :         }
   21040           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 142, __pyx_L3_error)
   21041           0 :         else goto __pyx_L5_argtuple_error;
   21042             :       }
   21043           0 :       if (unlikely(kw_args > 0)) {
   21044           0 :         const Py_ssize_t kwd_pos_args = __pyx_nargs;
   21045           0 :         const Py_ssize_t used_pos_args = (kwd_pos_args < 1) ? kwd_pos_args : 1;
   21046           0 :         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, used_pos_args, "_preprocess_xi") < 0)) __PYX_ERR(0, 142, __pyx_L3_error)
   21047             :       }
   21048          98 :     } else if (unlikely(__pyx_nargs < 1)) {
   21049           0 :       goto __pyx_L5_argtuple_error;
   21050             :     } else {
   21051          98 :       values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
   21052             :     }
   21053          98 :     __pyx_v_self = values[0];
   21054             :   }
   21055          98 :   goto __pyx_L6_skip;
   21056           0 :   __pyx_L5_argtuple_error:;
   21057           0 :   __Pyx_RaiseArgtupleInvalid("_preprocess_xi", 0, 1, 1, __pyx_nargs); __PYX_ERR(0, 142, __pyx_L3_error)
   21058          98 :   __pyx_L6_skip:;
   21059          98 :   goto __pyx_L4_argument_unpacking_done;
   21060           0 :   __pyx_L3_error:;
   21061             :   {
   21062           0 :     Py_ssize_t __pyx_temp;
   21063           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   21064             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
   21065             :     }
   21066             :   }
   21067           0 :   __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
   21068           0 :   __Pyx_AddTraceback("scipy.interpolate._interpnd.NDInterpolatorBase._preprocess_xi", __pyx_clineno, __pyx_lineno, __pyx_filename);
   21069           0 :   __Pyx_RefNannyFinishContext();
   21070           0 :   return NULL;
   21071          98 :   __pyx_L4_argument_unpacking_done:;
   21072          98 :   __pyx_r = __pyx_pf_5scipy_11interpolate_9_interpnd_18NDInterpolatorBase_10_preprocess_xi(__pyx_self, __pyx_v_self, __pyx_v_args);
   21073             : 
   21074             :   /* function exit code */
   21075          98 :   __Pyx_DECREF(__pyx_v_args);
   21076             :   {
   21077          98 :     Py_ssize_t __pyx_temp;
   21078          98 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   21079             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
   21080             :     }
   21081             :   }
   21082             :   __Pyx_RefNannyFinishContext();
   21083             :   return __pyx_r;
   21084             : }
   21085             : 
   21086          98 : static PyObject *__pyx_pf_5scipy_11interpolate_9_interpnd_18NDInterpolatorBase_10_preprocess_xi(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args) {
   21087          98 :   PyObject *__pyx_v_xi = NULL;
   21088          98 :   PyObject *__pyx_v_interpolation_points_shape = NULL;
   21089          98 :   PyObject *__pyx_r = NULL;
   21090             :   __Pyx_RefNannyDeclarations
   21091          98 :   PyObject *__pyx_t_1 = NULL;
   21092          98 :   PyObject *__pyx_t_2 = NULL;
   21093          98 :   struct __pyx_opt_args_5scipy_11interpolate_9_interpnd__ndim_coords_from_arrays __pyx_t_3;
   21094          98 :   PyObject *__pyx_t_4 = NULL;
   21095          98 :   unsigned int __pyx_t_5;
   21096          98 :   PyObject *__pyx_t_6 = NULL;
   21097          98 :   PyObject *__pyx_t_7 = NULL;
   21098          98 :   int __pyx_lineno = 0;
   21099          98 :   const char *__pyx_filename = NULL;
   21100          98 :   int __pyx_clineno = 0;
   21101          98 :   __Pyx_RefNannySetupContext("_preprocess_xi", 1);
   21102             : 
   21103             :   /* "scipy/interpolate/_interpnd.pyx":143
   21104             :  * 
   21105             :  *     def _preprocess_xi(self, *args):
   21106             :  *         xi = _ndim_coords_from_arrays(args, ndim=self.points.shape[1])             # <<<<<<<<<<<<<<
   21107             :  *         xi = self._check_call_shape(xi)
   21108             :  *         interpolation_points_shape = xi.shape
   21109             :  */
   21110          98 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_points); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 143, __pyx_L1_error)
   21111          98 :   __Pyx_GOTREF(__pyx_t_1);
   21112          98 :   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 143, __pyx_L1_error)
   21113          98 :   __Pyx_GOTREF(__pyx_t_2);
   21114          98 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   21115          98 :   __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 143, __pyx_L1_error)
   21116          98 :   __Pyx_GOTREF(__pyx_t_1);
   21117          98 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   21118          98 :   __pyx_t_3.__pyx_n = 1;
   21119          98 :   __pyx_t_3.ndim = __pyx_t_1;
   21120          98 :   __pyx_t_2 = __pyx_f_5scipy_11interpolate_9_interpnd__ndim_coords_from_arrays(__pyx_v_args, 0, &__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 143, __pyx_L1_error)
   21121          94 :   __Pyx_GOTREF(__pyx_t_2);
   21122          94 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   21123          94 :   __pyx_v_xi = __pyx_t_2;
   21124          94 :   __pyx_t_2 = 0;
   21125             : 
   21126             :   /* "scipy/interpolate/_interpnd.pyx":144
   21127             :  *     def _preprocess_xi(self, *args):
   21128             :  *         xi = _ndim_coords_from_arrays(args, ndim=self.points.shape[1])
   21129             :  *         xi = self._check_call_shape(xi)             # <<<<<<<<<<<<<<
   21130             :  *         interpolation_points_shape = xi.shape
   21131             :  *         xi = xi.reshape(-1, xi.shape[-1])
   21132             :  */
   21133          94 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_check_call_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 144, __pyx_L1_error)
   21134          94 :   __Pyx_GOTREF(__pyx_t_1);
   21135          94 :   __pyx_t_4 = NULL;
   21136          94 :   __pyx_t_5 = 0;
   21137             :   #if CYTHON_UNPACK_METHODS
   21138          94 :   if (likely(PyMethod_Check(__pyx_t_1))) {
   21139          94 :     __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
   21140          94 :     if (likely(__pyx_t_4)) {
   21141          94 :       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
   21142          94 :       __Pyx_INCREF(__pyx_t_4);
   21143          94 :       __Pyx_INCREF(function);
   21144          94 :       __Pyx_DECREF_SET(__pyx_t_1, function);
   21145             :       __pyx_t_5 = 1;
   21146             :     }
   21147             :   }
   21148             :   #endif
   21149             :   {
   21150          94 :     PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_xi};
   21151          94 :     __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
   21152          94 :     __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
   21153          94 :     if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 144, __pyx_L1_error)
   21154          94 :     __Pyx_GOTREF(__pyx_t_2);
   21155          94 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   21156             :   }
   21157          94 :   __Pyx_DECREF_SET(__pyx_v_xi, __pyx_t_2);
   21158          94 :   __pyx_t_2 = 0;
   21159             : 
   21160             :   /* "scipy/interpolate/_interpnd.pyx":145
   21161             :  *         xi = _ndim_coords_from_arrays(args, ndim=self.points.shape[1])
   21162             :  *         xi = self._check_call_shape(xi)
   21163             :  *         interpolation_points_shape = xi.shape             # <<<<<<<<<<<<<<
   21164             :  *         xi = xi.reshape(-1, xi.shape[-1])
   21165             :  *         xi = np.ascontiguousarray(xi, dtype=np.float64)
   21166             :  */
   21167          94 :   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_xi, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 145, __pyx_L1_error)
   21168          94 :   __Pyx_GOTREF(__pyx_t_2);
   21169          94 :   __pyx_v_interpolation_points_shape = __pyx_t_2;
   21170          94 :   __pyx_t_2 = 0;
   21171             : 
   21172             :   /* "scipy/interpolate/_interpnd.pyx":146
   21173             :  *         xi = self._check_call_shape(xi)
   21174             :  *         interpolation_points_shape = xi.shape
   21175             :  *         xi = xi.reshape(-1, xi.shape[-1])             # <<<<<<<<<<<<<<
   21176             :  *         xi = np.ascontiguousarray(xi, dtype=np.float64)
   21177             :  *         return self._scale_x(xi), interpolation_points_shape
   21178             :  */
   21179          94 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_xi, __pyx_n_s_reshape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 146, __pyx_L1_error)
   21180          94 :   __Pyx_GOTREF(__pyx_t_1);
   21181          94 :   __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_xi, __pyx_n_s_shape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 146, __pyx_L1_error)
   21182          94 :   __Pyx_GOTREF(__pyx_t_4);
   21183          94 :   __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_4, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 146, __pyx_L1_error)
   21184          94 :   __Pyx_GOTREF(__pyx_t_6);
   21185          94 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   21186          94 :   __pyx_t_4 = NULL;
   21187          94 :   __pyx_t_5 = 0;
   21188             :   #if CYTHON_UNPACK_METHODS
   21189          94 :   if (likely(PyMethod_Check(__pyx_t_1))) {
   21190           0 :     __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
   21191           0 :     if (likely(__pyx_t_4)) {
   21192           0 :       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
   21193           0 :       __Pyx_INCREF(__pyx_t_4);
   21194           0 :       __Pyx_INCREF(function);
   21195           0 :       __Pyx_DECREF_SET(__pyx_t_1, function);
   21196             :       __pyx_t_5 = 1;
   21197             :     }
   21198             :   }
   21199             :   #endif
   21200             :   {
   21201          94 :     PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_int_neg_1, __pyx_t_6};
   21202          94 :     __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
   21203          94 :     __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
   21204          94 :     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
   21205          94 :     if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 146, __pyx_L1_error)
   21206          94 :     __Pyx_GOTREF(__pyx_t_2);
   21207          94 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   21208             :   }
   21209          94 :   __Pyx_DECREF_SET(__pyx_v_xi, __pyx_t_2);
   21210          94 :   __pyx_t_2 = 0;
   21211             : 
   21212             :   /* "scipy/interpolate/_interpnd.pyx":147
   21213             :  *         interpolation_points_shape = xi.shape
   21214             :  *         xi = xi.reshape(-1, xi.shape[-1])
   21215             :  *         xi = np.ascontiguousarray(xi, dtype=np.float64)             # <<<<<<<<<<<<<<
   21216             :  *         return self._scale_x(xi), interpolation_points_shape
   21217             :  * 
   21218             :  */
   21219          94 :   __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 147, __pyx_L1_error)
   21220          94 :   __Pyx_GOTREF(__pyx_t_2);
   21221          94 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ascontiguousarray); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 147, __pyx_L1_error)
   21222          94 :   __Pyx_GOTREF(__pyx_t_1);
   21223          94 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   21224          94 :   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 147, __pyx_L1_error)
   21225          94 :   __Pyx_GOTREF(__pyx_t_2);
   21226          94 :   __Pyx_INCREF(__pyx_v_xi);
   21227          94 :   __Pyx_GIVEREF(__pyx_v_xi);
   21228          94 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_xi)) __PYX_ERR(0, 147, __pyx_L1_error);
   21229          94 :   __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 147, __pyx_L1_error)
   21230          94 :   __Pyx_GOTREF(__pyx_t_6);
   21231          94 :   __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 147, __pyx_L1_error)
   21232          94 :   __Pyx_GOTREF(__pyx_t_4);
   21233          94 :   __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_float64); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 147, __pyx_L1_error)
   21234          94 :   __Pyx_GOTREF(__pyx_t_7);
   21235          94 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   21236          94 :   if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_7) < 0) __PYX_ERR(0, 147, __pyx_L1_error)
   21237          94 :   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   21238          94 :   __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 147, __pyx_L1_error)
   21239          94 :   __Pyx_GOTREF(__pyx_t_7);
   21240          94 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   21241          94 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   21242          94 :   __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
   21243          94 :   __Pyx_DECREF_SET(__pyx_v_xi, __pyx_t_7);
   21244          94 :   __pyx_t_7 = 0;
   21245             : 
   21246             :   /* "scipy/interpolate/_interpnd.pyx":148
   21247             :  *         xi = xi.reshape(-1, xi.shape[-1])
   21248             :  *         xi = np.ascontiguousarray(xi, dtype=np.float64)
   21249             :  *         return self._scale_x(xi), interpolation_points_shape             # <<<<<<<<<<<<<<
   21250             :  * 
   21251             :  *     def __call__(self, *args):
   21252             :  */
   21253          94 :   __Pyx_XDECREF(__pyx_r);
   21254          94 :   __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_scale_x); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 148, __pyx_L1_error)
   21255          94 :   __Pyx_GOTREF(__pyx_t_6);
   21256          94 :   __pyx_t_2 = NULL;
   21257          94 :   __pyx_t_5 = 0;
   21258             :   #if CYTHON_UNPACK_METHODS
   21259          94 :   if (likely(PyMethod_Check(__pyx_t_6))) {
   21260          94 :     __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
   21261          94 :     if (likely(__pyx_t_2)) {
   21262          94 :       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
   21263          94 :       __Pyx_INCREF(__pyx_t_2);
   21264          94 :       __Pyx_INCREF(function);
   21265          94 :       __Pyx_DECREF_SET(__pyx_t_6, function);
   21266             :       __pyx_t_5 = 1;
   21267             :     }
   21268             :   }
   21269             :   #endif
   21270             :   {
   21271          94 :     PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_xi};
   21272          94 :     __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
   21273          94 :     __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
   21274          94 :     if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 148, __pyx_L1_error)
   21275          94 :     __Pyx_GOTREF(__pyx_t_7);
   21276          94 :     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
   21277             :   }
   21278          94 :   __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 148, __pyx_L1_error)
   21279          94 :   __Pyx_GOTREF(__pyx_t_6);
   21280          94 :   __Pyx_GIVEREF(__pyx_t_7);
   21281          94 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7)) __PYX_ERR(0, 148, __pyx_L1_error);
   21282          94 :   __Pyx_INCREF(__pyx_v_interpolation_points_shape);
   21283          94 :   __Pyx_GIVEREF(__pyx_v_interpolation_points_shape);
   21284          94 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_interpolation_points_shape)) __PYX_ERR(0, 148, __pyx_L1_error);
   21285          94 :   __pyx_t_7 = 0;
   21286          94 :   __pyx_r = __pyx_t_6;
   21287          94 :   __pyx_t_6 = 0;
   21288          94 :   goto __pyx_L0;
   21289             : 
   21290             :   /* "scipy/interpolate/_interpnd.pyx":142
   21291             :  *             return (xi - self.offset) / self.scale
   21292             :  * 
   21293             :  *     def _preprocess_xi(self, *args):             # <<<<<<<<<<<<<<
   21294             :  *         xi = _ndim_coords_from_arrays(args, ndim=self.points.shape[1])
   21295             :  *         xi = self._check_call_shape(xi)
   21296             :  */
   21297             : 
   21298             :   /* function exit code */
   21299           4 :   __pyx_L1_error:;
   21300           4 :   __Pyx_XDECREF(__pyx_t_1);
   21301           4 :   __Pyx_XDECREF(__pyx_t_2);
   21302           4 :   __Pyx_XDECREF(__pyx_t_4);
   21303           4 :   __Pyx_XDECREF(__pyx_t_6);
   21304           4 :   __Pyx_XDECREF(__pyx_t_7);
   21305           4 :   __Pyx_AddTraceback("scipy.interpolate._interpnd.NDInterpolatorBase._preprocess_xi", __pyx_clineno, __pyx_lineno, __pyx_filename);
   21306           4 :   __pyx_r = NULL;
   21307          98 :   __pyx_L0:;
   21308          98 :   __Pyx_XDECREF(__pyx_v_xi);
   21309          98 :   __Pyx_XDECREF(__pyx_v_interpolation_points_shape);
   21310          98 :   __Pyx_XGIVEREF(__pyx_r);
   21311          98 :   __Pyx_RefNannyFinishContext();
   21312          98 :   return __pyx_r;
   21313             : }
   21314             : 
   21315             : /* "scipy/interpolate/_interpnd.pyx":150
   21316             :  *         return self._scale_x(xi), interpolation_points_shape
   21317             :  * 
   21318             :  *     def __call__(self, *args):             # <<<<<<<<<<<<<<
   21319             :  *         """
   21320             :  *         interpolator(xi)
   21321             :  */
   21322             : 
   21323             : /* Python wrapper */
   21324             : static PyObject *__pyx_pw_5scipy_11interpolate_9_interpnd_18NDInterpolatorBase_13__call__(PyObject *__pyx_self, 
   21325             : #if CYTHON_METH_FASTCALL
   21326             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   21327             : #else
   21328             : PyObject *__pyx_args, PyObject *__pyx_kwds
   21329             : #endif
   21330             : ); /*proto*/
   21331             : PyDoc_STRVAR(__pyx_doc_5scipy_11interpolate_9_interpnd_18NDInterpolatorBase_12__call__, "\n        interpolator(xi)\n\n        Evaluate interpolator at given points.\n\n        Parameters\n        ----------\n        x1, x2, ... xn: array-like of float\n            Points where to interpolate data at.\n            x1, x2, ... xn can be array-like of float with broadcastable shape.\n            or x1 can be array-like of float with shape ``(..., ndim)``\n        ");
   21332             : static PyMethodDef __pyx_mdef_5scipy_11interpolate_9_interpnd_18NDInterpolatorBase_13__call__ = {"__call__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5scipy_11interpolate_9_interpnd_18NDInterpolatorBase_13__call__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5scipy_11interpolate_9_interpnd_18NDInterpolatorBase_12__call__};
   21333          98 : static PyObject *__pyx_pw_5scipy_11interpolate_9_interpnd_18NDInterpolatorBase_13__call__(PyObject *__pyx_self, 
   21334             : #if CYTHON_METH_FASTCALL
   21335             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   21336             : #else
   21337             : PyObject *__pyx_args, PyObject *__pyx_kwds
   21338             : #endif
   21339             : ) {
   21340          98 :   PyObject *__pyx_v_self = 0;
   21341          98 :   PyObject *__pyx_v_args = 0;
   21342             :   #if !CYTHON_METH_FASTCALL
   21343             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
   21344             :   #endif
   21345          98 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   21346          98 :   PyObject* values[1] = {0};
   21347          98 :   int __pyx_lineno = 0;
   21348          98 :   const char *__pyx_filename = NULL;
   21349          98 :   int __pyx_clineno = 0;
   21350          98 :   PyObject *__pyx_r = 0;
   21351             :   __Pyx_RefNannyDeclarations
   21352          98 :   __Pyx_RefNannySetupContext("__call__ (wrapper)", 0);
   21353             :   #if !CYTHON_METH_FASTCALL
   21354             :   #if CYTHON_ASSUME_SAFE_MACROS
   21355             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
   21356             :   #else
   21357             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
   21358             :   #endif
   21359             :   #endif
   21360          98 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
   21361          98 :   __pyx_v_args = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 1, __pyx_nargs);
   21362          98 :   if (unlikely(!__pyx_v_args)) {
   21363             :     __Pyx_RefNannyFinishContext();
   21364             :     return NULL;
   21365             :   }
   21366          98 :   __Pyx_GOTREF(__pyx_v_args);
   21367             :   {
   21368          98 :     PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
   21369          98 :     if (__pyx_kwds) {
   21370           0 :       Py_ssize_t kw_args;
   21371           0 :       switch (__pyx_nargs) {
   21372           0 :         default:
   21373           0 :         case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
   21374           0 :         CYTHON_FALLTHROUGH;
   21375           0 :         case  0: break;
   21376             :       }
   21377           0 :       kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
   21378           0 :       switch (__pyx_nargs) {
   21379             :         case  0:
   21380           0 :         if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
   21381           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
   21382           0 :           kw_args--;
   21383             :         }
   21384           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 150, __pyx_L3_error)
   21385           0 :         else goto __pyx_L5_argtuple_error;
   21386             :       }
   21387           0 :       if (unlikely(kw_args > 0)) {
   21388           0 :         const Py_ssize_t kwd_pos_args = __pyx_nargs;
   21389           0 :         const Py_ssize_t used_pos_args = (kwd_pos_args < 1) ? kwd_pos_args : 1;
   21390           0 :         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, used_pos_args, "__call__") < 0)) __PYX_ERR(0, 150, __pyx_L3_error)
   21391             :       }
   21392          98 :     } else if (unlikely(__pyx_nargs < 1)) {
   21393           0 :       goto __pyx_L5_argtuple_error;
   21394             :     } else {
   21395          98 :       values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
   21396             :     }
   21397          98 :     __pyx_v_self = values[0];
   21398             :   }
   21399          98 :   goto __pyx_L6_skip;
   21400           0 :   __pyx_L5_argtuple_error:;
   21401           0 :   __Pyx_RaiseArgtupleInvalid("__call__", 0, 1, 1, __pyx_nargs); __PYX_ERR(0, 150, __pyx_L3_error)
   21402          98 :   __pyx_L6_skip:;
   21403          98 :   goto __pyx_L4_argument_unpacking_done;
   21404           0 :   __pyx_L3_error:;
   21405             :   {
   21406           0 :     Py_ssize_t __pyx_temp;
   21407           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   21408             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
   21409             :     }
   21410             :   }
   21411           0 :   __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
   21412           0 :   __Pyx_AddTraceback("scipy.interpolate._interpnd.NDInterpolatorBase.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   21413           0 :   __Pyx_RefNannyFinishContext();
   21414           0 :   return NULL;
   21415          98 :   __pyx_L4_argument_unpacking_done:;
   21416          98 :   __pyx_r = __pyx_pf_5scipy_11interpolate_9_interpnd_18NDInterpolatorBase_12__call__(__pyx_self, __pyx_v_self, __pyx_v_args);
   21417             : 
   21418             :   /* function exit code */
   21419          98 :   __Pyx_DECREF(__pyx_v_args);
   21420             :   {
   21421          98 :     Py_ssize_t __pyx_temp;
   21422          98 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   21423             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
   21424             :     }
   21425             :   }
   21426             :   __Pyx_RefNannyFinishContext();
   21427             :   return __pyx_r;
   21428             : }
   21429             : 
   21430          98 : static PyObject *__pyx_pf_5scipy_11interpolate_9_interpnd_18NDInterpolatorBase_12__call__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args) {
   21431          98 :   PyObject *__pyx_v_xi = NULL;
   21432          98 :   PyObject *__pyx_v_interpolation_points_shape = NULL;
   21433          98 :   PyObject *__pyx_v_r = NULL;
   21434          98 :   PyObject *__pyx_r = NULL;
   21435             :   __Pyx_RefNannyDeclarations
   21436          98 :   PyObject *__pyx_t_1 = NULL;
   21437          98 :   PyObject *__pyx_t_2 = NULL;
   21438          98 :   PyObject *__pyx_t_3 = NULL;
   21439          98 :   PyObject *__pyx_t_4 = NULL;
   21440          98 :   PyObject *(*__pyx_t_5)(PyObject *);
   21441          98 :   int __pyx_t_6;
   21442          98 :   unsigned int __pyx_t_7;
   21443          98 :   PyObject *__pyx_t_8 = NULL;
   21444          98 :   int __pyx_lineno = 0;
   21445          98 :   const char *__pyx_filename = NULL;
   21446          98 :   int __pyx_clineno = 0;
   21447          98 :   __Pyx_RefNannySetupContext("__call__", 1);
   21448             : 
   21449             :   /* "scipy/interpolate/_interpnd.pyx":163
   21450             :  *             or x1 can be array-like of float with shape ``(..., ndim)``
   21451             :  *         """
   21452             :  *         xi, interpolation_points_shape = self._preprocess_xi(*args)             # <<<<<<<<<<<<<<
   21453             :  * 
   21454             :  *         if self.is_complex:
   21455             :  */
   21456          98 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_preprocess_xi); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 163, __pyx_L1_error)
   21457          98 :   __Pyx_GOTREF(__pyx_t_1);
   21458          98 :   __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 163, __pyx_L1_error)
   21459          94 :   __Pyx_GOTREF(__pyx_t_2);
   21460          94 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   21461          94 :   if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
   21462          94 :     PyObject* sequence = __pyx_t_2;
   21463          94 :     Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
   21464          94 :     if (unlikely(size != 2)) {
   21465           0 :       if (size > 2) __Pyx_RaiseTooManyValuesError(2);
   21466           0 :       else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
   21467           0 :       __PYX_ERR(0, 163, __pyx_L1_error)
   21468             :     }
   21469             :     #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
   21470          94 :     if (likely(PyTuple_CheckExact(sequence))) {
   21471          94 :       __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
   21472          94 :       __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
   21473             :     } else {
   21474           0 :       __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
   21475           0 :       __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
   21476             :     }
   21477          94 :     __Pyx_INCREF(__pyx_t_1);
   21478          94 :     __Pyx_INCREF(__pyx_t_3);
   21479             :     #else
   21480             :     __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 163, __pyx_L1_error)
   21481             :     __Pyx_GOTREF(__pyx_t_1);
   21482             :     __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 163, __pyx_L1_error)
   21483             :     __Pyx_GOTREF(__pyx_t_3);
   21484             :     #endif
   21485          94 :     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   21486             :   } else {
   21487           0 :     Py_ssize_t index = -1;
   21488           0 :     __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 163, __pyx_L1_error)
   21489           0 :     __Pyx_GOTREF(__pyx_t_4);
   21490           0 :     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   21491           0 :     __pyx_t_5 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4);
   21492           0 :     index = 0; __pyx_t_1 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_1)) goto __pyx_L3_unpacking_failed;
   21493           0 :     __Pyx_GOTREF(__pyx_t_1);
   21494           0 :     index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
   21495           0 :     __Pyx_GOTREF(__pyx_t_3);
   21496           0 :     if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) __PYX_ERR(0, 163, __pyx_L1_error)
   21497           0 :     __pyx_t_5 = NULL;
   21498           0 :     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   21499           0 :     goto __pyx_L4_unpacking_done;
   21500           0 :     __pyx_L3_unpacking_failed:;
   21501           0 :     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   21502           0 :     __pyx_t_5 = NULL;
   21503           0 :     if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
   21504           0 :     __PYX_ERR(0, 163, __pyx_L1_error)
   21505           0 :     __pyx_L4_unpacking_done:;
   21506             :   }
   21507          94 :   __pyx_v_xi = __pyx_t_1;
   21508          94 :   __pyx_t_1 = 0;
   21509          94 :   __pyx_v_interpolation_points_shape = __pyx_t_3;
   21510          94 :   __pyx_t_3 = 0;
   21511             : 
   21512             :   /* "scipy/interpolate/_interpnd.pyx":165
   21513             :  *         xi, interpolation_points_shape = self._preprocess_xi(*args)
   21514             :  * 
   21515             :  *         if self.is_complex:             # <<<<<<<<<<<<<<
   21516             :  *             r = self._evaluate_complex(xi)
   21517             :  *         else:
   21518             :  */
   21519          94 :   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_is_complex); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 165, __pyx_L1_error)
   21520          94 :   __Pyx_GOTREF(__pyx_t_2);
   21521          94 :   __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 165, __pyx_L1_error)
   21522          94 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   21523          94 :   if (__pyx_t_6) {
   21524             : 
   21525             :     /* "scipy/interpolate/_interpnd.pyx":166
   21526             :  * 
   21527             :  *         if self.is_complex:
   21528             :  *             r = self._evaluate_complex(xi)             # <<<<<<<<<<<<<<
   21529             :  *         else:
   21530             :  *             r = self._evaluate_double(xi)
   21531             :  */
   21532          19 :     __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_evaluate_complex); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 166, __pyx_L1_error)
   21533          19 :     __Pyx_GOTREF(__pyx_t_3);
   21534          19 :     __pyx_t_1 = NULL;
   21535          19 :     __pyx_t_7 = 0;
   21536             :     #if CYTHON_UNPACK_METHODS
   21537          19 :     if (likely(PyMethod_Check(__pyx_t_3))) {
   21538          19 :       __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
   21539          19 :       if (likely(__pyx_t_1)) {
   21540          19 :         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
   21541          19 :         __Pyx_INCREF(__pyx_t_1);
   21542          19 :         __Pyx_INCREF(function);
   21543          19 :         __Pyx_DECREF_SET(__pyx_t_3, function);
   21544             :         __pyx_t_7 = 1;
   21545             :       }
   21546             :     }
   21547             :     #endif
   21548             :     {
   21549          19 :       PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_xi};
   21550          19 :       __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
   21551          19 :       __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
   21552          19 :       if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 166, __pyx_L1_error)
   21553          19 :       __Pyx_GOTREF(__pyx_t_2);
   21554          19 :       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   21555             :     }
   21556          19 :     __pyx_v_r = __pyx_t_2;
   21557          19 :     __pyx_t_2 = 0;
   21558             : 
   21559             :     /* "scipy/interpolate/_interpnd.pyx":165
   21560             :  *         xi, interpolation_points_shape = self._preprocess_xi(*args)
   21561             :  * 
   21562             :  *         if self.is_complex:             # <<<<<<<<<<<<<<
   21563             :  *             r = self._evaluate_complex(xi)
   21564             :  *         else:
   21565             :  */
   21566          19 :     goto __pyx_L5;
   21567             :   }
   21568             : 
   21569             :   /* "scipy/interpolate/_interpnd.pyx":168
   21570             :  *             r = self._evaluate_complex(xi)
   21571             :  *         else:
   21572             :  *             r = self._evaluate_double(xi)             # <<<<<<<<<<<<<<
   21573             :  * 
   21574             :  *         return np.asarray(r).reshape(interpolation_points_shape[:-1] + self.values_shape)
   21575             :  */
   21576             :   /*else*/ {
   21577          75 :     __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_evaluate_double); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 168, __pyx_L1_error)
   21578          75 :     __Pyx_GOTREF(__pyx_t_3);
   21579          75 :     __pyx_t_1 = NULL;
   21580          75 :     __pyx_t_7 = 0;
   21581             :     #if CYTHON_UNPACK_METHODS
   21582          75 :     if (likely(PyMethod_Check(__pyx_t_3))) {
   21583          75 :       __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
   21584          75 :       if (likely(__pyx_t_1)) {
   21585          75 :         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
   21586          75 :         __Pyx_INCREF(__pyx_t_1);
   21587          75 :         __Pyx_INCREF(function);
   21588          75 :         __Pyx_DECREF_SET(__pyx_t_3, function);
   21589             :         __pyx_t_7 = 1;
   21590             :       }
   21591             :     }
   21592             :     #endif
   21593             :     {
   21594          75 :       PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_xi};
   21595          75 :       __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
   21596          75 :       __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
   21597          75 :       if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 168, __pyx_L1_error)
   21598          75 :       __Pyx_GOTREF(__pyx_t_2);
   21599          75 :       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   21600             :     }
   21601          75 :     __pyx_v_r = __pyx_t_2;
   21602          75 :     __pyx_t_2 = 0;
   21603             :   }
   21604          94 :   __pyx_L5:;
   21605             : 
   21606             :   /* "scipy/interpolate/_interpnd.pyx":170
   21607             :  *             r = self._evaluate_double(xi)
   21608             :  * 
   21609             :  *         return np.asarray(r).reshape(interpolation_points_shape[:-1] + self.values_shape)             # <<<<<<<<<<<<<<
   21610             :  * 
   21611             :  * 
   21612             :  */
   21613          94 :   __Pyx_XDECREF(__pyx_r);
   21614          94 :   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 170, __pyx_L1_error)
   21615          94 :   __Pyx_GOTREF(__pyx_t_1);
   21616          94 :   __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_asarray); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 170, __pyx_L1_error)
   21617          94 :   __Pyx_GOTREF(__pyx_t_4);
   21618          94 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   21619          94 :   __pyx_t_1 = NULL;
   21620          94 :   __pyx_t_7 = 0;
   21621             :   #if CYTHON_UNPACK_METHODS
   21622          94 :   if (unlikely(PyMethod_Check(__pyx_t_4))) {
   21623           0 :     __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
   21624           0 :     if (likely(__pyx_t_1)) {
   21625           0 :       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
   21626           0 :       __Pyx_INCREF(__pyx_t_1);
   21627           0 :       __Pyx_INCREF(function);
   21628           0 :       __Pyx_DECREF_SET(__pyx_t_4, function);
   21629             :       __pyx_t_7 = 1;
   21630             :     }
   21631             :   }
   21632             :   #endif
   21633             :   {
   21634          94 :     PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_r};
   21635          94 :     __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
   21636          94 :     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
   21637          94 :     if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 170, __pyx_L1_error)
   21638          94 :     __Pyx_GOTREF(__pyx_t_3);
   21639          94 :     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   21640             :   }
   21641          94 :   __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_reshape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 170, __pyx_L1_error)
   21642          94 :   __Pyx_GOTREF(__pyx_t_4);
   21643          94 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   21644          94 :   __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_interpolation_points_shape, 0, -1L, NULL, NULL, &__pyx_slice__13, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 170, __pyx_L1_error)
   21645          94 :   __Pyx_GOTREF(__pyx_t_3);
   21646          94 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_values_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 170, __pyx_L1_error)
   21647          94 :   __Pyx_GOTREF(__pyx_t_1);
   21648          94 :   __pyx_t_8 = PyNumber_Add(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 170, __pyx_L1_error)
   21649          94 :   __Pyx_GOTREF(__pyx_t_8);
   21650          94 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   21651          94 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   21652          94 :   __pyx_t_1 = NULL;
   21653          94 :   __pyx_t_7 = 0;
   21654             :   #if CYTHON_UNPACK_METHODS
   21655          94 :   if (likely(PyMethod_Check(__pyx_t_4))) {
   21656           0 :     __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
   21657           0 :     if (likely(__pyx_t_1)) {
   21658           0 :       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
   21659           0 :       __Pyx_INCREF(__pyx_t_1);
   21660           0 :       __Pyx_INCREF(function);
   21661           0 :       __Pyx_DECREF_SET(__pyx_t_4, function);
   21662             :       __pyx_t_7 = 1;
   21663             :     }
   21664             :   }
   21665             :   #endif
   21666             :   {
   21667          94 :     PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_8};
   21668          94 :     __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
   21669          94 :     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
   21670          94 :     __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   21671          94 :     if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 170, __pyx_L1_error)
   21672          94 :     __Pyx_GOTREF(__pyx_t_2);
   21673          94 :     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   21674             :   }
   21675          94 :   __pyx_r = __pyx_t_2;
   21676          94 :   __pyx_t_2 = 0;
   21677          94 :   goto __pyx_L0;
   21678             : 
   21679             :   /* "scipy/interpolate/_interpnd.pyx":150
   21680             :  *         return self._scale_x(xi), interpolation_points_shape
   21681             :  * 
   21682             :  *     def __call__(self, *args):             # <<<<<<<<<<<<<<
   21683             :  *         """
   21684             :  *         interpolator(xi)
   21685             :  */
   21686             : 
   21687             :   /* function exit code */
   21688           4 :   __pyx_L1_error:;
   21689           4 :   __Pyx_XDECREF(__pyx_t_1);
   21690           4 :   __Pyx_XDECREF(__pyx_t_2);
   21691           4 :   __Pyx_XDECREF(__pyx_t_3);
   21692           4 :   __Pyx_XDECREF(__pyx_t_4);
   21693           4 :   __Pyx_XDECREF(__pyx_t_8);
   21694           4 :   __Pyx_AddTraceback("scipy.interpolate._interpnd.NDInterpolatorBase.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   21695           4 :   __pyx_r = NULL;
   21696          98 :   __pyx_L0:;
   21697          98 :   __Pyx_XDECREF(__pyx_v_xi);
   21698          98 :   __Pyx_XDECREF(__pyx_v_interpolation_points_shape);
   21699          98 :   __Pyx_XDECREF(__pyx_v_r);
   21700          98 :   __Pyx_XGIVEREF(__pyx_r);
   21701          98 :   __Pyx_RefNannyFinishContext();
   21702          98 :   return __pyx_r;
   21703             : }
   21704             : 
   21705             : /* "scipy/interpolate/_interpnd.pyx":173
   21706             :  * 
   21707             :  * 
   21708             :  * cpdef _ndim_coords_from_arrays(points, ndim=None):             # <<<<<<<<<<<<<<
   21709             :  *     """
   21710             :  *     Convert a tuple of coordinate arrays to a (..., ndim)-shaped array.
   21711             :  */
   21712             : 
   21713             : static PyObject *__pyx_pw_5scipy_11interpolate_9_interpnd_1_ndim_coords_from_arrays(PyObject *__pyx_self, 
   21714             : #if CYTHON_METH_FASTCALL
   21715             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   21716             : #else
   21717             : PyObject *__pyx_args, PyObject *__pyx_kwds
   21718             : #endif
   21719             : ); /*proto*/
   21720        6155 : static PyObject *__pyx_f_5scipy_11interpolate_9_interpnd__ndim_coords_from_arrays(PyObject *__pyx_v_points, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_5scipy_11interpolate_9_interpnd__ndim_coords_from_arrays *__pyx_optional_args) {
   21721        6155 :   PyObject *__pyx_v_ndim = ((PyObject *)Py_None);
   21722        6155 :   Py_ssize_t __pyx_v_j;
   21723        6155 :   Py_ssize_t __pyx_v_n;
   21724        6155 :   PyObject *__pyx_v_p = NULL;
   21725        6155 :   PyObject *__pyx_v_item = NULL;
   21726        6155 :   PyObject *__pyx_r = NULL;
   21727             :   __Pyx_RefNannyDeclarations
   21728        6155 :   int __pyx_t_1;
   21729        6155 :   int __pyx_t_2;
   21730        6155 :   Py_ssize_t __pyx_t_3;
   21731        6155 :   PyObject *__pyx_t_4 = NULL;
   21732        6155 :   PyObject *__pyx_t_5 = NULL;
   21733        6155 :   PyObject *__pyx_t_6 = NULL;
   21734        6155 :   Py_ssize_t __pyx_t_7;
   21735        6155 :   Py_ssize_t __pyx_t_8;
   21736        6155 :   Py_ssize_t __pyx_t_9;
   21737        6155 :   PyObject *__pyx_t_10 = NULL;
   21738        6155 :   PyObject *(*__pyx_t_11)(PyObject *);
   21739        6155 :   unsigned int __pyx_t_12;
   21740        6155 :   int __pyx_lineno = 0;
   21741        6155 :   const char *__pyx_filename = NULL;
   21742        6155 :   int __pyx_clineno = 0;
   21743        6155 :   __Pyx_RefNannySetupContext("_ndim_coords_from_arrays", 0);
   21744        6155 :   if (__pyx_optional_args) {
   21745        6044 :     if (__pyx_optional_args->__pyx_n > 0) {
   21746        6044 :       __pyx_v_ndim = __pyx_optional_args->ndim;
   21747             :     }
   21748             :   }
   21749        6155 :   __Pyx_INCREF(__pyx_v_points);
   21750             : 
   21751             :   /* "scipy/interpolate/_interpnd.pyx":180
   21752             :  *     cdef ssize_t j, n
   21753             :  * 
   21754             :  *     if isinstance(points, tuple) and len(points) == 1:             # <<<<<<<<<<<<<<
   21755             :  *         # handle argument tuple
   21756             :  *         points = points[0]
   21757             :  */
   21758        6155 :   __pyx_t_2 = PyTuple_Check(__pyx_v_points); 
   21759        6155 :   if (__pyx_t_2) {
   21760        5158 :   } else {
   21761         997 :     __pyx_t_1 = __pyx_t_2;
   21762         997 :     goto __pyx_L4_bool_binop_done;
   21763             :   }
   21764        5158 :   __pyx_t_3 = PyObject_Length(__pyx_v_points); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 180, __pyx_L1_error)
   21765        5158 :   __pyx_t_2 = (__pyx_t_3 == 1);
   21766        5158 :   __pyx_t_1 = __pyx_t_2;
   21767        6155 :   __pyx_L4_bool_binop_done:;
   21768        6155 :   if (__pyx_t_1) {
   21769             : 
   21770             :     /* "scipy/interpolate/_interpnd.pyx":182
   21771             :  *     if isinstance(points, tuple) and len(points) == 1:
   21772             :  *         # handle argument tuple
   21773             :  *         points = points[0]             # <<<<<<<<<<<<<<
   21774             :  *     if isinstance(points, tuple):
   21775             :  *         p = np.broadcast_arrays(*points)
   21776             :  */
   21777         124 :     __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_points, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 182, __pyx_L1_error)
   21778         124 :     __Pyx_GOTREF(__pyx_t_4);
   21779         124 :     __Pyx_DECREF_SET(__pyx_v_points, __pyx_t_4);
   21780             :     __pyx_t_4 = 0;
   21781             : 
   21782             :     /* "scipy/interpolate/_interpnd.pyx":180
   21783             :  *     cdef ssize_t j, n
   21784             :  * 
   21785             :  *     if isinstance(points, tuple) and len(points) == 1:             # <<<<<<<<<<<<<<
   21786             :  *         # handle argument tuple
   21787             :  *         points = points[0]
   21788             :  */
   21789             :   }
   21790             : 
   21791             :   /* "scipy/interpolate/_interpnd.pyx":183
   21792             :  *         # handle argument tuple
   21793             :  *         points = points[0]
   21794             :  *     if isinstance(points, tuple):             # <<<<<<<<<<<<<<
   21795             :  *         p = np.broadcast_arrays(*points)
   21796             :  *         n = len(p)
   21797             :  */
   21798        6155 :   __pyx_t_1 = PyTuple_Check(__pyx_v_points); 
   21799        6155 :   if (__pyx_t_1) {
   21800             : 
   21801             :     /* "scipy/interpolate/_interpnd.pyx":184
   21802             :  *         points = points[0]
   21803             :  *     if isinstance(points, tuple):
   21804             :  *         p = np.broadcast_arrays(*points)             # <<<<<<<<<<<<<<
   21805             :  *         n = len(p)
   21806             :  *         for j in range(1, n):
   21807             :  */
   21808        5049 :     __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 184, __pyx_L1_error)
   21809        5049 :     __Pyx_GOTREF(__pyx_t_4);
   21810        5049 :     __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_broadcast_arrays); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 184, __pyx_L1_error)
   21811        5049 :     __Pyx_GOTREF(__pyx_t_5);
   21812        5049 :     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   21813       10098 :     __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_v_points); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 184, __pyx_L1_error)
   21814        5049 :     __Pyx_GOTREF(__pyx_t_4);
   21815        5049 :     __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 184, __pyx_L1_error)
   21816        5049 :     __Pyx_GOTREF(__pyx_t_6);
   21817        5049 :     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   21818        5049 :     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   21819        5049 :     __pyx_v_p = __pyx_t_6;
   21820        5049 :     __pyx_t_6 = 0;
   21821             : 
   21822             :     /* "scipy/interpolate/_interpnd.pyx":185
   21823             :  *     if isinstance(points, tuple):
   21824             :  *         p = np.broadcast_arrays(*points)
   21825             :  *         n = len(p)             # <<<<<<<<<<<<<<
   21826             :  *         for j in range(1, n):
   21827             :  *             if p[j].shape != p[0].shape:
   21828             :  */
   21829        5049 :     __pyx_t_3 = PyObject_Length(__pyx_v_p); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 185, __pyx_L1_error)
   21830             :     __pyx_v_n = __pyx_t_3;
   21831             : 
   21832             :     /* "scipy/interpolate/_interpnd.pyx":186
   21833             :  *         p = np.broadcast_arrays(*points)
   21834             :  *         n = len(p)
   21835             :  *         for j in range(1, n):             # <<<<<<<<<<<<<<
   21836             :  *             if p[j].shape != p[0].shape:
   21837             :  *                 raise ValueError("coordinate arrays do not have the same shape")
   21838             :  */
   21839       10127 :     __pyx_t_7 = __pyx_v_n;
   21840             :     __pyx_t_8 = __pyx_t_7;
   21841       10127 :     for (__pyx_t_9 = 1; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
   21842        5078 :       __pyx_v_j = __pyx_t_9;
   21843             : 
   21844             :       /* "scipy/interpolate/_interpnd.pyx":187
   21845             :  *         n = len(p)
   21846             :  *         for j in range(1, n):
   21847             :  *             if p[j].shape != p[0].shape:             # <<<<<<<<<<<<<<
   21848             :  *                 raise ValueError("coordinate arrays do not have the same shape")
   21849             :  *         points = np.empty(p[0].shape + (len(points),), dtype=float)
   21850             :  */
   21851        5078 :       __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_p, __pyx_v_j, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 187, __pyx_L1_error)
   21852        5078 :       __Pyx_GOTREF(__pyx_t_6);
   21853        5078 :       __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_shape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 187, __pyx_L1_error)
   21854        5078 :       __Pyx_GOTREF(__pyx_t_4);
   21855        5078 :       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
   21856        5078 :       __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_p, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 187, __pyx_L1_error)
   21857        5078 :       __Pyx_GOTREF(__pyx_t_6);
   21858        5078 :       __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_shape); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 187, __pyx_L1_error)
   21859        5078 :       __Pyx_GOTREF(__pyx_t_5);
   21860        5078 :       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
   21861        5078 :       __pyx_t_6 = PyObject_RichCompare(__pyx_t_4, __pyx_t_5, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 187, __pyx_L1_error)
   21862        5078 :       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   21863        5078 :       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   21864        5078 :       __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 187, __pyx_L1_error)
   21865        5078 :       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
   21866        5078 :       if (unlikely(__pyx_t_1)) {
   21867             : 
   21868             :         /* "scipy/interpolate/_interpnd.pyx":188
   21869             :  *         for j in range(1, n):
   21870             :  *             if p[j].shape != p[0].shape:
   21871             :  *                 raise ValueError("coordinate arrays do not have the same shape")             # <<<<<<<<<<<<<<
   21872             :  *         points = np.empty(p[0].shape + (len(points),), dtype=float)
   21873             :  *         for j, item in enumerate(p):
   21874             :  */
   21875           0 :         __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 188, __pyx_L1_error)
   21876           0 :         __Pyx_GOTREF(__pyx_t_6);
   21877           0 :         __Pyx_Raise(__pyx_t_6, 0, 0, 0);
   21878           0 :         __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
   21879           0 :         __PYX_ERR(0, 188, __pyx_L1_error)
   21880             : 
   21881             :         /* "scipy/interpolate/_interpnd.pyx":187
   21882             :  *         n = len(p)
   21883             :  *         for j in range(1, n):
   21884             :  *             if p[j].shape != p[0].shape:             # <<<<<<<<<<<<<<
   21885             :  *                 raise ValueError("coordinate arrays do not have the same shape")
   21886             :  *         points = np.empty(p[0].shape + (len(points),), dtype=float)
   21887             :  */
   21888             :       }
   21889             :     }
   21890             : 
   21891             :     /* "scipy/interpolate/_interpnd.pyx":189
   21892             :  *             if p[j].shape != p[0].shape:
   21893             :  *                 raise ValueError("coordinate arrays do not have the same shape")
   21894             :  *         points = np.empty(p[0].shape + (len(points),), dtype=float)             # <<<<<<<<<<<<<<
   21895             :  *         for j, item in enumerate(p):
   21896             :  *             points[...,j] = item
   21897             :  */
   21898        5049 :     __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 189, __pyx_L1_error)
   21899        5049 :     __Pyx_GOTREF(__pyx_t_6);
   21900        5049 :     __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 189, __pyx_L1_error)
   21901        5049 :     __Pyx_GOTREF(__pyx_t_5);
   21902        5049 :     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
   21903        5049 :     __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_p, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 189, __pyx_L1_error)
   21904        5049 :     __Pyx_GOTREF(__pyx_t_6);
   21905        5049 :     __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_shape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 189, __pyx_L1_error)
   21906        5049 :     __Pyx_GOTREF(__pyx_t_4);
   21907        5049 :     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
   21908        5049 :     __pyx_t_3 = PyObject_Length(__pyx_v_points); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 189, __pyx_L1_error)
   21909        5049 :     __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 189, __pyx_L1_error)
   21910        5049 :     __Pyx_GOTREF(__pyx_t_6);
   21911        5049 :     __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 189, __pyx_L1_error)
   21912        5049 :     __Pyx_GOTREF(__pyx_t_10);
   21913        5049 :     __Pyx_GIVEREF(__pyx_t_6);
   21914        5049 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_6)) __PYX_ERR(0, 189, __pyx_L1_error);
   21915        5049 :     __pyx_t_6 = 0;
   21916        5049 :     __pyx_t_6 = PyNumber_Add(__pyx_t_4, __pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 189, __pyx_L1_error)
   21917        5049 :     __Pyx_GOTREF(__pyx_t_6);
   21918        5049 :     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   21919        5049 :     __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
   21920        5049 :     __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 189, __pyx_L1_error)
   21921        5049 :     __Pyx_GOTREF(__pyx_t_10);
   21922        5049 :     __Pyx_GIVEREF(__pyx_t_6);
   21923        5049 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_6)) __PYX_ERR(0, 189, __pyx_L1_error);
   21924        5049 :     __pyx_t_6 = 0;
   21925        5049 :     __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 189, __pyx_L1_error)
   21926        5049 :     __Pyx_GOTREF(__pyx_t_6);
   21927        5049 :     if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 189, __pyx_L1_error)
   21928        5049 :     __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_10, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 189, __pyx_L1_error)
   21929        5049 :     __Pyx_GOTREF(__pyx_t_4);
   21930        5049 :     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   21931        5049 :     __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
   21932        5049 :     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
   21933        5049 :     __Pyx_DECREF_SET(__pyx_v_points, __pyx_t_4);
   21934        5049 :     __pyx_t_4 = 0;
   21935             : 
   21936             :     /* "scipy/interpolate/_interpnd.pyx":190
   21937             :  *                 raise ValueError("coordinate arrays do not have the same shape")
   21938             :  *         points = np.empty(p[0].shape + (len(points),), dtype=float)
   21939             :  *         for j, item in enumerate(p):             # <<<<<<<<<<<<<<
   21940             :  *             points[...,j] = item
   21941             :  *     else:
   21942             :  */
   21943        5049 :     __pyx_t_7 = 0;
   21944        5049 :     if (likely(PyList_CheckExact(__pyx_v_p)) || PyTuple_CheckExact(__pyx_v_p)) {
   21945        5049 :       __pyx_t_4 = __pyx_v_p; __Pyx_INCREF(__pyx_t_4);
   21946        5049 :       __pyx_t_3 = 0;
   21947        5049 :       __pyx_t_11 = NULL;
   21948             :     } else {
   21949           0 :       __pyx_t_3 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_p); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 190, __pyx_L1_error)
   21950           0 :       __Pyx_GOTREF(__pyx_t_4);
   21951           0 :       __pyx_t_11 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 190, __pyx_L1_error)
   21952             :     }
   21953       15176 :     for (;;) {
   21954       15176 :       if (likely(!__pyx_t_11)) {
   21955       15176 :         if (likely(PyList_CheckExact(__pyx_t_4))) {
   21956             :           {
   21957           0 :             Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_4);
   21958             :             #if !CYTHON_ASSUME_SAFE_MACROS
   21959             :             if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 190, __pyx_L1_error)
   21960             :             #endif
   21961           0 :             if (__pyx_t_3 >= __pyx_temp) break;
   21962             :           }
   21963             :           #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
   21964           0 :           __pyx_t_6 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_3); __Pyx_INCREF(__pyx_t_6); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(0, 190, __pyx_L1_error)
   21965             :           #else
   21966             :           __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 190, __pyx_L1_error)
   21967             :           __Pyx_GOTREF(__pyx_t_6);
   21968             :           #endif
   21969             :         } else {
   21970             :           {
   21971       15176 :             Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4);
   21972             :             #if !CYTHON_ASSUME_SAFE_MACROS
   21973             :             if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 190, __pyx_L1_error)
   21974             :             #endif
   21975       15176 :             if (__pyx_t_3 >= __pyx_temp) break;
   21976             :           }
   21977             :           #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
   21978       20254 :           __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_3); __Pyx_INCREF(__pyx_t_6); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(0, 190, __pyx_L1_error)
   21979             :           #else
   21980             :           __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 190, __pyx_L1_error)
   21981             :           __Pyx_GOTREF(__pyx_t_6);
   21982             :           #endif
   21983             :         }
   21984             :       } else {
   21985           0 :         __pyx_t_6 = __pyx_t_11(__pyx_t_4);
   21986           0 :         if (unlikely(!__pyx_t_6)) {
   21987           0 :           PyObject* exc_type = PyErr_Occurred();
   21988           0 :           if (exc_type) {
   21989           0 :             if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
   21990           0 :             else __PYX_ERR(0, 190, __pyx_L1_error)
   21991             :           }
   21992             :           break;
   21993             :         }
   21994       10127 :         __Pyx_GOTREF(__pyx_t_6);
   21995             :       }
   21996       10127 :       __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_6);
   21997       10127 :       __pyx_t_6 = 0;
   21998       10127 :       __pyx_v_j = __pyx_t_7;
   21999       10127 :       __pyx_t_7 = (__pyx_t_7 + 1);
   22000             : 
   22001             :       /* "scipy/interpolate/_interpnd.pyx":191
   22002             :  *         points = np.empty(p[0].shape + (len(points),), dtype=float)
   22003             :  *         for j, item in enumerate(p):
   22004             :  *             points[...,j] = item             # <<<<<<<<<<<<<<
   22005             :  *     else:
   22006             :  *         points = np.asanyarray(points)
   22007             :  */
   22008       10127 :       __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_j); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 191, __pyx_L1_error)
   22009       10127 :       __Pyx_GOTREF(__pyx_t_6);
   22010       10127 :       __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 191, __pyx_L1_error)
   22011       10127 :       __Pyx_GOTREF(__pyx_t_10);
   22012       10127 :       __Pyx_INCREF(Py_Ellipsis);
   22013       10127 :       __Pyx_GIVEREF(Py_Ellipsis);
   22014       10127 :       if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, Py_Ellipsis)) __PYX_ERR(0, 191, __pyx_L1_error);
   22015       10127 :       __Pyx_GIVEREF(__pyx_t_6);
   22016       10127 :       if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_6)) __PYX_ERR(0, 191, __pyx_L1_error);
   22017       10127 :       __pyx_t_6 = 0;
   22018       10127 :       if (unlikely((PyObject_SetItem(__pyx_v_points, __pyx_t_10, __pyx_v_item) < 0))) __PYX_ERR(0, 191, __pyx_L1_error)
   22019       25303 :       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
   22020             : 
   22021             :       /* "scipy/interpolate/_interpnd.pyx":190
   22022             :  *                 raise ValueError("coordinate arrays do not have the same shape")
   22023             :  *         points = np.empty(p[0].shape + (len(points),), dtype=float)
   22024             :  *         for j, item in enumerate(p):             # <<<<<<<<<<<<<<
   22025             :  *             points[...,j] = item
   22026             :  *     else:
   22027             :  */
   22028             :     }
   22029        5049 :     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   22030             : 
   22031             :     /* "scipy/interpolate/_interpnd.pyx":183
   22032             :  *         # handle argument tuple
   22033             :  *         points = points[0]
   22034             :  *     if isinstance(points, tuple):             # <<<<<<<<<<<<<<
   22035             :  *         p = np.broadcast_arrays(*points)
   22036             :  *         n = len(p)
   22037             :  */
   22038        5049 :     goto __pyx_L6;
   22039             :   }
   22040             : 
   22041             :   /* "scipy/interpolate/_interpnd.pyx":193
   22042             :  *             points[...,j] = item
   22043             :  *     else:
   22044             :  *         points = np.asanyarray(points)             # <<<<<<<<<<<<<<
   22045             :  *         if points.ndim == 1:
   22046             :  *             if ndim is None:
   22047             :  */
   22048             :   /*else*/ {
   22049        1106 :     __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_np); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 193, __pyx_L1_error)
   22050        1106 :     __Pyx_GOTREF(__pyx_t_10);
   22051        1106 :     __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_asanyarray); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 193, __pyx_L1_error)
   22052        1106 :     __Pyx_GOTREF(__pyx_t_6);
   22053        1106 :     __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
   22054        1106 :     __pyx_t_10 = NULL;
   22055        1106 :     __pyx_t_12 = 0;
   22056             :     #if CYTHON_UNPACK_METHODS
   22057        1106 :     if (unlikely(PyMethod_Check(__pyx_t_6))) {
   22058           0 :       __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_6);
   22059           0 :       if (likely(__pyx_t_10)) {
   22060           0 :         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
   22061           0 :         __Pyx_INCREF(__pyx_t_10);
   22062           0 :         __Pyx_INCREF(function);
   22063           0 :         __Pyx_DECREF_SET(__pyx_t_6, function);
   22064             :         __pyx_t_12 = 1;
   22065             :       }
   22066             :     }
   22067             :     #endif
   22068             :     {
   22069        1106 :       PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_v_points};
   22070        1106 :       __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
   22071        1106 :       __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
   22072        1106 :       if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 193, __pyx_L1_error)
   22073        1106 :       __Pyx_GOTREF(__pyx_t_4);
   22074        1106 :       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
   22075             :     }
   22076        1106 :     __Pyx_DECREF_SET(__pyx_v_points, __pyx_t_4);
   22077        1106 :     __pyx_t_4 = 0;
   22078             : 
   22079             :     /* "scipy/interpolate/_interpnd.pyx":194
   22080             :  *     else:
   22081             :  *         points = np.asanyarray(points)
   22082             :  *         if points.ndim == 1:             # <<<<<<<<<<<<<<
   22083             :  *             if ndim is None:
   22084             :  *                 points = points.reshape(-1, 1)
   22085             :  */
   22086        1106 :     __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_points, __pyx_n_s_ndim); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 194, __pyx_L1_error)
   22087        1106 :     __Pyx_GOTREF(__pyx_t_4);
   22088        1106 :     __pyx_t_1 = (__Pyx_PyInt_BoolEqObjC(__pyx_t_4, __pyx_int_1, 1, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 194, __pyx_L1_error)
   22089        1106 :     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   22090        1106 :     if (__pyx_t_1) {
   22091             : 
   22092             :       /* "scipy/interpolate/_interpnd.pyx":195
   22093             :  *         points = np.asanyarray(points)
   22094             :  *         if points.ndim == 1:
   22095             :  *             if ndim is None:             # <<<<<<<<<<<<<<
   22096             :  *                 points = points.reshape(-1, 1)
   22097             :  *             else:
   22098             :  */
   22099         244 :       __pyx_t_1 = (__pyx_v_ndim == Py_None);
   22100         244 :       if (__pyx_t_1) {
   22101             : 
   22102             :         /* "scipy/interpolate/_interpnd.pyx":196
   22103             :  *         if points.ndim == 1:
   22104             :  *             if ndim is None:
   22105             :  *                 points = points.reshape(-1, 1)             # <<<<<<<<<<<<<<
   22106             :  *             else:
   22107             :  *                 points = points.reshape(-1, ndim)
   22108             :  */
   22109          15 :         __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_points, __pyx_n_s_reshape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 196, __pyx_L1_error)
   22110          15 :         __Pyx_GOTREF(__pyx_t_4);
   22111          15 :         __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 196, __pyx_L1_error)
   22112          15 :         __Pyx_GOTREF(__pyx_t_6);
   22113          15 :         __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   22114          15 :         __Pyx_DECREF_SET(__pyx_v_points, __pyx_t_6);
   22115          15 :         __pyx_t_6 = 0;
   22116             : 
   22117             :         /* "scipy/interpolate/_interpnd.pyx":195
   22118             :  *         points = np.asanyarray(points)
   22119             :  *         if points.ndim == 1:
   22120             :  *             if ndim is None:             # <<<<<<<<<<<<<<
   22121             :  *                 points = points.reshape(-1, 1)
   22122             :  *             else:
   22123             :  */
   22124          15 :         goto __pyx_L14;
   22125             :       }
   22126             : 
   22127             :       /* "scipy/interpolate/_interpnd.pyx":198
   22128             :  *                 points = points.reshape(-1, 1)
   22129             :  *             else:
   22130             :  *                 points = points.reshape(-1, ndim)             # <<<<<<<<<<<<<<
   22131             :  *     return points
   22132             :  * 
   22133             :  */
   22134             :       /*else*/ {
   22135         229 :         __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_points, __pyx_n_s_reshape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 198, __pyx_L1_error)
   22136         229 :         __Pyx_GOTREF(__pyx_t_4);
   22137         229 :         __pyx_t_10 = NULL;
   22138         229 :         __pyx_t_12 = 0;
   22139             :         #if CYTHON_UNPACK_METHODS
   22140         229 :         if (likely(PyMethod_Check(__pyx_t_4))) {
   22141           0 :           __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_4);
   22142           0 :           if (likely(__pyx_t_10)) {
   22143           0 :             PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
   22144           0 :             __Pyx_INCREF(__pyx_t_10);
   22145           0 :             __Pyx_INCREF(function);
   22146           0 :             __Pyx_DECREF_SET(__pyx_t_4, function);
   22147             :             __pyx_t_12 = 1;
   22148             :           }
   22149             :         }
   22150             :         #endif
   22151             :         {
   22152         229 :           PyObject *__pyx_callargs[3] = {__pyx_t_10, __pyx_int_neg_1, __pyx_v_ndim};
   22153         229 :           __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_12, 2+__pyx_t_12);
   22154         229 :           __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
   22155         229 :           if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 198, __pyx_L1_error)
   22156         223 :           __Pyx_GOTREF(__pyx_t_6);
   22157         223 :           __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   22158             :         }
   22159         223 :         __Pyx_DECREF_SET(__pyx_v_points, __pyx_t_6);
   22160        6149 :         __pyx_t_6 = 0;
   22161             :       }
   22162        6149 :       __pyx_L14:;
   22163             : 
   22164             :       /* "scipy/interpolate/_interpnd.pyx":194
   22165             :  *     else:
   22166             :  *         points = np.asanyarray(points)
   22167             :  *         if points.ndim == 1:             # <<<<<<<<<<<<<<
   22168             :  *             if ndim is None:
   22169             :  *                 points = points.reshape(-1, 1)
   22170             :  */
   22171             :     }
   22172             :   }
   22173         862 :   __pyx_L6:;
   22174             : 
   22175             :   /* "scipy/interpolate/_interpnd.pyx":199
   22176             :  *             else:
   22177             :  *                 points = points.reshape(-1, ndim)
   22178             :  *     return points             # <<<<<<<<<<<<<<
   22179             :  * 
   22180             :  * 
   22181             :  */
   22182        6149 :   __Pyx_XDECREF(__pyx_r);
   22183        6149 :   __Pyx_INCREF(__pyx_v_points);
   22184        6149 :   __pyx_r = __pyx_v_points;
   22185        6149 :   goto __pyx_L0;
   22186             : 
   22187             :   /* "scipy/interpolate/_interpnd.pyx":173
   22188             :  * 
   22189             :  * 
   22190             :  * cpdef _ndim_coords_from_arrays(points, ndim=None):             # <<<<<<<<<<<<<<
   22191             :  *     """
   22192             :  *     Convert a tuple of coordinate arrays to a (..., ndim)-shaped array.
   22193             :  */
   22194             : 
   22195             :   /* function exit code */
   22196           6 :   __pyx_L1_error:;
   22197           6 :   __Pyx_XDECREF(__pyx_t_4);
   22198           6 :   __Pyx_XDECREF(__pyx_t_5);
   22199           6 :   __Pyx_XDECREF(__pyx_t_6);
   22200           6 :   __Pyx_XDECREF(__pyx_t_10);
   22201           6 :   __Pyx_AddTraceback("scipy.interpolate._interpnd._ndim_coords_from_arrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
   22202           6 :   __pyx_r = 0;
   22203        6155 :   __pyx_L0:;
   22204        6155 :   __Pyx_XDECREF(__pyx_v_p);
   22205        6155 :   __Pyx_XDECREF(__pyx_v_item);
   22206        6155 :   __Pyx_XDECREF(__pyx_v_points);
   22207        6155 :   __Pyx_XGIVEREF(__pyx_r);
   22208        6155 :   __Pyx_RefNannyFinishContext();
   22209        6155 :   return __pyx_r;
   22210             : }
   22211             : 
   22212             : /* Python wrapper */
   22213             : static PyObject *__pyx_pw_5scipy_11interpolate_9_interpnd_1_ndim_coords_from_arrays(PyObject *__pyx_self, 
   22214             : #if CYTHON_METH_FASTCALL
   22215             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   22216             : #else
   22217             : PyObject *__pyx_args, PyObject *__pyx_kwds
   22218             : #endif
   22219             : ); /*proto*/
   22220             : PyDoc_STRVAR(__pyx_doc_5scipy_11interpolate_9_interpnd__ndim_coords_from_arrays, "\n    Convert a tuple of coordinate arrays to a (..., ndim)-shaped array.\n\n    ");
   22221             : static PyMethodDef __pyx_mdef_5scipy_11interpolate_9_interpnd_1_ndim_coords_from_arrays = {"_ndim_coords_from_arrays", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5scipy_11interpolate_9_interpnd_1_ndim_coords_from_arrays, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5scipy_11interpolate_9_interpnd__ndim_coords_from_arrays};
   22222        5946 : static PyObject *__pyx_pw_5scipy_11interpolate_9_interpnd_1_ndim_coords_from_arrays(PyObject *__pyx_self, 
   22223             : #if CYTHON_METH_FASTCALL
   22224             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   22225             : #else
   22226             : PyObject *__pyx_args, PyObject *__pyx_kwds
   22227             : #endif
   22228             : ) {
   22229        5946 :   PyObject *__pyx_v_points = 0;
   22230        5946 :   PyObject *__pyx_v_ndim = 0;
   22231             :   #if !CYTHON_METH_FASTCALL
   22232             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
   22233             :   #endif
   22234        5946 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   22235        5946 :   PyObject* values[2] = {0,0};
   22236        5946 :   int __pyx_lineno = 0;
   22237        5946 :   const char *__pyx_filename = NULL;
   22238        5946 :   int __pyx_clineno = 0;
   22239        5946 :   PyObject *__pyx_r = 0;
   22240             :   __Pyx_RefNannyDeclarations
   22241        5946 :   __Pyx_RefNannySetupContext("_ndim_coords_from_arrays (wrapper)", 0);
   22242             :   #if !CYTHON_METH_FASTCALL
   22243             :   #if CYTHON_ASSUME_SAFE_MACROS
   22244             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
   22245             :   #else
   22246             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
   22247             :   #endif
   22248             :   #endif
   22249        5946 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
   22250             :   {
   22251        5946 :     PyObject **__pyx_pyargnames[] = {&__pyx_n_s_points,&__pyx_n_s_ndim,0};
   22252        5946 :     values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
   22253        5946 :     if (__pyx_kwds) {
   22254         891 :       Py_ssize_t kw_args;
   22255         891 :       switch (__pyx_nargs) {
   22256           0 :         case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
   22257         891 :         CYTHON_FALLTHROUGH;
   22258         891 :         case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
   22259         891 :         CYTHON_FALLTHROUGH;
   22260         891 :         case  0: break;
   22261           0 :         default: goto __pyx_L5_argtuple_error;
   22262             :       }
   22263         891 :       kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
   22264         891 :       switch (__pyx_nargs) {
   22265             :         case  0:
   22266           0 :         if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_points)) != 0)) {
   22267           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
   22268           0 :           kw_args--;
   22269             :         }
   22270           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 173, __pyx_L3_error)
   22271           0 :         else goto __pyx_L5_argtuple_error;
   22272         891 :         CYTHON_FALLTHROUGH;
   22273             :         case  1:
   22274         891 :         if (kw_args > 0) {
   22275         891 :           PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ndim);
   22276         891 :           if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
   22277           0 :           else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 173, __pyx_L3_error)
   22278             :         }
   22279             :       }
   22280         891 :       if (unlikely(kw_args > 0)) {
   22281           0 :         const Py_ssize_t kwd_pos_args = __pyx_nargs;
   22282           0 :         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_ndim_coords_from_arrays") < 0)) __PYX_ERR(0, 173, __pyx_L3_error)
   22283             :       }
   22284             :     } else {
   22285        5055 :       switch (__pyx_nargs) {
   22286           0 :         case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
   22287        5055 :         CYTHON_FALLTHROUGH;
   22288        5055 :         case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
   22289        5055 :         break;
   22290           0 :         default: goto __pyx_L5_argtuple_error;
   22291             :       }
   22292             :     }
   22293        5946 :     __pyx_v_points = values[0];
   22294        5946 :     __pyx_v_ndim = values[1];
   22295             :   }
   22296        5946 :   goto __pyx_L6_skip;
   22297           0 :   __pyx_L5_argtuple_error:;
   22298           0 :   __Pyx_RaiseArgtupleInvalid("_ndim_coords_from_arrays", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 173, __pyx_L3_error)
   22299        5946 :   __pyx_L6_skip:;
   22300        5946 :   goto __pyx_L4_argument_unpacking_done;
   22301           0 :   __pyx_L3_error:;
   22302             :   {
   22303           0 :     Py_ssize_t __pyx_temp;
   22304           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   22305             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
   22306             :     }
   22307             :   }
   22308           0 :   __Pyx_AddTraceback("scipy.interpolate._interpnd._ndim_coords_from_arrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
   22309           0 :   __Pyx_RefNannyFinishContext();
   22310           0 :   return NULL;
   22311        5946 :   __pyx_L4_argument_unpacking_done:;
   22312        5946 :   __pyx_r = __pyx_pf_5scipy_11interpolate_9_interpnd__ndim_coords_from_arrays(__pyx_self, __pyx_v_points, __pyx_v_ndim);
   22313             : 
   22314             :   /* function exit code */
   22315             :   {
   22316        5946 :     Py_ssize_t __pyx_temp;
   22317        5946 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   22318             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
   22319             :     }
   22320             :   }
   22321             :   __Pyx_RefNannyFinishContext();
   22322             :   return __pyx_r;
   22323             : }
   22324             : 
   22325        5946 : static PyObject *__pyx_pf_5scipy_11interpolate_9_interpnd__ndim_coords_from_arrays(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_points, PyObject *__pyx_v_ndim) {
   22326        5946 :   PyObject *__pyx_r = NULL;
   22327             :   __Pyx_RefNannyDeclarations
   22328        5946 :   PyObject *__pyx_t_1 = NULL;
   22329        5946 :   struct __pyx_opt_args_5scipy_11interpolate_9_interpnd__ndim_coords_from_arrays __pyx_t_2;
   22330        5946 :   int __pyx_lineno = 0;
   22331        5946 :   const char *__pyx_filename = NULL;
   22332        5946 :   int __pyx_clineno = 0;
   22333        5946 :   __Pyx_RefNannySetupContext("_ndim_coords_from_arrays", 1);
   22334        5946 :   __Pyx_XDECREF(__pyx_r);
   22335        5946 :   __pyx_t_2.__pyx_n = 1;
   22336        5946 :   __pyx_t_2.ndim = __pyx_v_ndim;
   22337        5946 :   __pyx_t_1 = __pyx_f_5scipy_11interpolate_9_interpnd__ndim_coords_from_arrays(__pyx_v_points, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 173, __pyx_L1_error)
   22338        5944 :   __Pyx_GOTREF(__pyx_t_1);
   22339        5944 :   __pyx_r = __pyx_t_1;
   22340        5944 :   __pyx_t_1 = 0;
   22341        5944 :   goto __pyx_L0;
   22342             : 
   22343             :   /* function exit code */
   22344           2 :   __pyx_L1_error:;
   22345           2 :   __Pyx_XDECREF(__pyx_t_1);
   22346           2 :   __Pyx_AddTraceback("scipy.interpolate._interpnd._ndim_coords_from_arrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
   22347           2 :   __pyx_r = NULL;
   22348        5946 :   __pyx_L0:;
   22349        5946 :   __Pyx_XGIVEREF(__pyx_r);
   22350        5946 :   __Pyx_RefNannyFinishContext();
   22351        5946 :   return __pyx_r;
   22352             : }
   22353             : 
   22354             : /* "scipy/interpolate/_interpnd.pyx":202
   22355             :  * 
   22356             :  * 
   22357             :  * cdef _check_init_shape(points, values, ndim=None):             # <<<<<<<<<<<<<<
   22358             :  *     """
   22359             :  *     Check shape of points and values arrays
   22360             :  */
   22361             : 
   22362         111 : static PyObject *__pyx_f_5scipy_11interpolate_9_interpnd__check_init_shape(PyObject *__pyx_v_points, PyObject *__pyx_v_values, struct __pyx_opt_args_5scipy_11interpolate_9_interpnd__check_init_shape *__pyx_optional_args) {
   22363         111 :   PyObject *__pyx_v_ndim = ((PyObject *)Py_None);
   22364         111 :   PyObject *__pyx_r = NULL;
   22365             :   __Pyx_RefNannyDeclarations
   22366         111 :   PyObject *__pyx_t_1 = NULL;
   22367         111 :   PyObject *__pyx_t_2 = NULL;
   22368         111 :   PyObject *__pyx_t_3 = NULL;
   22369         111 :   int __pyx_t_4;
   22370         111 :   int __pyx_t_5;
   22371         111 :   int __pyx_lineno = 0;
   22372         111 :   const char *__pyx_filename = NULL;
   22373         111 :   int __pyx_clineno = 0;
   22374         111 :   __Pyx_RefNannySetupContext("_check_init_shape", 1);
   22375         111 :   if (__pyx_optional_args) {
   22376         111 :     if (__pyx_optional_args->__pyx_n > 0) {
   22377         111 :       __pyx_v_ndim = __pyx_optional_args->ndim;
   22378             :     }
   22379             :   }
   22380             : 
   22381             :   /* "scipy/interpolate/_interpnd.pyx":207
   22382             :  * 
   22383             :  *     """
   22384             :  *     if values.shape[0] != points.shape[0]:             # <<<<<<<<<<<<<<
   22385             :  *         raise ValueError("different number of values and points")
   22386             :  *     if points.ndim != 2:
   22387             :  */
   22388         111 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_values, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 207, __pyx_L1_error)
   22389         111 :   __Pyx_GOTREF(__pyx_t_1);
   22390         111 :   __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 207, __pyx_L1_error)
   22391         111 :   __Pyx_GOTREF(__pyx_t_2);
   22392         111 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   22393         111 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_points, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 207, __pyx_L1_error)
   22394         111 :   __Pyx_GOTREF(__pyx_t_1);
   22395         111 :   __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 207, __pyx_L1_error)
   22396         111 :   __Pyx_GOTREF(__pyx_t_3);
   22397         111 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   22398         111 :   __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 207, __pyx_L1_error)
   22399         111 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   22400         111 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   22401         111 :   __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 207, __pyx_L1_error)
   22402         111 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   22403         111 :   if (unlikely(__pyx_t_4)) {
   22404             : 
   22405             :     /* "scipy/interpolate/_interpnd.pyx":208
   22406             :  *     """
   22407             :  *     if values.shape[0] != points.shape[0]:
   22408             :  *         raise ValueError("different number of values and points")             # <<<<<<<<<<<<<<
   22409             :  *     if points.ndim != 2:
   22410             :  *         raise ValueError("invalid shape for input data points")
   22411             :  */
   22412           0 :     __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 208, __pyx_L1_error)
   22413           0 :     __Pyx_GOTREF(__pyx_t_1);
   22414           0 :     __Pyx_Raise(__pyx_t_1, 0, 0, 0);
   22415           0 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   22416           0 :     __PYX_ERR(0, 208, __pyx_L1_error)
   22417             : 
   22418             :     /* "scipy/interpolate/_interpnd.pyx":207
   22419             :  * 
   22420             :  *     """
   22421             :  *     if values.shape[0] != points.shape[0]:             # <<<<<<<<<<<<<<
   22422             :  *         raise ValueError("different number of values and points")
   22423             :  *     if points.ndim != 2:
   22424             :  */
   22425             :   }
   22426             : 
   22427             :   /* "scipy/interpolate/_interpnd.pyx":209
   22428             :  *     if values.shape[0] != points.shape[0]:
   22429             :  *         raise ValueError("different number of values and points")
   22430             :  *     if points.ndim != 2:             # <<<<<<<<<<<<<<
   22431             :  *         raise ValueError("invalid shape for input data points")
   22432             :  *     if points.shape[1] < 2:
   22433             :  */
   22434         111 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_points, __pyx_n_s_ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 209, __pyx_L1_error)
   22435         111 :   __Pyx_GOTREF(__pyx_t_1);
   22436         111 :   __pyx_t_4 = (__Pyx_PyInt_BoolNeObjC(__pyx_t_1, __pyx_int_2, 2, 0)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 209, __pyx_L1_error)
   22437         111 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   22438         111 :   if (unlikely(__pyx_t_4)) {
   22439             : 
   22440             :     /* "scipy/interpolate/_interpnd.pyx":210
   22441             :  *         raise ValueError("different number of values and points")
   22442             :  *     if points.ndim != 2:
   22443             :  *         raise ValueError("invalid shape for input data points")             # <<<<<<<<<<<<<<
   22444             :  *     if points.shape[1] < 2:
   22445             :  *         raise ValueError("input data must be at least 2-D")
   22446             :  */
   22447           0 :     __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 210, __pyx_L1_error)
   22448           0 :     __Pyx_GOTREF(__pyx_t_1);
   22449           0 :     __Pyx_Raise(__pyx_t_1, 0, 0, 0);
   22450           0 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   22451           0 :     __PYX_ERR(0, 210, __pyx_L1_error)
   22452             : 
   22453             :     /* "scipy/interpolate/_interpnd.pyx":209
   22454             :  *     if values.shape[0] != points.shape[0]:
   22455             :  *         raise ValueError("different number of values and points")
   22456             :  *     if points.ndim != 2:             # <<<<<<<<<<<<<<
   22457             :  *         raise ValueError("invalid shape for input data points")
   22458             :  *     if points.shape[1] < 2:
   22459             :  */
   22460             :   }
   22461             : 
   22462             :   /* "scipy/interpolate/_interpnd.pyx":211
   22463             :  *     if points.ndim != 2:
   22464             :  *         raise ValueError("invalid shape for input data points")
   22465             :  *     if points.shape[1] < 2:             # <<<<<<<<<<<<<<
   22466             :  *         raise ValueError("input data must be at least 2-D")
   22467             :  *     if ndim is not None and points.shape[1] != ndim:
   22468             :  */
   22469         111 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_points, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 211, __pyx_L1_error)
   22470         111 :   __Pyx_GOTREF(__pyx_t_1);
   22471         111 :   __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 211, __pyx_L1_error)
   22472         111 :   __Pyx_GOTREF(__pyx_t_3);
   22473         111 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   22474         111 :   __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_int_2, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 211, __pyx_L1_error)
   22475         111 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   22476         111 :   __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 211, __pyx_L1_error)
   22477         111 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   22478         111 :   if (unlikely(__pyx_t_4)) {
   22479             : 
   22480             :     /* "scipy/interpolate/_interpnd.pyx":212
   22481             :  *         raise ValueError("invalid shape for input data points")
   22482             :  *     if points.shape[1] < 2:
   22483             :  *         raise ValueError("input data must be at least 2-D")             # <<<<<<<<<<<<<<
   22484             :  *     if ndim is not None and points.shape[1] != ndim:
   22485             :  *         raise ValueError("this mode of interpolation available only for "
   22486             :  */
   22487           0 :     __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 212, __pyx_L1_error)
   22488           0 :     __Pyx_GOTREF(__pyx_t_1);
   22489           0 :     __Pyx_Raise(__pyx_t_1, 0, 0, 0);
   22490           0 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   22491           0 :     __PYX_ERR(0, 212, __pyx_L1_error)
   22492             : 
   22493             :     /* "scipy/interpolate/_interpnd.pyx":211
   22494             :  *     if points.ndim != 2:
   22495             :  *         raise ValueError("invalid shape for input data points")
   22496             :  *     if points.shape[1] < 2:             # <<<<<<<<<<<<<<
   22497             :  *         raise ValueError("input data must be at least 2-D")
   22498             :  *     if ndim is not None and points.shape[1] != ndim:
   22499             :  */
   22500             :   }
   22501             : 
   22502             :   /* "scipy/interpolate/_interpnd.pyx":213
   22503             :  *     if points.shape[1] < 2:
   22504             :  *         raise ValueError("input data must be at least 2-D")
   22505             :  *     if ndim is not None and points.shape[1] != ndim:             # <<<<<<<<<<<<<<
   22506             :  *         raise ValueError("this mode of interpolation available only for "
   22507             :  *                          "%d-D data" % ndim)
   22508             :  */
   22509         111 :   __pyx_t_5 = (__pyx_v_ndim != Py_None);
   22510         111 :   if (__pyx_t_5) {
   22511          57 :   } else {
   22512          54 :     __pyx_t_4 = __pyx_t_5;
   22513          54 :     goto __pyx_L7_bool_binop_done;
   22514             :   }
   22515          57 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_points, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 213, __pyx_L1_error)
   22516          57 :   __Pyx_GOTREF(__pyx_t_1);
   22517          57 :   __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 213, __pyx_L1_error)
   22518          57 :   __Pyx_GOTREF(__pyx_t_3);
   22519          57 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   22520          57 :   __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_v_ndim, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 213, __pyx_L1_error)
   22521          57 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   22522          57 :   __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 213, __pyx_L1_error)
   22523          57 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   22524             :   __pyx_t_4 = __pyx_t_5;
   22525         111 :   __pyx_L7_bool_binop_done:;
   22526         111 :   if (unlikely(__pyx_t_4)) {
   22527             : 
   22528             :     /* "scipy/interpolate/_interpnd.pyx":215
   22529             :  *     if ndim is not None and points.shape[1] != ndim:
   22530             :  *         raise ValueError("this mode of interpolation available only for "
   22531             :  *                          "%d-D data" % ndim)             # <<<<<<<<<<<<<<
   22532             :  * 
   22533             :  * 
   22534             :  */
   22535           1 :     __pyx_t_1 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_this_mode_of_interpolation_avail, __pyx_v_ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 215, __pyx_L1_error)
   22536           1 :     __Pyx_GOTREF(__pyx_t_1);
   22537             : 
   22538             :     /* "scipy/interpolate/_interpnd.pyx":214
   22539             :  *         raise ValueError("input data must be at least 2-D")
   22540             :  *     if ndim is not None and points.shape[1] != ndim:
   22541             :  *         raise ValueError("this mode of interpolation available only for "             # <<<<<<<<<<<<<<
   22542             :  *                          "%d-D data" % ndim)
   22543             :  * 
   22544             :  */
   22545           1 :     __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 214, __pyx_L1_error)
   22546           1 :     __Pyx_GOTREF(__pyx_t_3);
   22547           1 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   22548           1 :     __Pyx_Raise(__pyx_t_3, 0, 0, 0);
   22549           1 :     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   22550           1 :     __PYX_ERR(0, 214, __pyx_L1_error)
   22551             : 
   22552             :     /* "scipy/interpolate/_interpnd.pyx":213
   22553             :  *     if points.shape[1] < 2:
   22554             :  *         raise ValueError("input data must be at least 2-D")
   22555             :  *     if ndim is not None and points.shape[1] != ndim:             # <<<<<<<<<<<<<<
   22556             :  *         raise ValueError("this mode of interpolation available only for "
   22557             :  *                          "%d-D data" % ndim)
   22558             :  */
   22559             :   }
   22560             : 
   22561             :   /* "scipy/interpolate/_interpnd.pyx":202
   22562             :  * 
   22563             :  * 
   22564             :  * cdef _check_init_shape(points, values, ndim=None):             # <<<<<<<<<<<<<<
   22565             :  *     """
   22566             :  *     Check shape of points and values arrays
   22567             :  */
   22568             : 
   22569             :   /* function exit code */
   22570         110 :   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   22571         110 :   goto __pyx_L0;
   22572           1 :   __pyx_L1_error:;
   22573           1 :   __Pyx_XDECREF(__pyx_t_1);
   22574           1 :   __Pyx_XDECREF(__pyx_t_2);
   22575           1 :   __Pyx_XDECREF(__pyx_t_3);
   22576           1 :   __Pyx_AddTraceback("scipy.interpolate._interpnd._check_init_shape", __pyx_clineno, __pyx_lineno, __pyx_filename);
   22577           1 :   __pyx_r = 0;
   22578         111 :   __pyx_L0:;
   22579         111 :   __Pyx_XGIVEREF(__pyx_r);
   22580         111 :   __Pyx_RefNannyFinishContext();
   22581         111 :   return __pyx_r;
   22582             : }
   22583             : 
   22584             : /* "scipy/interpolate/_interpnd.pyx":301
   22585             :  *     """
   22586             :  * 
   22587             :  *     def __init__(self, points, values, fill_value=np.nan, rescale=False):             # <<<<<<<<<<<<<<
   22588             :  *         NDInterpolatorBase.__init__(self, points, values, fill_value=fill_value,
   22589             :  *                 rescale=rescale)
   22590             :  */
   22591             : 
   22592           0 : static PyObject *__pyx_pf_5scipy_11interpolate_9_interpnd_8__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
   22593           0 :   PyObject *__pyx_r = NULL;
   22594             :   __Pyx_RefNannyDeclarations
   22595           0 :   PyObject *__pyx_t_1 = NULL;
   22596           0 :   PyObject *__pyx_t_2 = NULL;
   22597           0 :   int __pyx_lineno = 0;
   22598           0 :   const char *__pyx_filename = NULL;
   22599           0 :   int __pyx_clineno = 0;
   22600           0 :   __Pyx_RefNannySetupContext("__defaults__", 1);
   22601           0 :   __Pyx_XDECREF(__pyx_r);
   22602           0 :   __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 301, __pyx_L1_error)
   22603           0 :   __Pyx_GOTREF(__pyx_t_1);
   22604           0 :   __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults2, __pyx_self)->__pyx_arg_fill_value);
   22605           0 :   __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults2, __pyx_self)->__pyx_arg_fill_value);
   22606           0 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults2, __pyx_self)->__pyx_arg_fill_value)) __PYX_ERR(0, 301, __pyx_L1_error);
   22607           0 :   __Pyx_INCREF(((PyObject *)Py_False));
   22608           0 :   __Pyx_GIVEREF(((PyObject *)Py_False));
   22609           0 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)Py_False))) __PYX_ERR(0, 301, __pyx_L1_error);
   22610           0 :   __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 301, __pyx_L1_error)
   22611           0 :   __Pyx_GOTREF(__pyx_t_2);
   22612           0 :   __Pyx_GIVEREF(__pyx_t_1);
   22613           0 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(0, 301, __pyx_L1_error);
   22614           0 :   __Pyx_INCREF(Py_None);
   22615           0 :   __Pyx_GIVEREF(Py_None);
   22616           0 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None)) __PYX_ERR(0, 301, __pyx_L1_error);
   22617           0 :   __pyx_t_1 = 0;
   22618           0 :   __pyx_r = __pyx_t_2;
   22619           0 :   __pyx_t_2 = 0;
   22620           0 :   goto __pyx_L0;
   22621             : 
   22622             :   /* function exit code */
   22623           0 :   __pyx_L1_error:;
   22624           0 :   __Pyx_XDECREF(__pyx_t_1);
   22625           0 :   __Pyx_XDECREF(__pyx_t_2);
   22626           0 :   __Pyx_AddTraceback("scipy.interpolate._interpnd.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   22627           0 :   __pyx_r = NULL;
   22628           0 :   __pyx_L0:;
   22629           0 :   __Pyx_XGIVEREF(__pyx_r);
   22630           0 :   __Pyx_RefNannyFinishContext();
   22631           0 :   return __pyx_r;
   22632             : }
   22633             : 
   22634             : /* Python wrapper */
   22635             : static PyObject *__pyx_pw_5scipy_11interpolate_9_interpnd_20LinearNDInterpolator_1__init__(PyObject *__pyx_self, 
   22636             : #if CYTHON_METH_FASTCALL
   22637             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   22638             : #else
   22639             : PyObject *__pyx_args, PyObject *__pyx_kwds
   22640             : #endif
   22641             : ); /*proto*/
   22642             : static PyMethodDef __pyx_mdef_5scipy_11interpolate_9_interpnd_20LinearNDInterpolator_1__init__ = {"__init__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5scipy_11interpolate_9_interpnd_20LinearNDInterpolator_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
   22643          31 : static PyObject *__pyx_pw_5scipy_11interpolate_9_interpnd_20LinearNDInterpolator_1__init__(PyObject *__pyx_self, 
   22644             : #if CYTHON_METH_FASTCALL
   22645             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   22646             : #else
   22647             : PyObject *__pyx_args, PyObject *__pyx_kwds
   22648             : #endif
   22649             : ) {
   22650          31 :   PyObject *__pyx_v_self = 0;
   22651          31 :   PyObject *__pyx_v_points = 0;
   22652          31 :   PyObject *__pyx_v_values = 0;
   22653          31 :   PyObject *__pyx_v_fill_value = 0;
   22654          31 :   PyObject *__pyx_v_rescale = 0;
   22655             :   #if !CYTHON_METH_FASTCALL
   22656             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
   22657             :   #endif
   22658          31 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   22659          31 :   PyObject* values[5] = {0,0,0,0,0};
   22660          31 :   int __pyx_lineno = 0;
   22661          31 :   const char *__pyx_filename = NULL;
   22662          31 :   int __pyx_clineno = 0;
   22663          31 :   PyObject *__pyx_r = 0;
   22664             :   __Pyx_RefNannyDeclarations
   22665          31 :   __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
   22666             :   #if !CYTHON_METH_FASTCALL
   22667             :   #if CYTHON_ASSUME_SAFE_MACROS
   22668             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
   22669             :   #else
   22670             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
   22671             :   #endif
   22672             :   #endif
   22673          31 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
   22674             :   {
   22675          31 :     PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_points,&__pyx_n_s_values,&__pyx_n_s_fill_value,&__pyx_n_s_rescale,0};
   22676          31 :     __pyx_defaults2 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults2, __pyx_self);
   22677          31 :     values[3] = __Pyx_Arg_NewRef_FASTCALL(__pyx_dynamic_args->__pyx_arg_fill_value);
   22678          31 :     values[4] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_False)));
   22679          31 :     if (__pyx_kwds) {
   22680          20 :       Py_ssize_t kw_args;
   22681          20 :       switch (__pyx_nargs) {
   22682           0 :         case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
   22683           0 :         CYTHON_FALLTHROUGH;
   22684           0 :         case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
   22685          20 :         CYTHON_FALLTHROUGH;
   22686          20 :         case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
   22687          20 :         CYTHON_FALLTHROUGH;
   22688          20 :         case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
   22689          20 :         CYTHON_FALLTHROUGH;
   22690          20 :         case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
   22691          20 :         CYTHON_FALLTHROUGH;
   22692          20 :         case  0: break;
   22693           0 :         default: goto __pyx_L5_argtuple_error;
   22694             :       }
   22695          20 :       kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
   22696          20 :       switch (__pyx_nargs) {
   22697           0 :         case  0:
   22698           0 :         if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
   22699           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
   22700           0 :           kw_args--;
   22701             :         }
   22702           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 301, __pyx_L3_error)
   22703           0 :         else goto __pyx_L5_argtuple_error;
   22704           0 :         CYTHON_FALLTHROUGH;
   22705             :         case  1:
   22706           0 :         if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_points)) != 0)) {
   22707           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
   22708           0 :           kw_args--;
   22709             :         }
   22710           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 301, __pyx_L3_error)
   22711             :         else {
   22712           0 :           __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 5, 1); __PYX_ERR(0, 301, __pyx_L3_error)
   22713             :         }
   22714           0 :         CYTHON_FALLTHROUGH;
   22715             :         case  2:
   22716           0 :         if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_values)) != 0)) {
   22717           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
   22718           0 :           kw_args--;
   22719             :         }
   22720           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 301, __pyx_L3_error)
   22721             :         else {
   22722           0 :           __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 5, 2); __PYX_ERR(0, 301, __pyx_L3_error)
   22723             :         }
   22724          20 :         CYTHON_FALLTHROUGH;
   22725             :         case  3:
   22726          20 :         if (kw_args > 0) {
   22727          20 :           PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fill_value);
   22728          20 :           if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
   22729           4 :           else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 301, __pyx_L3_error)
   22730             :         }
   22731          20 :         CYTHON_FALLTHROUGH;
   22732             :         case  4:
   22733          20 :         if (kw_args > 0) {
   22734          20 :           PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_rescale);
   22735          20 :           if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
   22736           0 :           else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 301, __pyx_L3_error)
   22737             :         }
   22738             :       }
   22739          20 :       if (unlikely(kw_args > 0)) {
   22740           0 :         const Py_ssize_t kwd_pos_args = __pyx_nargs;
   22741           0 :         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 301, __pyx_L3_error)
   22742             :       }
   22743             :     } else {
   22744          11 :       switch (__pyx_nargs) {
   22745           0 :         case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
   22746           0 :         CYTHON_FALLTHROUGH;
   22747           0 :         case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
   22748          11 :         CYTHON_FALLTHROUGH;
   22749          11 :         case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
   22750          11 :         values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
   22751          11 :         values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
   22752          11 :         break;
   22753           0 :         default: goto __pyx_L5_argtuple_error;
   22754             :       }
   22755             :     }
   22756          31 :     __pyx_v_self = values[0];
   22757          31 :     __pyx_v_points = values[1];
   22758          31 :     __pyx_v_values = values[2];
   22759          31 :     __pyx_v_fill_value = values[3];
   22760          31 :     __pyx_v_rescale = values[4];
   22761             :   }
   22762          31 :   goto __pyx_L6_skip;
   22763           0 :   __pyx_L5_argtuple_error:;
   22764           0 :   __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 5, __pyx_nargs); __PYX_ERR(0, 301, __pyx_L3_error)
   22765          31 :   __pyx_L6_skip:;
   22766          31 :   goto __pyx_L4_argument_unpacking_done;
   22767           0 :   __pyx_L3_error:;
   22768             :   {
   22769           0 :     Py_ssize_t __pyx_temp;
   22770           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   22771             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
   22772             :     }
   22773             :   }
   22774           0 :   __Pyx_AddTraceback("scipy.interpolate._interpnd.LinearNDInterpolator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   22775           0 :   __Pyx_RefNannyFinishContext();
   22776           0 :   return NULL;
   22777          31 :   __pyx_L4_argument_unpacking_done:;
   22778          31 :   __pyx_r = __pyx_pf_5scipy_11interpolate_9_interpnd_20LinearNDInterpolator___init__(__pyx_self, __pyx_v_self, __pyx_v_points, __pyx_v_values, __pyx_v_fill_value, __pyx_v_rescale);
   22779             : 
   22780             :   /* function exit code */
   22781             :   {
   22782          31 :     Py_ssize_t __pyx_temp;
   22783          31 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   22784             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
   22785             :     }
   22786             :   }
   22787             :   __Pyx_RefNannyFinishContext();
   22788             :   return __pyx_r;
   22789             : }
   22790             : 
   22791          31 : static PyObject *__pyx_pf_5scipy_11interpolate_9_interpnd_20LinearNDInterpolator___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_points, PyObject *__pyx_v_values, PyObject *__pyx_v_fill_value, PyObject *__pyx_v_rescale) {
   22792          31 :   PyObject *__pyx_r = NULL;
   22793             :   __Pyx_RefNannyDeclarations
   22794          31 :   PyObject *__pyx_t_1 = NULL;
   22795          31 :   PyObject *__pyx_t_2 = NULL;
   22796          31 :   PyObject *__pyx_t_3 = NULL;
   22797          31 :   PyObject *__pyx_t_4 = NULL;
   22798          31 :   int __pyx_lineno = 0;
   22799          31 :   const char *__pyx_filename = NULL;
   22800          31 :   int __pyx_clineno = 0;
   22801          31 :   __Pyx_RefNannySetupContext("__init__", 1);
   22802             : 
   22803             :   /* "scipy/interpolate/_interpnd.pyx":302
   22804             :  * 
   22805             :  *     def __init__(self, points, values, fill_value=np.nan, rescale=False):
   22806             :  *         NDInterpolatorBase.__init__(self, points, values, fill_value=fill_value,             # <<<<<<<<<<<<<<
   22807             :  *                 rescale=rescale)
   22808             :  * 
   22809             :  */
   22810          31 :   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_NDInterpolatorBase); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 302, __pyx_L1_error)
   22811          31 :   __Pyx_GOTREF(__pyx_t_1);
   22812          31 :   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 302, __pyx_L1_error)
   22813          31 :   __Pyx_GOTREF(__pyx_t_2);
   22814          31 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   22815          31 :   __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 302, __pyx_L1_error)
   22816          31 :   __Pyx_GOTREF(__pyx_t_1);
   22817          31 :   __Pyx_INCREF(__pyx_v_self);
   22818          31 :   __Pyx_GIVEREF(__pyx_v_self);
   22819          31 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self)) __PYX_ERR(0, 302, __pyx_L1_error);
   22820          31 :   __Pyx_INCREF(__pyx_v_points);
   22821          31 :   __Pyx_GIVEREF(__pyx_v_points);
   22822          31 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_points)) __PYX_ERR(0, 302, __pyx_L1_error);
   22823          31 :   __Pyx_INCREF(__pyx_v_values);
   22824          31 :   __Pyx_GIVEREF(__pyx_v_values);
   22825          31 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_values)) __PYX_ERR(0, 302, __pyx_L1_error);
   22826          31 :   __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 302, __pyx_L1_error)
   22827          31 :   __Pyx_GOTREF(__pyx_t_3);
   22828          31 :   if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_fill_value, __pyx_v_fill_value) < 0) __PYX_ERR(0, 302, __pyx_L1_error)
   22829             : 
   22830             :   /* "scipy/interpolate/_interpnd.pyx":303
   22831             :  *     def __init__(self, points, values, fill_value=np.nan, rescale=False):
   22832             :  *         NDInterpolatorBase.__init__(self, points, values, fill_value=fill_value,
   22833             :  *                 rescale=rescale)             # <<<<<<<<<<<<<<
   22834             :  * 
   22835             :  *     def _calculate_triangulation(self, points):
   22836             :  */
   22837          31 :   if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_rescale, __pyx_v_rescale) < 0) __PYX_ERR(0, 302, __pyx_L1_error)
   22838             : 
   22839             :   /* "scipy/interpolate/_interpnd.pyx":302
   22840             :  * 
   22841             :  *     def __init__(self, points, values, fill_value=np.nan, rescale=False):
   22842             :  *         NDInterpolatorBase.__init__(self, points, values, fill_value=fill_value,             # <<<<<<<<<<<<<<
   22843             :  *                 rescale=rescale)
   22844             :  * 
   22845             :  */
   22846          31 :   __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 302, __pyx_L1_error)
   22847          30 :   __Pyx_GOTREF(__pyx_t_4);
   22848          30 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   22849          30 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   22850          30 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   22851          30 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   22852             : 
   22853             :   /* "scipy/interpolate/_interpnd.pyx":301
   22854             :  *     """
   22855             :  * 
   22856             :  *     def __init__(self, points, values, fill_value=np.nan, rescale=False):             # <<<<<<<<<<<<<<
   22857             :  *         NDInterpolatorBase.__init__(self, points, values, fill_value=fill_value,
   22858             :  *                 rescale=rescale)
   22859             :  */
   22860             : 
   22861             :   /* function exit code */
   22862          30 :   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   22863          30 :   goto __pyx_L0;
   22864           1 :   __pyx_L1_error:;
   22865           1 :   __Pyx_XDECREF(__pyx_t_1);
   22866           1 :   __Pyx_XDECREF(__pyx_t_2);
   22867           1 :   __Pyx_XDECREF(__pyx_t_3);
   22868           1 :   __Pyx_XDECREF(__pyx_t_4);
   22869           1 :   __Pyx_AddTraceback("scipy.interpolate._interpnd.LinearNDInterpolator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   22870           1 :   __pyx_r = NULL;
   22871          31 :   __pyx_L0:;
   22872          31 :   __Pyx_XGIVEREF(__pyx_r);
   22873          31 :   __Pyx_RefNannyFinishContext();
   22874          31 :   return __pyx_r;
   22875             : }
   22876             : 
   22877             : /* "scipy/interpolate/_interpnd.pyx":305
   22878             :  *                 rescale=rescale)
   22879             :  * 
   22880             :  *     def _calculate_triangulation(self, points):             # <<<<<<<<<<<<<<
   22881             :  *         self.tri = qhull.Delaunay(points)
   22882             :  * 
   22883             :  */
   22884             : 
   22885             : /* Python wrapper */
   22886             : static PyObject *__pyx_pw_5scipy_11interpolate_9_interpnd_20LinearNDInterpolator_3_calculate_triangulation(PyObject *__pyx_self, 
   22887             : #if CYTHON_METH_FASTCALL
   22888             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   22889             : #else
   22890             : PyObject *__pyx_args, PyObject *__pyx_kwds
   22891             : #endif
   22892             : ); /*proto*/
   22893             : static PyMethodDef __pyx_mdef_5scipy_11interpolate_9_interpnd_20LinearNDInterpolator_3_calculate_triangulation = {"_calculate_triangulation", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5scipy_11interpolate_9_interpnd_20LinearNDInterpolator_3_calculate_triangulation, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
   22894          29 : static PyObject *__pyx_pw_5scipy_11interpolate_9_interpnd_20LinearNDInterpolator_3_calculate_triangulation(PyObject *__pyx_self, 
   22895             : #if CYTHON_METH_FASTCALL
   22896             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   22897             : #else
   22898             : PyObject *__pyx_args, PyObject *__pyx_kwds
   22899             : #endif
   22900             : ) {
   22901          29 :   PyObject *__pyx_v_self = 0;
   22902          29 :   PyObject *__pyx_v_points = 0;
   22903             :   #if !CYTHON_METH_FASTCALL
   22904             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
   22905             :   #endif
   22906          29 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   22907          29 :   PyObject* values[2] = {0,0};
   22908          29 :   int __pyx_lineno = 0;
   22909          29 :   const char *__pyx_filename = NULL;
   22910          29 :   int __pyx_clineno = 0;
   22911          29 :   PyObject *__pyx_r = 0;
   22912             :   __Pyx_RefNannyDeclarations
   22913          29 :   __Pyx_RefNannySetupContext("_calculate_triangulation (wrapper)", 0);
   22914             :   #if !CYTHON_METH_FASTCALL
   22915             :   #if CYTHON_ASSUME_SAFE_MACROS
   22916             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
   22917             :   #else
   22918             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
   22919             :   #endif
   22920             :   #endif
   22921          29 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
   22922             :   {
   22923          29 :     PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_points,0};
   22924          29 :     if (__pyx_kwds) {
   22925           0 :       Py_ssize_t kw_args;
   22926           0 :       switch (__pyx_nargs) {
   22927           0 :         case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
   22928           0 :         CYTHON_FALLTHROUGH;
   22929           0 :         case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
   22930           0 :         CYTHON_FALLTHROUGH;
   22931           0 :         case  0: break;
   22932           0 :         default: goto __pyx_L5_argtuple_error;
   22933             :       }
   22934           0 :       kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
   22935           0 :       switch (__pyx_nargs) {
   22936             :         case  0:
   22937           0 :         if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
   22938           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
   22939           0 :           kw_args--;
   22940             :         }
   22941           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 305, __pyx_L3_error)
   22942           0 :         else goto __pyx_L5_argtuple_error;
   22943           0 :         CYTHON_FALLTHROUGH;
   22944             :         case  1:
   22945           0 :         if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_points)) != 0)) {
   22946           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
   22947           0 :           kw_args--;
   22948             :         }
   22949           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 305, __pyx_L3_error)
   22950             :         else {
   22951           0 :           __Pyx_RaiseArgtupleInvalid("_calculate_triangulation", 1, 2, 2, 1); __PYX_ERR(0, 305, __pyx_L3_error)
   22952             :         }
   22953             :       }
   22954           0 :       if (unlikely(kw_args > 0)) {
   22955           0 :         const Py_ssize_t kwd_pos_args = __pyx_nargs;
   22956           0 :         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_calculate_triangulation") < 0)) __PYX_ERR(0, 305, __pyx_L3_error)
   22957             :       }
   22958          29 :     } else if (unlikely(__pyx_nargs != 2)) {
   22959           0 :       goto __pyx_L5_argtuple_error;
   22960             :     } else {
   22961          29 :       values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
   22962          29 :       values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
   22963             :     }
   22964          29 :     __pyx_v_self = values[0];
   22965          29 :     __pyx_v_points = values[1];
   22966             :   }
   22967          29 :   goto __pyx_L6_skip;
   22968           0 :   __pyx_L5_argtuple_error:;
   22969           0 :   __Pyx_RaiseArgtupleInvalid("_calculate_triangulation", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 305, __pyx_L3_error)
   22970          29 :   __pyx_L6_skip:;
   22971          29 :   goto __pyx_L4_argument_unpacking_done;
   22972           0 :   __pyx_L3_error:;
   22973             :   {
   22974           0 :     Py_ssize_t __pyx_temp;
   22975           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   22976             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
   22977             :     }
   22978             :   }
   22979           0 :   __Pyx_AddTraceback("scipy.interpolate._interpnd.LinearNDInterpolator._calculate_triangulation", __pyx_clineno, __pyx_lineno, __pyx_filename);
   22980           0 :   __Pyx_RefNannyFinishContext();
   22981           0 :   return NULL;
   22982          29 :   __pyx_L4_argument_unpacking_done:;
   22983          29 :   __pyx_r = __pyx_pf_5scipy_11interpolate_9_interpnd_20LinearNDInterpolator_2_calculate_triangulation(__pyx_self, __pyx_v_self, __pyx_v_points);
   22984             : 
   22985             :   /* function exit code */
   22986             :   {
   22987          29 :     Py_ssize_t __pyx_temp;
   22988          29 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   22989             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
   22990             :     }
   22991             :   }
   22992             :   __Pyx_RefNannyFinishContext();
   22993             :   return __pyx_r;
   22994             : }
   22995             : 
   22996          29 : static PyObject *__pyx_pf_5scipy_11interpolate_9_interpnd_20LinearNDInterpolator_2_calculate_triangulation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_points) {
   22997          29 :   PyObject *__pyx_r = NULL;
   22998             :   __Pyx_RefNannyDeclarations
   22999          29 :   PyObject *__pyx_t_1 = NULL;
   23000          29 :   PyObject *__pyx_t_2 = NULL;
   23001          29 :   PyObject *__pyx_t_3 = NULL;
   23002          29 :   unsigned int __pyx_t_4;
   23003          29 :   int __pyx_lineno = 0;
   23004          29 :   const char *__pyx_filename = NULL;
   23005          29 :   int __pyx_clineno = 0;
   23006          29 :   __Pyx_RefNannySetupContext("_calculate_triangulation", 1);
   23007             : 
   23008             :   /* "scipy/interpolate/_interpnd.pyx":306
   23009             :  * 
   23010             :  *     def _calculate_triangulation(self, points):
   23011             :  *         self.tri = qhull.Delaunay(points)             # <<<<<<<<<<<<<<
   23012             :  * 
   23013             :  *     def _evaluate_double(self, xi):
   23014             :  */
   23015          29 :   __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_qhull); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 306, __pyx_L1_error)
   23016          29 :   __Pyx_GOTREF(__pyx_t_2);
   23017          29 :   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Delaunay); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 306, __pyx_L1_error)
   23018          29 :   __Pyx_GOTREF(__pyx_t_3);
   23019          29 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   23020          29 :   __pyx_t_2 = NULL;
   23021          29 :   __pyx_t_4 = 0;
   23022             :   #if CYTHON_UNPACK_METHODS
   23023          29 :   if (unlikely(PyMethod_Check(__pyx_t_3))) {
   23024           0 :     __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
   23025           0 :     if (likely(__pyx_t_2)) {
   23026           0 :       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
   23027           0 :       __Pyx_INCREF(__pyx_t_2);
   23028           0 :       __Pyx_INCREF(function);
   23029           0 :       __Pyx_DECREF_SET(__pyx_t_3, function);
   23030             :       __pyx_t_4 = 1;
   23031             :     }
   23032             :   }
   23033             :   #endif
   23034             :   {
   23035          29 :     PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_points};
   23036          29 :     __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
   23037          29 :     __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
   23038          29 :     if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 306, __pyx_L1_error)
   23039          29 :     __Pyx_GOTREF(__pyx_t_1);
   23040          29 :     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   23041             :   }
   23042          29 :   if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_tri, __pyx_t_1) < 0) __PYX_ERR(0, 306, __pyx_L1_error)
   23043          29 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   23044             : 
   23045             :   /* "scipy/interpolate/_interpnd.pyx":305
   23046             :  *                 rescale=rescale)
   23047             :  * 
   23048             :  *     def _calculate_triangulation(self, points):             # <<<<<<<<<<<<<<
   23049             :  *         self.tri = qhull.Delaunay(points)
   23050             :  * 
   23051             :  */
   23052             : 
   23053             :   /* function exit code */
   23054          29 :   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   23055          29 :   goto __pyx_L0;
   23056           0 :   __pyx_L1_error:;
   23057           0 :   __Pyx_XDECREF(__pyx_t_1);
   23058           0 :   __Pyx_XDECREF(__pyx_t_2);
   23059           0 :   __Pyx_XDECREF(__pyx_t_3);
   23060           0 :   __Pyx_AddTraceback("scipy.interpolate._interpnd.LinearNDInterpolator._calculate_triangulation", __pyx_clineno, __pyx_lineno, __pyx_filename);
   23061           0 :   __pyx_r = NULL;
   23062          29 :   __pyx_L0:;
   23063          29 :   __Pyx_XGIVEREF(__pyx_r);
   23064          29 :   __Pyx_RefNannyFinishContext();
   23065          29 :   return __pyx_r;
   23066             : }
   23067             : 
   23068             : /* "scipy/interpolate/_interpnd.pyx":308
   23069             :  *         self.tri = qhull.Delaunay(points)
   23070             :  * 
   23071             :  *     def _evaluate_double(self, xi):             # <<<<<<<<<<<<<<
   23072             :  *         return self._do_evaluate(xi, 1.0)
   23073             :  * 
   23074             :  */
   23075             : 
   23076             : /* Python wrapper */
   23077             : static PyObject *__pyx_pw_5scipy_11interpolate_9_interpnd_20LinearNDInterpolator_5_evaluate_double(PyObject *__pyx_self, 
   23078             : #if CYTHON_METH_FASTCALL
   23079             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   23080             : #else
   23081             : PyObject *__pyx_args, PyObject *__pyx_kwds
   23082             : #endif
   23083             : ); /*proto*/
   23084             : static PyMethodDef __pyx_mdef_5scipy_11interpolate_9_interpnd_20LinearNDInterpolator_5_evaluate_double = {"_evaluate_double", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5scipy_11interpolate_9_interpnd_20LinearNDInterpolator_5_evaluate_double, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
   23085          23 : static PyObject *__pyx_pw_5scipy_11interpolate_9_interpnd_20LinearNDInterpolator_5_evaluate_double(PyObject *__pyx_self, 
   23086             : #if CYTHON_METH_FASTCALL
   23087             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   23088             : #else
   23089             : PyObject *__pyx_args, PyObject *__pyx_kwds
   23090             : #endif
   23091             : ) {
   23092          23 :   PyObject *__pyx_v_self = 0;
   23093          23 :   PyObject *__pyx_v_xi = 0;
   23094             :   #if !CYTHON_METH_FASTCALL
   23095             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
   23096             :   #endif
   23097          23 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   23098          23 :   PyObject* values[2] = {0,0};
   23099          23 :   int __pyx_lineno = 0;
   23100          23 :   const char *__pyx_filename = NULL;
   23101          23 :   int __pyx_clineno = 0;
   23102          23 :   PyObject *__pyx_r = 0;
   23103             :   __Pyx_RefNannyDeclarations
   23104          23 :   __Pyx_RefNannySetupContext("_evaluate_double (wrapper)", 0);
   23105             :   #if !CYTHON_METH_FASTCALL
   23106             :   #if CYTHON_ASSUME_SAFE_MACROS
   23107             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
   23108             :   #else
   23109             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
   23110             :   #endif
   23111             :   #endif
   23112          23 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
   23113             :   {
   23114          23 :     PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_xi,0};
   23115          23 :     if (__pyx_kwds) {
   23116           0 :       Py_ssize_t kw_args;
   23117           0 :       switch (__pyx_nargs) {
   23118           0 :         case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
   23119           0 :         CYTHON_FALLTHROUGH;
   23120           0 :         case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
   23121           0 :         CYTHON_FALLTHROUGH;
   23122           0 :         case  0: break;
   23123           0 :         default: goto __pyx_L5_argtuple_error;
   23124             :       }
   23125           0 :       kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
   23126           0 :       switch (__pyx_nargs) {
   23127             :         case  0:
   23128           0 :         if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
   23129           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
   23130           0 :           kw_args--;
   23131             :         }
   23132           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 308, __pyx_L3_error)
   23133           0 :         else goto __pyx_L5_argtuple_error;
   23134           0 :         CYTHON_FALLTHROUGH;
   23135             :         case  1:
   23136           0 :         if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_xi)) != 0)) {
   23137           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
   23138           0 :           kw_args--;
   23139             :         }
   23140           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 308, __pyx_L3_error)
   23141             :         else {
   23142           0 :           __Pyx_RaiseArgtupleInvalid("_evaluate_double", 1, 2, 2, 1); __PYX_ERR(0, 308, __pyx_L3_error)
   23143             :         }
   23144             :       }
   23145           0 :       if (unlikely(kw_args > 0)) {
   23146           0 :         const Py_ssize_t kwd_pos_args = __pyx_nargs;
   23147           0 :         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_evaluate_double") < 0)) __PYX_ERR(0, 308, __pyx_L3_error)
   23148             :       }
   23149          23 :     } else if (unlikely(__pyx_nargs != 2)) {
   23150           0 :       goto __pyx_L5_argtuple_error;
   23151             :     } else {
   23152          23 :       values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
   23153          23 :       values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
   23154             :     }
   23155          23 :     __pyx_v_self = values[0];
   23156          23 :     __pyx_v_xi = values[1];
   23157             :   }
   23158          23 :   goto __pyx_L6_skip;
   23159           0 :   __pyx_L5_argtuple_error:;
   23160           0 :   __Pyx_RaiseArgtupleInvalid("_evaluate_double", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 308, __pyx_L3_error)
   23161          23 :   __pyx_L6_skip:;
   23162          23 :   goto __pyx_L4_argument_unpacking_done;
   23163           0 :   __pyx_L3_error:;
   23164             :   {
   23165           0 :     Py_ssize_t __pyx_temp;
   23166           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   23167             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
   23168             :     }
   23169             :   }
   23170           0 :   __Pyx_AddTraceback("scipy.interpolate._interpnd.LinearNDInterpolator._evaluate_double", __pyx_clineno, __pyx_lineno, __pyx_filename);
   23171           0 :   __Pyx_RefNannyFinishContext();
   23172           0 :   return NULL;
   23173          23 :   __pyx_L4_argument_unpacking_done:;
   23174          23 :   __pyx_r = __pyx_pf_5scipy_11interpolate_9_interpnd_20LinearNDInterpolator_4_evaluate_double(__pyx_self, __pyx_v_self, __pyx_v_xi);
   23175             : 
   23176             :   /* function exit code */
   23177             :   {
   23178          23 :     Py_ssize_t __pyx_temp;
   23179          23 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   23180             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
   23181             :     }
   23182             :   }
   23183             :   __Pyx_RefNannyFinishContext();
   23184             :   return __pyx_r;
   23185             : }
   23186             : 
   23187          23 : static PyObject *__pyx_pf_5scipy_11interpolate_9_interpnd_20LinearNDInterpolator_4_evaluate_double(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_xi) {
   23188          23 :   PyObject *__pyx_r = NULL;
   23189             :   __Pyx_RefNannyDeclarations
   23190          23 :   PyObject *__pyx_t_1 = NULL;
   23191          23 :   PyObject *__pyx_t_2 = NULL;
   23192          23 :   PyObject *__pyx_t_3 = NULL;
   23193          23 :   unsigned int __pyx_t_4;
   23194          23 :   int __pyx_lineno = 0;
   23195          23 :   const char *__pyx_filename = NULL;
   23196          23 :   int __pyx_clineno = 0;
   23197          23 :   __Pyx_RefNannySetupContext("_evaluate_double", 1);
   23198             : 
   23199             :   /* "scipy/interpolate/_interpnd.pyx":309
   23200             :  * 
   23201             :  *     def _evaluate_double(self, xi):
   23202             :  *         return self._do_evaluate(xi, 1.0)             # <<<<<<<<<<<<<<
   23203             :  * 
   23204             :  *     def _evaluate_complex(self, xi):
   23205             :  */
   23206          23 :   __Pyx_XDECREF(__pyx_r);
   23207          23 :   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_do_evaluate); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 309, __pyx_L1_error)
   23208          23 :   __Pyx_GOTREF(__pyx_t_2);
   23209          23 :   __pyx_t_3 = NULL;
   23210          23 :   __pyx_t_4 = 0;
   23211             :   #if CYTHON_UNPACK_METHODS
   23212          23 :   if (likely(PyMethod_Check(__pyx_t_2))) {
   23213           0 :     __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
   23214           0 :     if (likely(__pyx_t_3)) {
   23215           0 :       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
   23216           0 :       __Pyx_INCREF(__pyx_t_3);
   23217           0 :       __Pyx_INCREF(function);
   23218           0 :       __Pyx_DECREF_SET(__pyx_t_2, function);
   23219             :       __pyx_t_4 = 1;
   23220             :     }
   23221             :   }
   23222             :   #endif
   23223             :   {
   23224          23 :     PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_xi, __pyx_float_1_0};
   23225          23 :     __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
   23226          23 :     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
   23227          23 :     if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 309, __pyx_L1_error)
   23228          23 :     __Pyx_GOTREF(__pyx_t_1);
   23229          23 :     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   23230             :   }
   23231          23 :   __pyx_r = __pyx_t_1;
   23232          23 :   __pyx_t_1 = 0;
   23233          23 :   goto __pyx_L0;
   23234             : 
   23235             :   /* "scipy/interpolate/_interpnd.pyx":308
   23236             :  *         self.tri = qhull.Delaunay(points)
   23237             :  * 
   23238             :  *     def _evaluate_double(self, xi):             # <<<<<<<<<<<<<<
   23239             :  *         return self._do_evaluate(xi, 1.0)
   23240             :  * 
   23241             :  */
   23242             : 
   23243             :   /* function exit code */
   23244           0 :   __pyx_L1_error:;
   23245           0 :   __Pyx_XDECREF(__pyx_t_1);
   23246           0 :   __Pyx_XDECREF(__pyx_t_2);
   23247           0 :   __Pyx_XDECREF(__pyx_t_3);
   23248           0 :   __Pyx_AddTraceback("scipy.interpolate._interpnd.LinearNDInterpolator._evaluate_double", __pyx_clineno, __pyx_lineno, __pyx_filename);
   23249           0 :   __pyx_r = NULL;
   23250          23 :   __pyx_L0:;
   23251          23 :   __Pyx_XGIVEREF(__pyx_r);
   23252          23 :   __Pyx_RefNannyFinishContext();
   23253          23 :   return __pyx_r;
   23254             : }
   23255             : 
   23256             : /* "scipy/interpolate/_interpnd.pyx":311
   23257             :  *         return self._do_evaluate(xi, 1.0)
   23258             :  * 
   23259             :  *     def _evaluate_complex(self, xi):             # <<<<<<<<<<<<<<
   23260             :  *         return self._do_evaluate(xi, 1.0j)
   23261             :  * 
   23262             :  */
   23263             : 
   23264             : /* Python wrapper */
   23265             : static PyObject *__pyx_pw_5scipy_11interpolate_9_interpnd_20LinearNDInterpolator_7_evaluate_complex(PyObject *__pyx_self, 
   23266             : #if CYTHON_METH_FASTCALL
   23267             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   23268             : #else
   23269             : PyObject *__pyx_args, PyObject *__pyx_kwds
   23270             : #endif
   23271             : ); /*proto*/
   23272             : static PyMethodDef __pyx_mdef_5scipy_11interpolate_9_interpnd_20LinearNDInterpolator_7_evaluate_complex = {"_evaluate_complex", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5scipy_11interpolate_9_interpnd_20LinearNDInterpolator_7_evaluate_complex, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
   23273          10 : static PyObject *__pyx_pw_5scipy_11interpolate_9_interpnd_20LinearNDInterpolator_7_evaluate_complex(PyObject *__pyx_self, 
   23274             : #if CYTHON_METH_FASTCALL
   23275             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   23276             : #else
   23277             : PyObject *__pyx_args, PyObject *__pyx_kwds
   23278             : #endif
   23279             : ) {
   23280          10 :   PyObject *__pyx_v_self = 0;
   23281          10 :   PyObject *__pyx_v_xi = 0;
   23282             :   #if !CYTHON_METH_FASTCALL
   23283             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
   23284             :   #endif
   23285          10 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   23286          10 :   PyObject* values[2] = {0,0};
   23287          10 :   int __pyx_lineno = 0;
   23288          10 :   const char *__pyx_filename = NULL;
   23289          10 :   int __pyx_clineno = 0;
   23290          10 :   PyObject *__pyx_r = 0;
   23291             :   __Pyx_RefNannyDeclarations
   23292          10 :   __Pyx_RefNannySetupContext("_evaluate_complex (wrapper)", 0);
   23293             :   #if !CYTHON_METH_FASTCALL
   23294             :   #if CYTHON_ASSUME_SAFE_MACROS
   23295             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
   23296             :   #else
   23297             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
   23298             :   #endif
   23299             :   #endif
   23300          10 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
   23301             :   {
   23302          10 :     PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_xi,0};
   23303          10 :     if (__pyx_kwds) {
   23304           0 :       Py_ssize_t kw_args;
   23305           0 :       switch (__pyx_nargs) {
   23306           0 :         case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
   23307           0 :         CYTHON_FALLTHROUGH;
   23308           0 :         case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
   23309           0 :         CYTHON_FALLTHROUGH;
   23310           0 :         case  0: break;
   23311           0 :         default: goto __pyx_L5_argtuple_error;
   23312             :       }
   23313           0 :       kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
   23314           0 :       switch (__pyx_nargs) {
   23315             :         case  0:
   23316           0 :         if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
   23317           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
   23318           0 :           kw_args--;
   23319             :         }
   23320           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 311, __pyx_L3_error)
   23321           0 :         else goto __pyx_L5_argtuple_error;
   23322           0 :         CYTHON_FALLTHROUGH;
   23323             :         case  1:
   23324           0 :         if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_xi)) != 0)) {
   23325           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
   23326           0 :           kw_args--;
   23327             :         }
   23328           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 311, __pyx_L3_error)
   23329             :         else {
   23330           0 :           __Pyx_RaiseArgtupleInvalid("_evaluate_complex", 1, 2, 2, 1); __PYX_ERR(0, 311, __pyx_L3_error)
   23331             :         }
   23332             :       }
   23333           0 :       if (unlikely(kw_args > 0)) {
   23334           0 :         const Py_ssize_t kwd_pos_args = __pyx_nargs;
   23335           0 :         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_evaluate_complex") < 0)) __PYX_ERR(0, 311, __pyx_L3_error)
   23336             :       }
   23337          10 :     } else if (unlikely(__pyx_nargs != 2)) {
   23338           0 :       goto __pyx_L5_argtuple_error;
   23339             :     } else {
   23340          10 :       values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
   23341          10 :       values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
   23342             :     }
   23343          10 :     __pyx_v_self = values[0];
   23344          10 :     __pyx_v_xi = values[1];
   23345             :   }
   23346          10 :   goto __pyx_L6_skip;
   23347           0 :   __pyx_L5_argtuple_error:;
   23348           0 :   __Pyx_RaiseArgtupleInvalid("_evaluate_complex", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 311, __pyx_L3_error)
   23349          10 :   __pyx_L6_skip:;
   23350          10 :   goto __pyx_L4_argument_unpacking_done;
   23351           0 :   __pyx_L3_error:;
   23352             :   {
   23353           0 :     Py_ssize_t __pyx_temp;
   23354           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   23355             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
   23356             :     }
   23357             :   }
   23358           0 :   __Pyx_AddTraceback("scipy.interpolate._interpnd.LinearNDInterpolator._evaluate_complex", __pyx_clineno, __pyx_lineno, __pyx_filename);
   23359           0 :   __Pyx_RefNannyFinishContext();
   23360           0 :   return NULL;
   23361          10 :   __pyx_L4_argument_unpacking_done:;
   23362          10 :   __pyx_r = __pyx_pf_5scipy_11interpolate_9_interpnd_20LinearNDInterpolator_6_evaluate_complex(__pyx_self, __pyx_v_self, __pyx_v_xi);
   23363             : 
   23364             :   /* function exit code */
   23365             :   {
   23366          10 :     Py_ssize_t __pyx_temp;
   23367          10 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   23368             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
   23369             :     }
   23370             :   }
   23371             :   __Pyx_RefNannyFinishContext();
   23372             :   return __pyx_r;
   23373             : }
   23374             : 
   23375          10 : static PyObject *__pyx_pf_5scipy_11interpolate_9_interpnd_20LinearNDInterpolator_6_evaluate_complex(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_xi) {
   23376          10 :   PyObject *__pyx_r = NULL;
   23377             :   __Pyx_RefNannyDeclarations
   23378          10 :   PyObject *__pyx_t_1 = NULL;
   23379          10 :   PyObject *__pyx_t_2 = NULL;
   23380          10 :   PyObject *__pyx_t_3 = NULL;
   23381          10 :   PyObject *__pyx_t_4 = NULL;
   23382          10 :   unsigned int __pyx_t_5;
   23383          10 :   int __pyx_lineno = 0;
   23384          10 :   const char *__pyx_filename = NULL;
   23385          10 :   int __pyx_clineno = 0;
   23386          10 :   __Pyx_RefNannySetupContext("_evaluate_complex", 1);
   23387             : 
   23388             :   /* "scipy/interpolate/_interpnd.pyx":312
   23389             :  * 
   23390             :  *     def _evaluate_complex(self, xi):
   23391             :  *         return self._do_evaluate(xi, 1.0j)             # <<<<<<<<<<<<<<
   23392             :  * 
   23393             :  *     @cython.boundscheck(False)
   23394             :  */
   23395          10 :   __Pyx_XDECREF(__pyx_r);
   23396          10 :   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_do_evaluate); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 312, __pyx_L1_error)
   23397          10 :   __Pyx_GOTREF(__pyx_t_2);
   23398          10 :   __pyx_t_3 = PyComplex_FromDoubles(0.0, 1.0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 312, __pyx_L1_error)
   23399          10 :   __Pyx_GOTREF(__pyx_t_3);
   23400          10 :   __pyx_t_4 = NULL;
   23401          10 :   __pyx_t_5 = 0;
   23402             :   #if CYTHON_UNPACK_METHODS
   23403          10 :   if (likely(PyMethod_Check(__pyx_t_2))) {
   23404           0 :     __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
   23405           0 :     if (likely(__pyx_t_4)) {
   23406           0 :       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
   23407           0 :       __Pyx_INCREF(__pyx_t_4);
   23408           0 :       __Pyx_INCREF(function);
   23409           0 :       __Pyx_DECREF_SET(__pyx_t_2, function);
   23410             :       __pyx_t_5 = 1;
   23411             :     }
   23412             :   }
   23413             :   #endif
   23414             :   {
   23415          10 :     PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_v_xi, __pyx_t_3};
   23416          10 :     __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
   23417          10 :     __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
   23418          10 :     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   23419          10 :     if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 312, __pyx_L1_error)
   23420          10 :     __Pyx_GOTREF(__pyx_t_1);
   23421          10 :     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   23422             :   }
   23423          10 :   __pyx_r = __pyx_t_1;
   23424          10 :   __pyx_t_1 = 0;
   23425          10 :   goto __pyx_L0;
   23426             : 
   23427             :   /* "scipy/interpolate/_interpnd.pyx":311
   23428             :  *         return self._do_evaluate(xi, 1.0)
   23429             :  * 
   23430             :  *     def _evaluate_complex(self, xi):             # <<<<<<<<<<<<<<
   23431             :  *         return self._do_evaluate(xi, 1.0j)
   23432             :  * 
   23433             :  */
   23434             : 
   23435             :   /* function exit code */
   23436           0 :   __pyx_L1_error:;
   23437           0 :   __Pyx_XDECREF(__pyx_t_1);
   23438           0 :   __Pyx_XDECREF(__pyx_t_2);
   23439           0 :   __Pyx_XDECREF(__pyx_t_3);
   23440           0 :   __Pyx_XDECREF(__pyx_t_4);
   23441           0 :   __Pyx_AddTraceback("scipy.interpolate._interpnd.LinearNDInterpolator._evaluate_complex", __pyx_clineno, __pyx_lineno, __pyx_filename);
   23442           0 :   __pyx_r = NULL;
   23443          10 :   __pyx_L0:;
   23444          10 :   __Pyx_XGIVEREF(__pyx_r);
   23445          10 :   __Pyx_RefNannyFinishContext();
   23446          10 :   return __pyx_r;
   23447             : }
   23448             : 
   23449             : /* "scipy/interpolate/_interpnd.pyx":314
   23450             :  *         return self._do_evaluate(xi, 1.0j)
   23451             :  * 
   23452             :  *     @cython.boundscheck(False)             # <<<<<<<<<<<<<<
   23453             :  *     @cython.wraparound(False)
   23454             :  *     def _do_evaluate(self, const double[:,::1] xi, const double_or_complex dummy):
   23455             :  */
   23456             : 
   23457             : /* Python wrapper */
   23458             : static PyObject *__pyx_pw_5scipy_11interpolate_9_interpnd_20LinearNDInterpolator_9_do_evaluate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
   23459             : static PyMethodDef __pyx_mdef_5scipy_11interpolate_9_interpnd_20LinearNDInterpolator_9_do_evaluate = {"_do_evaluate", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5scipy_11interpolate_9_interpnd_20LinearNDInterpolator_9_do_evaluate, METH_VARARGS|METH_KEYWORDS, 0};
   23460          33 : static PyObject *__pyx_pw_5scipy_11interpolate_9_interpnd_20LinearNDInterpolator_9_do_evaluate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   23461          33 :   PyObject *__pyx_v_signatures = 0;
   23462          33 :   PyObject *__pyx_v_args = 0;
   23463          33 :   PyObject *__pyx_v_kwargs = 0;
   23464          33 :   CYTHON_UNUSED PyObject *__pyx_v_defaults = 0;
   23465          33 :   PyObject *__pyx_v__fused_sigindex = 0;
   23466          33 :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
   23467          33 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   23468          33 :   PyObject* values[5] = {0,0,0,0,0};
   23469          33 :   int __pyx_lineno = 0;
   23470          33 :   const char *__pyx_filename = NULL;
   23471          33 :   int __pyx_clineno = 0;
   23472          33 :   PyObject *__pyx_r = 0;
   23473             :   __Pyx_RefNannyDeclarations
   23474          33 :   __Pyx_RefNannySetupContext("__pyx_fused_cpdef (wrapper)", 0);
   23475             :   #if CYTHON_ASSUME_SAFE_MACROS
   23476          33 :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
   23477             :   #else
   23478             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
   23479             :   #endif
   23480          33 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
   23481             :   {
   23482          33 :     PyObject **__pyx_pyargnames[] = {&__pyx_n_s_signatures,&__pyx_n_s_args,&__pyx_n_s_kwargs,&__pyx_n_s_defaults,&__pyx_n_s_fused_sigindex,0};
   23483          33 :     __pyx_defaults3 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults3, __pyx_self);
   23484          33 :     values[4] = __Pyx_Arg_NewRef_VARARGS(__pyx_dynamic_args->__pyx_arg__fused_sigindex);
   23485          33 :     if (__pyx_kwds) {
   23486           0 :       Py_ssize_t kw_args;
   23487           0 :       switch (__pyx_nargs) {
   23488           0 :         case  5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
   23489           0 :         CYTHON_FALLTHROUGH;
   23490           0 :         case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
   23491           0 :         CYTHON_FALLTHROUGH;
   23492           0 :         case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
   23493           0 :         CYTHON_FALLTHROUGH;
   23494           0 :         case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
   23495           0 :         CYTHON_FALLTHROUGH;
   23496           0 :         case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
   23497           0 :         CYTHON_FALLTHROUGH;
   23498           0 :         case  0: break;
   23499           0 :         default: goto __pyx_L5_argtuple_error;
   23500             :       }
   23501           0 :       kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
   23502           0 :       switch (__pyx_nargs) {
   23503           0 :         case  0:
   23504           0 :         if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_signatures)) != 0)) {
   23505           0 :           (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
   23506           0 :           kw_args--;
   23507             :         }
   23508           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 314, __pyx_L3_error)
   23509           0 :         else goto __pyx_L5_argtuple_error;
   23510           0 :         CYTHON_FALLTHROUGH;
   23511             :         case  1:
   23512           0 :         if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_args)) != 0)) {
   23513           0 :           (void)__Pyx_Arg_NewRef_VARARGS(values[1]);
   23514           0 :           kw_args--;
   23515             :         }
   23516           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 314, __pyx_L3_error)
   23517             :         else {
   23518           0 :           __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 1); __PYX_ERR(0, 314, __pyx_L3_error)
   23519             :         }
   23520           0 :         CYTHON_FALLTHROUGH;
   23521             :         case  2:
   23522           0 :         if (likely((values[2] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_kwargs)) != 0)) {
   23523           0 :           (void)__Pyx_Arg_NewRef_VARARGS(values[2]);
   23524           0 :           kw_args--;
   23525             :         }
   23526           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 314, __pyx_L3_error)
   23527             :         else {
   23528           0 :           __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 2); __PYX_ERR(0, 314, __pyx_L3_error)
   23529             :         }
   23530           0 :         CYTHON_FALLTHROUGH;
   23531             :         case  3:
   23532           0 :         if (likely((values[3] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_defaults)) != 0)) {
   23533           0 :           (void)__Pyx_Arg_NewRef_VARARGS(values[3]);
   23534           0 :           kw_args--;
   23535             :         }
   23536           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 314, __pyx_L3_error)
   23537             :         else {
   23538           0 :           __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 3); __PYX_ERR(0, 314, __pyx_L3_error)
   23539             :         }
   23540           0 :         CYTHON_FALLTHROUGH;
   23541             :         case  4:
   23542           0 :         if (kw_args > 0) {
   23543           0 :           PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fused_sigindex);
   23544           0 :           if (value) { values[4] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
   23545           0 :           else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 314, __pyx_L3_error)
   23546             :         }
   23547             :       }
   23548           0 :       if (unlikely(kw_args > 0)) {
   23549           0 :         const Py_ssize_t kwd_pos_args = __pyx_nargs;
   23550           0 :         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fused_cpdef") < 0)) __PYX_ERR(0, 314, __pyx_L3_error)
   23551             :       }
   23552             :     } else {
   23553          33 :       switch (__pyx_nargs) {
   23554           0 :         case  5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
   23555          33 :         CYTHON_FALLTHROUGH;
   23556          33 :         case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
   23557          33 :         values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
   23558          33 :         values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
   23559          33 :         values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
   23560          33 :         break;
   23561           0 :         default: goto __pyx_L5_argtuple_error;
   23562             :       }
   23563             :     }
   23564          33 :     __pyx_v_signatures = values[0];
   23565          33 :     __pyx_v_args = values[1];
   23566          33 :     __pyx_v_kwargs = values[2];
   23567          33 :     __pyx_v_defaults = values[3];
   23568          33 :     __pyx_v__fused_sigindex = values[4];
   23569             :   }
   23570          33 :   goto __pyx_L6_skip;
   23571           0 :   __pyx_L5_argtuple_error:;
   23572           0 :   __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 314, __pyx_L3_error)
   23573          33 :   __pyx_L6_skip:;
   23574          33 :   goto __pyx_L4_argument_unpacking_done;
   23575           0 :   __pyx_L3_error:;
   23576             :   {
   23577           0 :     Py_ssize_t __pyx_temp;
   23578           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   23579             :       __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
   23580             :     }
   23581             :   }
   23582           0 :   __Pyx_AddTraceback("scipy.interpolate._interpnd.LinearNDInterpolator.__pyx_fused_cpdef", __pyx_clineno, __pyx_lineno, __pyx_filename);
   23583           0 :   __Pyx_RefNannyFinishContext();
   23584           0 :   return NULL;
   23585          33 :   __pyx_L4_argument_unpacking_done:;
   23586          33 :   __pyx_r = __pyx_pf_5scipy_11interpolate_9_interpnd_20LinearNDInterpolator_8_do_evaluate(__pyx_self, __pyx_v_signatures, __pyx_v_args, __pyx_v_kwargs, __pyx_v_defaults, __pyx_v__fused_sigindex);
   23587             : 
   23588             :   /* function exit code */
   23589             :   {
   23590          33 :     Py_ssize_t __pyx_temp;
   23591          33 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   23592             :       __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
   23593             :     }
   23594             :   }
   23595             :   __Pyx_RefNannyFinishContext();
   23596             :   return __pyx_r;
   23597             : }
   23598             : 
   23599          33 : static PyObject *__pyx_pf_5scipy_11interpolate_9_interpnd_20LinearNDInterpolator_8_do_evaluate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_signatures, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs, CYTHON_UNUSED PyObject *__pyx_v_defaults, PyObject *__pyx_v__fused_sigindex) {
   23600          33 :   PyObject *__pyx_v_search_list = 0;
   23601          33 :   PyObject *__pyx_v_sigindex_node = 0;
   23602          33 :   PyObject *__pyx_v_dest_sig = NULL;
   23603          33 :   PyObject *__pyx_v_arg = NULL;
   23604          33 :   PyObject *__pyx_v_sig = NULL;
   23605          33 :   PyObject *__pyx_v_sig_series = NULL;
   23606          33 :   PyObject *__pyx_v_last_type = NULL;
   23607          33 :   PyObject *__pyx_v_sig_type = NULL;
   23608          33 :   PyObject *__pyx_v_sigindex_matches = NULL;
   23609          33 :   PyObject *__pyx_v_sigindex_candidates = NULL;
   23610          33 :   PyObject *__pyx_v_dst_type = NULL;
   23611          33 :   PyObject *__pyx_v_found_matches = NULL;
   23612          33 :   PyObject *__pyx_v_found_candidates = NULL;
   23613          33 :   PyObject *__pyx_v_sn = NULL;
   23614          33 :   PyObject *__pyx_v_type_match = NULL;
   23615          33 :   PyObject *__pyx_v_candidates = NULL;
   23616          33 :   PyObject *__pyx_r = NULL;
   23617             :   __Pyx_RefNannyDeclarations
   23618          33 :   PyObject *__pyx_t_1 = NULL;
   23619          33 :   int __pyx_t_2;
   23620          33 :   int __pyx_t_3;
   23621          33 :   int __pyx_t_4;
   23622          33 :   Py_ssize_t __pyx_t_5;
   23623          33 :   PyObject *__pyx_t_6 = NULL;
   23624          33 :   Py_ssize_t __pyx_t_7;
   23625          33 :   int __pyx_t_8;
   23626          33 :   int __pyx_t_9;
   23627          33 :   PyObject *__pyx_t_10 = NULL;
   23628          33 :   PyObject *__pyx_t_11 = NULL;
   23629          33 :   PyObject *__pyx_t_12 = NULL;
   23630          33 :   unsigned int __pyx_t_13;
   23631          33 :   Py_ssize_t __pyx_t_14;
   23632          33 :   int __pyx_t_15;
   23633          33 :   int __pyx_lineno = 0;
   23634          33 :   const char *__pyx_filename = NULL;
   23635          33 :   int __pyx_clineno = 0;
   23636          33 :   __Pyx_RefNannySetupContext("_do_evaluate", 0);
   23637          33 :   __Pyx_INCREF(__pyx_v_kwargs);
   23638          33 :   __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 314, __pyx_L1_error)
   23639          33 :   __Pyx_GOTREF(__pyx_t_1);
   23640          33 :   __Pyx_INCREF(Py_None);
   23641          33 :   __Pyx_GIVEREF(Py_None);
   23642          33 :   if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, Py_None)) __PYX_ERR(0, 314, __pyx_L1_error);
   23643          33 :   __pyx_v_dest_sig = ((PyObject*)__pyx_t_1);
   23644          33 :   __pyx_t_1 = 0;
   23645          33 :   __pyx_t_3 = (__pyx_v_kwargs != Py_None);
   23646          33 :   if (__pyx_t_3) {
   23647           0 :   } else {
   23648          33 :     __pyx_t_2 = __pyx_t_3;
   23649          33 :     goto __pyx_L4_bool_binop_done;
   23650             :   }
   23651           0 :   __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_kwargs); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 314, __pyx_L1_error)
   23652           0 :   __pyx_t_4 = (!__pyx_t_3);
   23653           0 :   __pyx_t_2 = __pyx_t_4;
   23654          33 :   __pyx_L4_bool_binop_done:;
   23655          33 :   if (__pyx_t_2) {
   23656           0 :     __Pyx_INCREF(Py_None);
   23657           0 :     __Pyx_DECREF_SET(__pyx_v_kwargs, Py_None);
   23658             :   }
   23659          33 :   if (unlikely(__pyx_v_args == Py_None)) {
   23660           0 :     PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
   23661           0 :     __PYX_ERR(0, 314, __pyx_L1_error)
   23662             :   }
   23663          33 :   __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 314, __pyx_L1_error)
   23664          33 :   __pyx_t_2 = (2 < __pyx_t_5);
   23665          33 :   if (__pyx_t_2) {
   23666          33 :     if (unlikely(__pyx_v_args == Py_None)) {
   23667             :       PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
   23668             :       __PYX_ERR(0, 314, __pyx_L1_error)
   23669             :     }
   23670          33 :     __pyx_t_1 = PyTuple_GET_ITEM(((PyObject*)__pyx_v_args), 2);
   23671          33 :     __Pyx_INCREF(__pyx_t_1);
   23672          33 :     __pyx_v_arg = __pyx_t_1;
   23673          33 :     __pyx_t_1 = 0;
   23674          33 :     goto __pyx_L6;
   23675             :   }
   23676           0 :   __pyx_t_4 = (__pyx_v_kwargs != Py_None);
   23677           0 :   if (__pyx_t_4) {
   23678           0 :   } else {
   23679           0 :     __pyx_t_2 = __pyx_t_4;
   23680           0 :     goto __pyx_L7_bool_binop_done;
   23681             :   }
   23682           0 :   if (unlikely(__pyx_v_kwargs == Py_None)) {
   23683             :     PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
   23684             :     __PYX_ERR(0, 314, __pyx_L1_error)
   23685             :   }
   23686           0 :   __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_dummy, ((PyObject*)__pyx_v_kwargs), Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 314, __pyx_L1_error)
   23687             :   __pyx_t_2 = __pyx_t_4;
   23688           0 :   __pyx_L7_bool_binop_done:;
   23689           0 :   if (likely(__pyx_t_2)) {
   23690           0 :     if (unlikely(__pyx_v_kwargs == Py_None)) {
   23691           0 :       PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
   23692           0 :       __PYX_ERR(0, 314, __pyx_L1_error)
   23693             :     }
   23694           0 :     __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_kwargs), __pyx_n_s_dummy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 314, __pyx_L1_error)
   23695           0 :     __Pyx_GOTREF(__pyx_t_1);
   23696           0 :     __pyx_v_arg = __pyx_t_1;
   23697           0 :     __pyx_t_1 = 0;
   23698           0 :     goto __pyx_L6;
   23699             :   }
   23700             :   /*else*/ {
   23701           0 :     if (unlikely(__pyx_v_args == Py_None)) {
   23702             :       PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
   23703             :       __PYX_ERR(0, 314, __pyx_L1_error)
   23704             :     }
   23705           0 :     __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 314, __pyx_L1_error)
   23706           0 :     __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 314, __pyx_L1_error)
   23707           0 :     __Pyx_GOTREF(__pyx_t_1);
   23708           0 :     __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 314, __pyx_L1_error)
   23709           0 :     __Pyx_GOTREF(__pyx_t_6);
   23710           0 :     __Pyx_INCREF(__pyx_int_3);
   23711           0 :     __Pyx_GIVEREF(__pyx_int_3);
   23712           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_int_3)) __PYX_ERR(0, 314, __pyx_L1_error);
   23713           0 :     __Pyx_INCREF(__pyx_n_s_s);
   23714           0 :     __Pyx_GIVEREF(__pyx_n_s_s);
   23715           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_s)) __PYX_ERR(0, 314, __pyx_L1_error);
   23716           0 :     __Pyx_GIVEREF(__pyx_t_1);
   23717           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_1)) __PYX_ERR(0, 314, __pyx_L1_error);
   23718           0 :     __pyx_t_1 = 0;
   23719           0 :     __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Expected_at_least_d_argument_s_g, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 314, __pyx_L1_error)
   23720           0 :     __Pyx_GOTREF(__pyx_t_1);
   23721           0 :     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
   23722           0 :     __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 314, __pyx_L1_error)
   23723           0 :     __Pyx_GOTREF(__pyx_t_6);
   23724           0 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   23725           0 :     __Pyx_Raise(__pyx_t_6, 0, 0, 0);
   23726           0 :     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
   23727           0 :     __PYX_ERR(0, 314, __pyx_L1_error)
   23728             :   }
   23729          33 :   __pyx_L6:;
   23730          33 :   while (1) {
   23731          33 :     __pyx_t_2 = PyFloat_Check(__pyx_v_arg); 
   23732          33 :     if (__pyx_t_2) {
   23733          23 :       if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_double, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 314, __pyx_L1_error)
   23734          23 :       goto __pyx_L10_break;
   23735             :     }
   23736          10 :     __pyx_t_2 = PyComplex_Check(__pyx_v_arg); 
   23737          10 :     if (__pyx_t_2) {
   23738          10 :       if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_kp_s_double_complex, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 314, __pyx_L1_error)
   23739          10 :       goto __pyx_L10_break;
   23740             :     }
   23741           0 :     if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, Py_None, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 314, __pyx_L1_error)
   23742           0 :     goto __pyx_L10_break;
   23743             :   }
   23744          33 :   __pyx_L10_break:;
   23745          33 :   __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v__fused_sigindex); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 314, __pyx_L1_error)
   23746          33 :   __pyx_t_4 = (!__pyx_t_2);
   23747          33 :   if (__pyx_t_4) {
   23748           1 :     __pyx_t_5 = 0;
   23749           1 :     if (unlikely(__pyx_v_signatures == Py_None)) {
   23750           0 :       PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
   23751           0 :       __PYX_ERR(0, 314, __pyx_L1_error)
   23752             :     }
   23753           2 :     __pyx_t_1 = __Pyx_dict_iterator(((PyObject*)__pyx_v_signatures), 1, ((PyObject *)NULL), (&__pyx_t_7), (&__pyx_t_8)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 314, __pyx_L1_error)
   23754           1 :     __Pyx_GOTREF(__pyx_t_1);
   23755           1 :     __Pyx_XDECREF(__pyx_t_6);
   23756           1 :     __pyx_t_6 = __pyx_t_1;
   23757           1 :     __pyx_t_1 = 0;
   23758           3 :     while (1) {
   23759           3 :       __pyx_t_9 = __Pyx_dict_iter_next(__pyx_t_6, __pyx_t_7, &__pyx_t_5, &__pyx_t_1, NULL, NULL, __pyx_t_8);
   23760           3 :       if (unlikely(__pyx_t_9 == 0)) break;
   23761           2 :       if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 314, __pyx_L1_error)
   23762           2 :       __Pyx_GOTREF(__pyx_t_1);
   23763           2 :       __Pyx_XDECREF_SET(__pyx_v_sig, __pyx_t_1);
   23764           2 :       __pyx_t_1 = 0;
   23765           2 :       __pyx_t_1 = __pyx_v__fused_sigindex;
   23766           2 :       __Pyx_INCREF(__pyx_t_1);
   23767           2 :       __Pyx_XDECREF_SET(__pyx_v_sigindex_node, ((PyObject*)__pyx_t_1));
   23768           2 :       __pyx_t_1 = 0;
   23769           2 :       __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_sig, __pyx_n_s_strip); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 314, __pyx_L1_error)
   23770           2 :       __Pyx_GOTREF(__pyx_t_11);
   23771           2 :       __pyx_t_12 = NULL;
   23772           2 :       __pyx_t_13 = 0;
   23773             :       #if CYTHON_UNPACK_METHODS
   23774           2 :       if (likely(PyMethod_Check(__pyx_t_11))) {
   23775           0 :         __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_11);
   23776           0 :         if (likely(__pyx_t_12)) {
   23777           0 :           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
   23778           0 :           __Pyx_INCREF(__pyx_t_12);
   23779           0 :           __Pyx_INCREF(function);
   23780           0 :           __Pyx_DECREF_SET(__pyx_t_11, function);
   23781             :           __pyx_t_13 = 1;
   23782             :         }
   23783             :       }
   23784             :       #endif
   23785             :       {
   23786           2 :         PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_kp_s__19};
   23787           2 :         __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_13, 1+__pyx_t_13);
   23788           2 :         __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
   23789           2 :         if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 314, __pyx_L1_error)
   23790           2 :         __Pyx_GOTREF(__pyx_t_10);
   23791           2 :         __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
   23792             :       }
   23793           2 :       __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_split); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 314, __pyx_L1_error)
   23794           2 :       __Pyx_GOTREF(__pyx_t_11);
   23795           2 :       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
   23796           2 :       __pyx_t_10 = NULL;
   23797           2 :       __pyx_t_13 = 0;
   23798             :       #if CYTHON_UNPACK_METHODS
   23799           2 :       if (likely(PyMethod_Check(__pyx_t_11))) {
   23800           0 :         __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11);
   23801           0 :         if (likely(__pyx_t_10)) {
   23802           0 :           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
   23803           0 :           __Pyx_INCREF(__pyx_t_10);
   23804           0 :           __Pyx_INCREF(function);
   23805           0 :           __Pyx_DECREF_SET(__pyx_t_11, function);
   23806             :           __pyx_t_13 = 1;
   23807             :         }
   23808             :       }
   23809             :       #endif
   23810             :       {
   23811           2 :         PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_kp_s__20};
   23812           2 :         __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_13, 1+__pyx_t_13);
   23813           2 :         __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
   23814           2 :         if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 314, __pyx_L1_error)
   23815           2 :         __Pyx_GOTREF(__pyx_t_1);
   23816           2 :         __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
   23817             :       }
   23818           4 :       __pyx_t_11 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 314, __pyx_L1_error)
   23819           2 :       __Pyx_GOTREF(__pyx_t_11);
   23820           2 :       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   23821           2 :       __pyx_t_14 = PyList_GET_SIZE(__pyx_t_11);
   23822           2 :       if (unlikely(__pyx_t_14 < 1)) {
   23823           0 :         __Pyx_RaiseNeedMoreValuesError(0+__pyx_t_14); __PYX_ERR(0, 314, __pyx_L1_error)
   23824             :       }
   23825             :       #if CYTHON_COMPILING_IN_CPYTHON
   23826           2 :       __pyx_t_10 = PyList_GET_ITEM(__pyx_t_11, __pyx_t_14-1); 
   23827           2 :       ((PyVarObject*)__pyx_t_11)->ob_size--;
   23828             :       #else
   23829             :       __pyx_t_10 = PySequence_ITEM(__pyx_t_11, __pyx_t_14-1); 
   23830             :       #endif
   23831           2 :       __Pyx_GOTREF(__pyx_t_10);
   23832             :       #if !CYTHON_COMPILING_IN_CPYTHON
   23833             :       __pyx_t_12 = PySequence_GetSlice(__pyx_t_11, 0, __pyx_t_14-1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 314, __pyx_L1_error)
   23834             :       __Pyx_GOTREF(__pyx_t_12);
   23835             :       __Pyx_DECREF(__pyx_t_11);
   23836             :       __pyx_t_11 = __pyx_t_12; __pyx_t_12 = NULL;
   23837             :       #else
   23838           2 :       CYTHON_UNUSED_VAR(__pyx_t_12);
   23839             :       #endif
   23840           2 :       __Pyx_XDECREF_SET(__pyx_v_sig_series, ((PyObject*)__pyx_t_11));
   23841           2 :       __pyx_t_11 = 0;
   23842           2 :       __Pyx_XDECREF_SET(__pyx_v_last_type, __pyx_t_10);
   23843           2 :       __pyx_t_10 = 0;
   23844           2 :       __pyx_t_1 = __pyx_v_sig_series; __Pyx_INCREF(__pyx_t_1);
   23845             :       __pyx_t_14 = 0;
   23846           2 :       for (;;) {
   23847             :         {
   23848           2 :           Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
   23849             :           #if !CYTHON_ASSUME_SAFE_MACROS
   23850             :           if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 314, __pyx_L1_error)
   23851             :           #endif
   23852           2 :           if (__pyx_t_14 >= __pyx_temp) break;
   23853             :         }
   23854             :         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
   23855           0 :         __pyx_t_10 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_14); __Pyx_INCREF(__pyx_t_10); __pyx_t_14++; if (unlikely((0 < 0))) __PYX_ERR(0, 314, __pyx_L1_error)
   23856             :         #else
   23857             :         __pyx_t_10 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 314, __pyx_L1_error)
   23858             :         __Pyx_GOTREF(__pyx_t_10);
   23859             :         #endif
   23860           0 :         __Pyx_XDECREF_SET(__pyx_v_sig_type, __pyx_t_10);
   23861           0 :         __pyx_t_10 = 0;
   23862           0 :         if (unlikely(__pyx_v_sigindex_node == Py_None)) {
   23863           0 :           PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
   23864           0 :           __PYX_ERR(0, 314, __pyx_L1_error)
   23865             :         }
   23866           0 :         __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_v_sig_type, __pyx_v_sigindex_node, Py_NE)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 314, __pyx_L1_error)
   23867           0 :         if (__pyx_t_4) {
   23868           0 :           __pyx_t_10 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 314, __pyx_L1_error)
   23869           0 :           __Pyx_GOTREF(__pyx_t_10);
   23870           0 :           if (unlikely(__pyx_v_sigindex_node == Py_None)) {
   23871             :             PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
   23872             :             __PYX_ERR(0, 314, __pyx_L1_error)
   23873             :           }
   23874           0 :           if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_sig_type, __pyx_t_10) < 0))) __PYX_ERR(0, 314, __pyx_L1_error)
   23875           0 :           __Pyx_INCREF(__pyx_t_10);
   23876           0 :           __Pyx_DECREF_SET(__pyx_v_sigindex_node, __pyx_t_10);
   23877           0 :           __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
   23878           0 :           goto __pyx_L18;
   23879             :         }
   23880             :         /*else*/ {
   23881           0 :           if (unlikely(__pyx_v_sigindex_node == Py_None)) {
   23882             :             PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
   23883             :             __PYX_ERR(0, 314, __pyx_L1_error)
   23884             :           }
   23885           0 :           __pyx_t_10 = __Pyx_PyDict_GetItem(__pyx_v_sigindex_node, __pyx_v_sig_type); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 314, __pyx_L1_error)
   23886           0 :           __Pyx_GOTREF(__pyx_t_10);
   23887           0 :           __pyx_t_11 = __pyx_t_10;
   23888           0 :           __Pyx_INCREF(__pyx_t_11);
   23889           0 :           __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
   23890           2 :           __Pyx_DECREF_SET(__pyx_v_sigindex_node, ((PyObject*)__pyx_t_11));
   23891             :           __pyx_t_11 = 0;
   23892             :         }
   23893             :         __pyx_L18:;
   23894             :       }
   23895           2 :       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   23896           2 :       if (unlikely(__pyx_v_sigindex_node == Py_None)) {
   23897           0 :         PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
   23898           0 :         __PYX_ERR(0, 314, __pyx_L1_error)
   23899             :       }
   23900           2 :       if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_last_type, __pyx_v_sig) < 0))) __PYX_ERR(0, 314, __pyx_L1_error)
   23901             :     }
   23902           1 :     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
   23903             :   }
   23904          33 :   __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 314, __pyx_L1_error)
   23905          33 :   __Pyx_GOTREF(__pyx_t_6);
   23906          33 :   __pyx_v_sigindex_matches = ((PyObject*)__pyx_t_6);
   23907          33 :   __pyx_t_6 = 0;
   23908          33 :   __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 314, __pyx_L1_error)
   23909          33 :   __Pyx_GOTREF(__pyx_t_6);
   23910          33 :   __Pyx_INCREF(__pyx_v__fused_sigindex);
   23911          33 :   __Pyx_GIVEREF(__pyx_v__fused_sigindex);
   23912          33 :   if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 0, __pyx_v__fused_sigindex)) __PYX_ERR(0, 314, __pyx_L1_error);
   23913          33 :   __pyx_v_sigindex_candidates = ((PyObject*)__pyx_t_6);
   23914          33 :   __pyx_t_6 = 0;
   23915          33 :   __pyx_t_6 = __pyx_v_dest_sig; __Pyx_INCREF(__pyx_t_6);
   23916             :   __pyx_t_7 = 0;
   23917          66 :   for (;;) {
   23918             :     {
   23919          66 :       Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_6);
   23920             :       #if !CYTHON_ASSUME_SAFE_MACROS
   23921             :       if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 314, __pyx_L1_error)
   23922             :       #endif
   23923          66 :       if (__pyx_t_7 >= __pyx_temp) break;
   23924             :     }
   23925             :     #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
   23926          33 :     __pyx_t_1 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 314, __pyx_L1_error)
   23927             :     #else
   23928             :     __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 314, __pyx_L1_error)
   23929             :     __Pyx_GOTREF(__pyx_t_1);
   23930             :     #endif
   23931          33 :     __Pyx_XDECREF_SET(__pyx_v_dst_type, __pyx_t_1);
   23932          33 :     __pyx_t_1 = 0;
   23933          33 :     __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 314, __pyx_L1_error)
   23934          33 :     __Pyx_GOTREF(__pyx_t_1);
   23935          33 :     __Pyx_XDECREF_SET(__pyx_v_found_matches, ((PyObject*)__pyx_t_1));
   23936          33 :     __pyx_t_1 = 0;
   23937          33 :     __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 314, __pyx_L1_error)
   23938          33 :     __Pyx_GOTREF(__pyx_t_1);
   23939          33 :     __Pyx_XDECREF_SET(__pyx_v_found_candidates, ((PyObject*)__pyx_t_1));
   23940          33 :     __pyx_t_1 = 0;
   23941          33 :     __pyx_t_4 = (__pyx_v_dst_type == Py_None);
   23942          33 :     if (__pyx_t_4) {
   23943           0 :       __pyx_t_1 = __pyx_v_sigindex_matches; __Pyx_INCREF(__pyx_t_1);
   23944           0 :       __pyx_t_5 = 0;
   23945           0 :       for (;;) {
   23946             :         {
   23947           0 :           Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
   23948             :           #if !CYTHON_ASSUME_SAFE_MACROS
   23949             :           if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 314, __pyx_L1_error)
   23950             :           #endif
   23951           0 :           if (__pyx_t_5 >= __pyx_temp) break;
   23952             :         }
   23953             :         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
   23954           0 :         __pyx_t_11 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_11); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 314, __pyx_L1_error)
   23955             :         #else
   23956             :         __pyx_t_11 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 314, __pyx_L1_error)
   23957             :         __Pyx_GOTREF(__pyx_t_11);
   23958             :         #endif
   23959           0 :         __Pyx_XDECREF_SET(__pyx_v_sn, __pyx_t_11);
   23960           0 :         __pyx_t_11 = 0;
   23961           0 :         if (unlikely(__pyx_v_sn == Py_None)) {
   23962           0 :           PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values");
   23963           0 :           __PYX_ERR(0, 314, __pyx_L1_error)
   23964             :         }
   23965           0 :         __pyx_t_11 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 314, __pyx_L1_error)
   23966           0 :         __Pyx_GOTREF(__pyx_t_11);
   23967           0 :         __pyx_t_15 = __Pyx_PyList_Extend(__pyx_v_found_matches, __pyx_t_11); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 314, __pyx_L1_error)
   23968           0 :         __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
   23969             :       }
   23970           0 :       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   23971           0 :       __pyx_t_1 = __pyx_v_sigindex_candidates; __Pyx_INCREF(__pyx_t_1);
   23972           0 :       __pyx_t_5 = 0;
   23973           0 :       for (;;) {
   23974             :         {
   23975           0 :           Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
   23976             :           #if !CYTHON_ASSUME_SAFE_MACROS
   23977             :           if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 314, __pyx_L1_error)
   23978             :           #endif
   23979           0 :           if (__pyx_t_5 >= __pyx_temp) break;
   23980             :         }
   23981             :         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
   23982           0 :         __pyx_t_11 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_11); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 314, __pyx_L1_error)
   23983             :         #else
   23984             :         __pyx_t_11 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 314, __pyx_L1_error)
   23985             :         __Pyx_GOTREF(__pyx_t_11);
   23986             :         #endif
   23987           0 :         __Pyx_XDECREF_SET(__pyx_v_sn, __pyx_t_11);
   23988           0 :         __pyx_t_11 = 0;
   23989           0 :         if (unlikely(__pyx_v_sn == Py_None)) {
   23990           0 :           PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values");
   23991           0 :           __PYX_ERR(0, 314, __pyx_L1_error)
   23992             :         }
   23993           0 :         __pyx_t_11 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 314, __pyx_L1_error)
   23994           0 :         __Pyx_GOTREF(__pyx_t_11);
   23995           0 :         __pyx_t_15 = __Pyx_PyList_Extend(__pyx_v_found_candidates, __pyx_t_11); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 314, __pyx_L1_error)
   23996           0 :         __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
   23997             :       }
   23998           0 :       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   23999           0 :       goto __pyx_L22;
   24000             :     }
   24001             :     /*else*/ {
   24002          33 :       __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 314, __pyx_L1_error)
   24003          33 :       __Pyx_GOTREF(__pyx_t_1);
   24004          33 :       __Pyx_INCREF(__pyx_v_sigindex_matches);
   24005          33 :       __Pyx_GIVEREF(__pyx_v_sigindex_matches);
   24006          33 :       if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_sigindex_matches)) __PYX_ERR(0, 314, __pyx_L1_error);
   24007          33 :       __Pyx_INCREF(__pyx_v_sigindex_candidates);
   24008          33 :       __Pyx_GIVEREF(__pyx_v_sigindex_candidates);
   24009          33 :       if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_sigindex_candidates)) __PYX_ERR(0, 314, __pyx_L1_error);
   24010          33 :       __pyx_t_11 = __pyx_t_1; __Pyx_INCREF(__pyx_t_11);
   24011          33 :       __pyx_t_5 = 0;
   24012          66 :       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   24013         165 :       for (;;) {
   24014          99 :         if (__pyx_t_5 >= 2) break;
   24015             :         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
   24016          66 :         __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_11, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 314, __pyx_L1_error)
   24017             :         #else
   24018             :         __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_11, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 314, __pyx_L1_error)
   24019             :         __Pyx_GOTREF(__pyx_t_1);
   24020             :         #endif
   24021          66 :         __Pyx_XDECREF_SET(__pyx_v_search_list, ((PyObject*)__pyx_t_1));
   24022          66 :         __pyx_t_1 = 0;
   24023          66 :         if (unlikely(__pyx_v_search_list == Py_None)) {
   24024           0 :           PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
   24025           0 :           __PYX_ERR(0, 314, __pyx_L1_error)
   24026             :         }
   24027          66 :         __pyx_t_1 = __pyx_v_search_list; __Pyx_INCREF(__pyx_t_1);
   24028             :         __pyx_t_14 = 0;
   24029          99 :         for (;;) {
   24030             :           {
   24031          99 :             Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
   24032             :             #if !CYTHON_ASSUME_SAFE_MACROS
   24033             :             if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 314, __pyx_L1_error)
   24034             :             #endif
   24035          99 :             if (__pyx_t_14 >= __pyx_temp) break;
   24036             :           }
   24037             :           #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
   24038          33 :           __pyx_t_10 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_14); __Pyx_INCREF(__pyx_t_10); __pyx_t_14++; if (unlikely((0 < 0))) __PYX_ERR(0, 314, __pyx_L1_error)
   24039             :           #else
   24040             :           __pyx_t_10 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 314, __pyx_L1_error)
   24041             :           __Pyx_GOTREF(__pyx_t_10);
   24042             :           #endif
   24043          33 :           __Pyx_XDECREF_SET(__pyx_v_sn, __pyx_t_10);
   24044          33 :           __pyx_t_10 = 0;
   24045          33 :           if (unlikely(__pyx_v_sn == Py_None)) {
   24046           0 :             PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
   24047           0 :             __PYX_ERR(0, 314, __pyx_L1_error)
   24048             :           }
   24049          33 :           __pyx_t_10 = __Pyx_PyDict_GetItemDefault(((PyObject*)__pyx_v_sn), __pyx_v_dst_type, Py_None); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 314, __pyx_L1_error)
   24050          33 :           __Pyx_GOTREF(__pyx_t_10);
   24051          33 :           __Pyx_XDECREF_SET(__pyx_v_type_match, __pyx_t_10);
   24052          33 :           __pyx_t_10 = 0;
   24053          33 :           __pyx_t_4 = (__pyx_v_type_match != Py_None);
   24054          33 :           if (__pyx_t_4) {
   24055          33 :             __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_found_matches, __pyx_v_type_match); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 314, __pyx_L1_error)
   24056             :           }
   24057             :         }
   24058         132 :         __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   24059             :       }
   24060          33 :       __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
   24061             :     }
   24062          33 :     __pyx_L22:;
   24063          33 :     __Pyx_INCREF(__pyx_v_found_matches);
   24064          33 :     __Pyx_DECREF_SET(__pyx_v_sigindex_matches, __pyx_v_found_matches);
   24065          33 :     __Pyx_INCREF(__pyx_v_found_candidates);
   24066          33 :     __Pyx_DECREF_SET(__pyx_v_sigindex_candidates, __pyx_v_found_candidates);
   24067          33 :     __pyx_t_2 = (PyList_GET_SIZE(__pyx_v_found_matches) != 0);
   24068          33 :     if (!__pyx_t_2) {
   24069           0 :     } else {
   24070          33 :       __pyx_t_4 = __pyx_t_2;
   24071          33 :       goto __pyx_L37_bool_binop_done;
   24072             :     }
   24073           0 :     __pyx_t_2 = (PyList_GET_SIZE(__pyx_v_found_candidates) != 0);
   24074           0 :     __pyx_t_4 = __pyx_t_2;
   24075          33 :     __pyx_L37_bool_binop_done:;
   24076          33 :     __pyx_t_2 = (!__pyx_t_4);
   24077          33 :     if (__pyx_t_2) {
   24078           0 :       goto __pyx_L21_break;
   24079             :     }
   24080             :   }
   24081          33 :   __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
   24082          33 :   goto __pyx_L39_for_end;
   24083           0 :   __pyx_L21_break:;
   24084           0 :   __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
   24085           0 :   goto __pyx_L39_for_end;
   24086          33 :   __pyx_L39_for_end:;
   24087          33 :   __Pyx_INCREF(__pyx_v_sigindex_matches);
   24088          33 :   __pyx_v_candidates = __pyx_v_sigindex_matches;
   24089          33 :   __pyx_t_2 = (PyList_GET_SIZE(__pyx_v_candidates) != 0);
   24090          33 :   __pyx_t_4 = (!__pyx_t_2);
   24091          33 :   if (unlikely(__pyx_t_4)) {
   24092           0 :     __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 314, __pyx_L1_error)
   24093           0 :     __Pyx_GOTREF(__pyx_t_6);
   24094           0 :     __Pyx_Raise(__pyx_t_6, 0, 0, 0);
   24095           0 :     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
   24096           0 :     __PYX_ERR(0, 314, __pyx_L1_error)
   24097             :   }
   24098          33 :   __pyx_t_7 = __Pyx_PyList_GET_SIZE(__pyx_v_candidates); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 314, __pyx_L1_error)
   24099          33 :   __pyx_t_4 = (__pyx_t_7 > 1);
   24100          33 :   if (unlikely(__pyx_t_4)) {
   24101           0 :     __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 314, __pyx_L1_error)
   24102           0 :     __Pyx_GOTREF(__pyx_t_6);
   24103           0 :     __Pyx_Raise(__pyx_t_6, 0, 0, 0);
   24104           0 :     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
   24105           0 :     __PYX_ERR(0, 314, __pyx_L1_error)
   24106             :   }
   24107             :   /*else*/ {
   24108          33 :     __Pyx_XDECREF(__pyx_r);
   24109          33 :     if (unlikely(__pyx_v_signatures == Py_None)) {
   24110           0 :       PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
   24111           0 :       __PYX_ERR(0, 314, __pyx_L1_error)
   24112             :     }
   24113          33 :     __pyx_t_6 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_signatures), PyList_GET_ITEM(__pyx_v_candidates, 0)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 314, __pyx_L1_error)
   24114          33 :     __Pyx_GOTREF(__pyx_t_6);
   24115          33 :     __pyx_r = __pyx_t_6;
   24116          33 :     __pyx_t_6 = 0;
   24117          33 :     goto __pyx_L0;
   24118             :   }
   24119             : 
   24120             :   /* function exit code */
   24121           0 :   __pyx_L1_error:;
   24122           0 :   __Pyx_XDECREF(__pyx_t_1);
   24123           0 :   __Pyx_XDECREF(__pyx_t_6);
   24124           0 :   __Pyx_XDECREF(__pyx_t_10);
   24125           0 :   __Pyx_XDECREF(__pyx_t_11);
   24126           0 :   __Pyx_XDECREF(__pyx_t_12);
   24127           0 :   __Pyx_AddTraceback("scipy.interpolate._interpnd.LinearNDInterpolator.__pyx_fused_cpdef", __pyx_clineno, __pyx_lineno, __pyx_filename);
   24128           0 :   __pyx_r = NULL;
   24129          33 :   __pyx_L0:;
   24130          33 :   __Pyx_XDECREF(__pyx_v_search_list);
   24131          33 :   __Pyx_XDECREF(__pyx_v_sigindex_node);
   24132          33 :   __Pyx_XDECREF(__pyx_v_dest_sig);
   24133          33 :   __Pyx_XDECREF(__pyx_v_arg);
   24134          33 :   __Pyx_XDECREF(__pyx_v_sig);
   24135          33 :   __Pyx_XDECREF(__pyx_v_sig_series);
   24136          33 :   __Pyx_XDECREF(__pyx_v_last_type);
   24137          33 :   __Pyx_XDECREF(__pyx_v_sig_type);
   24138          33 :   __Pyx_XDECREF(__pyx_v_sigindex_matches);
   24139          33 :   __Pyx_XDECREF(__pyx_v_sigindex_candidates);
   24140          33 :   __Pyx_XDECREF(__pyx_v_dst_type);
   24141          33 :   __Pyx_XDECREF(__pyx_v_found_matches);
   24142          33 :   __Pyx_XDECREF(__pyx_v_found_candidates);
   24143          33 :   __Pyx_XDECREF(__pyx_v_sn);
   24144          33 :   __Pyx_XDECREF(__pyx_v_type_match);
   24145          33 :   __Pyx_XDECREF(__pyx_v_candidates);
   24146          33 :   __Pyx_XDECREF(__pyx_v_kwargs);
   24147          33 :   __Pyx_XGIVEREF(__pyx_r);
   24148          33 :   __Pyx_RefNannyFinishContext();
   24149          33 :   return __pyx_r;
   24150             : }
   24151             : 
   24152             : /* Python wrapper */
   24153             : static PyObject *__pyx_fuse_0__pyx_pw_5scipy_11interpolate_9_interpnd_20LinearNDInterpolator_11_do_evaluate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
   24154             : static PyMethodDef __pyx_fuse_0__pyx_mdef_5scipy_11interpolate_9_interpnd_20LinearNDInterpolator_11_do_evaluate = {"__pyx_fuse_0_do_evaluate", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_fuse_0__pyx_pw_5scipy_11interpolate_9_interpnd_20LinearNDInterpolator_11_do_evaluate, METH_VARARGS|METH_KEYWORDS, 0};
   24155          23 : static PyObject *__pyx_fuse_0__pyx_pw_5scipy_11interpolate_9_interpnd_20LinearNDInterpolator_11_do_evaluate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   24156          23 :   PyObject *__pyx_v_self = 0;
   24157          23 :   __Pyx_memviewslice __pyx_v_xi = { 0, 0, { 0 }, { 0 }, { 0 } };
   24158          23 :   CYTHON_UNUSED double __pyx_v_dummy;
   24159          23 :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
   24160          23 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   24161          23 :   PyObject* values[3] = {0,0,0};
   24162          23 :   int __pyx_lineno = 0;
   24163          23 :   const char *__pyx_filename = NULL;
   24164          23 :   int __pyx_clineno = 0;
   24165          23 :   PyObject *__pyx_r = 0;
   24166             :   __Pyx_RefNannyDeclarations
   24167          23 :   __Pyx_RefNannySetupContext("_do_evaluate (wrapper)", 0);
   24168             :   #if CYTHON_ASSUME_SAFE_MACROS
   24169          23 :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
   24170             :   #else
   24171             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
   24172             :   #endif
   24173          23 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
   24174             :   {
   24175          23 :     PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_xi,&__pyx_n_s_dummy,0};
   24176          23 :     if (__pyx_kwds) {
   24177           0 :       Py_ssize_t kw_args;
   24178           0 :       switch (__pyx_nargs) {
   24179           0 :         case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
   24180           0 :         CYTHON_FALLTHROUGH;
   24181           0 :         case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
   24182           0 :         CYTHON_FALLTHROUGH;
   24183           0 :         case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
   24184           0 :         CYTHON_FALLTHROUGH;
   24185           0 :         case  0: break;
   24186           0 :         default: goto __pyx_L5_argtuple_error;
   24187             :       }
   24188           0 :       kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
   24189           0 :       switch (__pyx_nargs) {
   24190           0 :         case  0:
   24191           0 :         if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
   24192           0 :           (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
   24193           0 :           kw_args--;
   24194             :         }
   24195           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 314, __pyx_L3_error)
   24196           0 :         else goto __pyx_L5_argtuple_error;
   24197           0 :         CYTHON_FALLTHROUGH;
   24198             :         case  1:
   24199           0 :         if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_xi)) != 0)) {
   24200           0 :           (void)__Pyx_Arg_NewRef_VARARGS(values[1]);
   24201           0 :           kw_args--;
   24202             :         }
   24203           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 314, __pyx_L3_error)
   24204             :         else {
   24205           0 :           __Pyx_RaiseArgtupleInvalid("_do_evaluate", 1, 3, 3, 1); __PYX_ERR(0, 314, __pyx_L3_error)
   24206             :         }
   24207           0 :         CYTHON_FALLTHROUGH;
   24208             :         case  2:
   24209           0 :         if (likely((values[2] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_dummy)) != 0)) {
   24210           0 :           (void)__Pyx_Arg_NewRef_VARARGS(values[2]);
   24211           0 :           kw_args--;
   24212             :         }
   24213           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 314, __pyx_L3_error)
   24214             :         else {
   24215           0 :           __Pyx_RaiseArgtupleInvalid("_do_evaluate", 1, 3, 3, 2); __PYX_ERR(0, 314, __pyx_L3_error)
   24216             :         }
   24217             :       }
   24218           0 :       if (unlikely(kw_args > 0)) {
   24219           0 :         const Py_ssize_t kwd_pos_args = __pyx_nargs;
   24220           0 :         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_do_evaluate") < 0)) __PYX_ERR(0, 314, __pyx_L3_error)
   24221             :       }
   24222          23 :     } else if (unlikely(__pyx_nargs != 3)) {
   24223           0 :       goto __pyx_L5_argtuple_error;
   24224             :     } else {
   24225          23 :       values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
   24226          23 :       values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
   24227          23 :       values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
   24228             :     }
   24229          23 :     __pyx_v_self = values[0];
   24230          23 :     __pyx_v_xi = __Pyx_PyObject_to_MemoryviewSlice_d_dc_double__const__(values[1], 0); if (unlikely(!__pyx_v_xi.memview)) __PYX_ERR(0, 316, __pyx_L3_error)
   24231          23 :     __pyx_v_dummy = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_dummy == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 316, __pyx_L3_error)
   24232             :   }
   24233          23 :   goto __pyx_L6_skip;
   24234           0 :   __pyx_L5_argtuple_error:;
   24235           0 :   __Pyx_RaiseArgtupleInvalid("_do_evaluate", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 314, __pyx_L3_error)
   24236          23 :   __pyx_L6_skip:;
   24237          23 :   goto __pyx_L4_argument_unpacking_done;
   24238           0 :   __pyx_L3_error:;
   24239             :   {
   24240           0 :     Py_ssize_t __pyx_temp;
   24241           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   24242             :       __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
   24243             :     }
   24244             :   }
   24245           0 :   __PYX_XCLEAR_MEMVIEW(&__pyx_v_xi, 1);
   24246           0 :   __Pyx_AddTraceback("scipy.interpolate._interpnd.LinearNDInterpolator._do_evaluate", __pyx_clineno, __pyx_lineno, __pyx_filename);
   24247           0 :   __Pyx_RefNannyFinishContext();
   24248           0 :   return NULL;
   24249          23 :   __pyx_L4_argument_unpacking_done:;
   24250          23 :   __pyx_r = __pyx_pf_5scipy_11interpolate_9_interpnd_20LinearNDInterpolator_10_do_evaluate(__pyx_self, __pyx_v_self, __pyx_v_xi, __pyx_v_dummy);
   24251             : 
   24252             :   /* function exit code */
   24253          23 :   __PYX_XCLEAR_MEMVIEW(&__pyx_v_xi, 1);
   24254             :   {
   24255          23 :     Py_ssize_t __pyx_temp;
   24256          23 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   24257             :       __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
   24258             :     }
   24259             :   }
   24260             :   __Pyx_RefNannyFinishContext();
   24261             :   return __pyx_r;
   24262             : }
   24263             : 
   24264          23 : static PyObject *__pyx_pf_5scipy_11interpolate_9_interpnd_20LinearNDInterpolator_10_do_evaluate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, __Pyx_memviewslice __pyx_v_xi, CYTHON_UNUSED double __pyx_v_dummy) {
   24265          23 :   __Pyx_memviewslice __pyx_v_values = { 0, 0, { 0 }, { 0 }, { 0 } };
   24266          23 :   __Pyx_memviewslice __pyx_v_out = { 0, 0, { 0 }, { 0 }, { 0 } };
   24267          23 :   __Pyx_memviewslice __pyx_v_simplices = { 0, 0, { 0 }, { 0 }, { 0 } };
   24268          23 :   double __pyx_v_fill_value;
   24269          23 :   double __pyx_v_c[NPY_MAXDIMS];
   24270          23 :   int __pyx_v_i;
   24271          23 :   int __pyx_v_j;
   24272          23 :   int __pyx_v_k;
   24273          23 :   int __pyx_v_m;
   24274          23 :   int __pyx_v_ndim;
   24275          23 :   int __pyx_v_isimplex;
   24276          23 :   int __pyx_v_start;
   24277          23 :   int __pyx_v_nvalues;
   24278          23 :   __pyx_t_5scipy_7spatial_6_qhull_DelaunayInfo_t __pyx_v_info;
   24279          23 :   double __pyx_v_eps;
   24280          23 :   double __pyx_v_eps_broad;
   24281          23 :   PyObject *__pyx_r = NULL;
   24282             :   __Pyx_RefNannyDeclarations
   24283          23 :   PyObject *__pyx_t_1 = NULL;
   24284          23 :   __Pyx_memviewslice __pyx_t_2 = { 0, 0, { 0 }, { 0 }, { 0 } };
   24285          23 :   PyObject *__pyx_t_3 = NULL;
   24286          23 :   __Pyx_memviewslice __pyx_t_4 = { 0, 0, { 0 }, { 0 }, { 0 } };
   24287          23 :   double __pyx_t_5;
   24288          23 :   int __pyx_t_6;
   24289          23 :   PyObject *__pyx_t_7 = NULL;
   24290          23 :   PyObject *__pyx_t_8 = NULL;
   24291          23 :   PyObject *__pyx_t_9 = NULL;
   24292          23 :   __Pyx_memviewslice __pyx_t_10 = { 0, 0, { 0 }, { 0 }, { 0 } };
   24293          23 :   Py_ssize_t __pyx_t_11;
   24294          23 :   Py_ssize_t __pyx_t_12;
   24295          23 :   Py_ssize_t __pyx_t_13;
   24296          23 :   Py_ssize_t __pyx_t_14;
   24297          23 :   int __pyx_t_15;
   24298          23 :   int __pyx_t_16;
   24299          23 :   int __pyx_t_17;
   24300          23 :   int __pyx_t_18;
   24301          23 :   long __pyx_t_19;
   24302          23 :   long __pyx_t_20;
   24303          23 :   int __pyx_t_21;
   24304          23 :   Py_ssize_t __pyx_t_22;
   24305          23 :   Py_ssize_t __pyx_t_23;
   24306          23 :   Py_ssize_t __pyx_t_24;
   24307          23 :   Py_ssize_t __pyx_t_25;
   24308          23 :   int __pyx_lineno = 0;
   24309          23 :   const char *__pyx_filename = NULL;
   24310          23 :   int __pyx_clineno = 0;
   24311          23 :   __Pyx_RefNannySetupContext("__pyx_fuse_0_do_evaluate", 1);
   24312             : 
   24313             :   /* "scipy/interpolate/_interpnd.pyx":317
   24314             :  *     @cython.wraparound(False)
   24315             :  *     def _do_evaluate(self, const double[:,::1] xi, const double_or_complex dummy):
   24316             :  *         cdef const double_or_complex[:,::1] values = self.values             # <<<<<<<<<<<<<<
   24317             :  *         cdef double_or_complex[:,::1] out
   24318             :  *         cdef const int[:,::1] simplices = self.tri.simplices
   24319             :  */
   24320          23 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 317, __pyx_L1_error)
   24321          23 :   __Pyx_GOTREF(__pyx_t_1);
   24322          23 :   __pyx_t_2 = __Pyx_PyObject_to_MemoryviewSlice_d_dc_double__const__(__pyx_t_1, 0); if (unlikely(!__pyx_t_2.memview)) __PYX_ERR(0, 317, __pyx_L1_error)
   24323          23 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   24324          23 :   __pyx_v_values = __pyx_t_2;
   24325          23 :   __pyx_t_2.memview = NULL;
   24326          23 :   __pyx_t_2.data = NULL;
   24327             : 
   24328             :   /* "scipy/interpolate/_interpnd.pyx":319
   24329             :  *         cdef const double_or_complex[:,::1] values = self.values
   24330             :  *         cdef double_or_complex[:,::1] out
   24331             :  *         cdef const int[:,::1] simplices = self.tri.simplices             # <<<<<<<<<<<<<<
   24332             :  *         cdef double_or_complex fill_value
   24333             :  *         cdef double c[NPY_MAXDIMS]
   24334             :  */
   24335          23 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tri); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 319, __pyx_L1_error)
   24336          23 :   __Pyx_GOTREF(__pyx_t_1);
   24337          23 :   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_simplices); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 319, __pyx_L1_error)
   24338          23 :   __Pyx_GOTREF(__pyx_t_3);
   24339          23 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   24340          23 :   __pyx_t_4 = __Pyx_PyObject_to_MemoryviewSlice_d_dc_int__const__(__pyx_t_3, 0); if (unlikely(!__pyx_t_4.memview)) __PYX_ERR(0, 319, __pyx_L1_error)
   24341          23 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   24342          23 :   __pyx_v_simplices = __pyx_t_4;
   24343          23 :   __pyx_t_4.memview = NULL;
   24344          23 :   __pyx_t_4.data = NULL;
   24345             : 
   24346             :   /* "scipy/interpolate/_interpnd.pyx":326
   24347             :  *         cdef double eps, eps_broad
   24348             :  * 
   24349             :  *         ndim = xi.shape[1]             # <<<<<<<<<<<<<<
   24350             :  *         fill_value = self.fill_value
   24351             :  * 
   24352             :  */
   24353          23 :   __pyx_v_ndim = (__pyx_v_xi.shape[1]);
   24354             : 
   24355             :   /* "scipy/interpolate/_interpnd.pyx":327
   24356             :  * 
   24357             :  *         ndim = xi.shape[1]
   24358             :  *         fill_value = self.fill_value             # <<<<<<<<<<<<<<
   24359             :  * 
   24360             :  *         qhull._get_delaunay_info(&info, self.tri, 1, 0, 0)
   24361             :  */
   24362          23 :   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fill_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 327, __pyx_L1_error)
   24363          23 :   __Pyx_GOTREF(__pyx_t_3);
   24364          23 :   __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 327, __pyx_L1_error)
   24365          23 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   24366          23 :   __pyx_v_fill_value = __pyx_t_5;
   24367             : 
   24368             :   /* "scipy/interpolate/_interpnd.pyx":329
   24369             :  *         fill_value = self.fill_value
   24370             :  * 
   24371             :  *         qhull._get_delaunay_info(&info, self.tri, 1, 0, 0)             # <<<<<<<<<<<<<<
   24372             :  * 
   24373             :  *         out = np.empty((xi.shape[0], self.values.shape[1]),
   24374             :  */
   24375          23 :   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tri); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 329, __pyx_L1_error)
   24376          23 :   __Pyx_GOTREF(__pyx_t_3);
   24377          23 :   __pyx_t_6 = __pyx_f_5scipy_7spatial_6_qhull__get_delaunay_info((&__pyx_v_info), __pyx_t_3, 1, 0, 0); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 329, __pyx_L1_error)
   24378          23 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   24379             : 
   24380             :   /* "scipy/interpolate/_interpnd.pyx":331
   24381             :  *         qhull._get_delaunay_info(&info, self.tri, 1, 0, 0)
   24382             :  * 
   24383             :  *         out = np.empty((xi.shape[0], self.values.shape[1]),             # <<<<<<<<<<<<<<
   24384             :  *                        dtype=self.values.dtype)
   24385             :  *         nvalues = out.shape[1]
   24386             :  */
   24387          23 :   __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 331, __pyx_L1_error)
   24388          23 :   __Pyx_GOTREF(__pyx_t_3);
   24389          23 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 331, __pyx_L1_error)
   24390          23 :   __Pyx_GOTREF(__pyx_t_1);
   24391          23 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   24392          23 :   __pyx_t_3 = PyInt_FromSsize_t((__pyx_v_xi.shape[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 331, __pyx_L1_error)
   24393          23 :   __Pyx_GOTREF(__pyx_t_3);
   24394          23 :   __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_values); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 331, __pyx_L1_error)
   24395          23 :   __Pyx_GOTREF(__pyx_t_7);
   24396          23 :   __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_shape); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 331, __pyx_L1_error)
   24397          23 :   __Pyx_GOTREF(__pyx_t_8);
   24398          23 :   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   24399          23 :   __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_8, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 331, __pyx_L1_error)
   24400          23 :   __Pyx_GOTREF(__pyx_t_7);
   24401          23 :   __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   24402          23 :   __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 331, __pyx_L1_error)
   24403          23 :   __Pyx_GOTREF(__pyx_t_8);
   24404          23 :   __Pyx_GIVEREF(__pyx_t_3);
   24405          23 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3)) __PYX_ERR(0, 331, __pyx_L1_error);
   24406          23 :   __Pyx_GIVEREF(__pyx_t_7);
   24407          23 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_7)) __PYX_ERR(0, 331, __pyx_L1_error);
   24408          23 :   __pyx_t_3 = 0;
   24409          23 :   __pyx_t_7 = 0;
   24410          23 :   __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 331, __pyx_L1_error)
   24411          23 :   __Pyx_GOTREF(__pyx_t_7);
   24412          23 :   __Pyx_GIVEREF(__pyx_t_8);
   24413          23 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8)) __PYX_ERR(0, 331, __pyx_L1_error);
   24414          23 :   __pyx_t_8 = 0;
   24415             : 
   24416             :   /* "scipy/interpolate/_interpnd.pyx":332
   24417             :  * 
   24418             :  *         out = np.empty((xi.shape[0], self.values.shape[1]),
   24419             :  *                        dtype=self.values.dtype)             # <<<<<<<<<<<<<<
   24420             :  *         nvalues = out.shape[1]
   24421             :  * 
   24422             :  */
   24423          23 :   __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 332, __pyx_L1_error)
   24424          23 :   __Pyx_GOTREF(__pyx_t_8);
   24425          23 :   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_values); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 332, __pyx_L1_error)
   24426          23 :   __Pyx_GOTREF(__pyx_t_3);
   24427          23 :   __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_dtype); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 332, __pyx_L1_error)
   24428          23 :   __Pyx_GOTREF(__pyx_t_9);
   24429          23 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   24430          23 :   if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(0, 332, __pyx_L1_error)
   24431          23 :   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
   24432             : 
   24433             :   /* "scipy/interpolate/_interpnd.pyx":331
   24434             :  *         qhull._get_delaunay_info(&info, self.tri, 1, 0, 0)
   24435             :  * 
   24436             :  *         out = np.empty((xi.shape[0], self.values.shape[1]),             # <<<<<<<<<<<<<<
   24437             :  *                        dtype=self.values.dtype)
   24438             :  *         nvalues = out.shape[1]
   24439             :  */
   24440          23 :   __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 331, __pyx_L1_error)
   24441          23 :   __Pyx_GOTREF(__pyx_t_9);
   24442          23 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   24443          23 :   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   24444          23 :   __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   24445          23 :   __pyx_t_10 = __Pyx_PyObject_to_MemoryviewSlice_d_dc_double(__pyx_t_9, PyBUF_WRITABLE); if (unlikely(!__pyx_t_10.memview)) __PYX_ERR(0, 331, __pyx_L1_error)
   24446          23 :   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
   24447          23 :   __pyx_v_out = __pyx_t_10;
   24448          23 :   __pyx_t_10.memview = NULL;
   24449          23 :   __pyx_t_10.data = NULL;
   24450             : 
   24451             :   /* "scipy/interpolate/_interpnd.pyx":333
   24452             :  *         out = np.empty((xi.shape[0], self.values.shape[1]),
   24453             :  *                        dtype=self.values.dtype)
   24454             :  *         nvalues = out.shape[1]             # <<<<<<<<<<<<<<
   24455             :  * 
   24456             :  *         start = 0
   24457             :  */
   24458          23 :   __pyx_v_nvalues = (__pyx_v_out.shape[1]);
   24459             : 
   24460             :   /* "scipy/interpolate/_interpnd.pyx":335
   24461             :  *         nvalues = out.shape[1]
   24462             :  * 
   24463             :  *         start = 0             # <<<<<<<<<<<<<<
   24464             :  *         eps = 100 * DBL_EPSILON
   24465             :  *         eps_broad = sqrt(DBL_EPSILON)
   24466             :  */
   24467          23 :   __pyx_v_start = 0;
   24468             : 
   24469             :   /* "scipy/interpolate/_interpnd.pyx":336
   24470             :  * 
   24471             :  *         start = 0
   24472             :  *         eps = 100 * DBL_EPSILON             # <<<<<<<<<<<<<<
   24473             :  *         eps_broad = sqrt(DBL_EPSILON)
   24474             :  * 
   24475             :  */
   24476          23 :   __pyx_v_eps = (100.0 * DBL_EPSILON);
   24477             : 
   24478             :   /* "scipy/interpolate/_interpnd.pyx":337
   24479             :  *         start = 0
   24480             :  *         eps = 100 * DBL_EPSILON
   24481             :  *         eps_broad = sqrt(DBL_EPSILON)             # <<<<<<<<<<<<<<
   24482             :  * 
   24483             :  *         # NOTE: a nogil block segfaults here with Python 3.10
   24484             :  */
   24485          23 :   __pyx_v_eps_broad = sqrt(DBL_EPSILON);
   24486             : 
   24487             :   /* "scipy/interpolate/_interpnd.pyx":342
   24488             :  *         # and 3.11 on x86_64 Ubuntu Linux with gcc 9.x and 11.x
   24489             :  *         # and therefore nogil was disabled to fix gh-21885
   24490             :  *         for i in range(xi.shape[0]):             # <<<<<<<<<<<<<<
   24491             :  * 
   24492             :  *             # 1) Find the simplex
   24493             :  */
   24494          23 :   __pyx_t_11 = (__pyx_v_xi.shape[0]);
   24495          23 :   __pyx_t_12 = __pyx_t_11;
   24496       13627 :   for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_12; __pyx_t_6+=1) {
   24497       13604 :     __pyx_v_i = __pyx_t_6;
   24498             : 
   24499             :     /* "scipy/interpolate/_interpnd.pyx":347
   24500             :  * 
   24501             :  *             isimplex = qhull._find_simplex(&info, c,
   24502             :  *                                            &xi[0,0] + i*ndim,             # <<<<<<<<<<<<<<
   24503             :  *                                            &start, eps, eps_broad)
   24504             :  * 
   24505             :  */
   24506       13604 :     __pyx_t_13 = 0;
   24507       13604 :     __pyx_t_14 = 0;
   24508             : 
   24509             :     /* "scipy/interpolate/_interpnd.pyx":346
   24510             :  *             # 1) Find the simplex
   24511             :  * 
   24512             :  *             isimplex = qhull._find_simplex(&info, c,             # <<<<<<<<<<<<<<
   24513             :  *                                            &xi[0,0] + i*ndim,
   24514             :  *                                            &start, eps, eps_broad)
   24515             :  */
   24516       13604 :     __pyx_v_isimplex = __pyx_f_5scipy_7spatial_6_qhull__find_simplex((&__pyx_v_info), __pyx_v_c, ((&(*((double const  *) ( /* dim=1 */ ((char *) (((double const  *) ( /* dim=0 */ (__pyx_v_xi.data + __pyx_t_13 * __pyx_v_xi.strides[0]) )) + __pyx_t_14)) )))) + (__pyx_v_i * __pyx_v_ndim)), (&__pyx_v_start), __pyx_v_eps, __pyx_v_eps_broad);
   24517             : 
   24518             :     /* "scipy/interpolate/_interpnd.pyx":352
   24519             :  *             # 2) Linear barycentric interpolation
   24520             :  * 
   24521             :  *             if isimplex == -1:             # <<<<<<<<<<<<<<
   24522             :  *                 # don't extrapolate
   24523             :  *                 for k in range(nvalues):
   24524             :  */
   24525       13604 :     __pyx_t_15 = (__pyx_v_isimplex == -1L);
   24526       13604 :     if (__pyx_t_15) {
   24527             : 
   24528             :       /* "scipy/interpolate/_interpnd.pyx":354
   24529             :  *             if isimplex == -1:
   24530             :  *                 # don't extrapolate
   24531             :  *                 for k in range(nvalues):             # <<<<<<<<<<<<<<
   24532             :  *                     out[i,k] = fill_value
   24533             :  *                 continue
   24534             :  */
   24535       15764 :       __pyx_t_16 = __pyx_v_nvalues;
   24536             :       __pyx_t_17 = __pyx_t_16;
   24537       15764 :       for (__pyx_t_18 = 0; __pyx_t_18 < __pyx_t_17; __pyx_t_18+=1) {
   24538        7882 :         __pyx_v_k = __pyx_t_18;
   24539             : 
   24540             :         /* "scipy/interpolate/_interpnd.pyx":355
   24541             :  *                 # don't extrapolate
   24542             :  *                 for k in range(nvalues):
   24543             :  *                     out[i,k] = fill_value             # <<<<<<<<<<<<<<
   24544             :  *                 continue
   24545             :  * 
   24546             :  */
   24547        7882 :         __pyx_t_14 = __pyx_v_i;
   24548        7882 :         __pyx_t_13 = __pyx_v_k;
   24549        7882 :         *((double *) ( /* dim=1 */ ((char *) (((double *) ( /* dim=0 */ (__pyx_v_out.data + __pyx_t_14 * __pyx_v_out.strides[0]) )) + __pyx_t_13)) )) = __pyx_v_fill_value;
   24550             :       }
   24551             : 
   24552             :       /* "scipy/interpolate/_interpnd.pyx":356
   24553             :  *                 for k in range(nvalues):
   24554             :  *                     out[i,k] = fill_value
   24555             :  *                 continue             # <<<<<<<<<<<<<<
   24556             :  * 
   24557             :  *             for k in range(nvalues):
   24558             :  */
   24559        7882 :       goto __pyx_L3_continue;
   24560             : 
   24561             :       /* "scipy/interpolate/_interpnd.pyx":352
   24562             :  *             # 2) Linear barycentric interpolation
   24563             :  * 
   24564             :  *             if isimplex == -1:             # <<<<<<<<<<<<<<
   24565             :  *                 # don't extrapolate
   24566             :  *                 for k in range(nvalues):
   24567             :  */
   24568             :     }
   24569             : 
   24570             :     /* "scipy/interpolate/_interpnd.pyx":358
   24571             :  *                 continue
   24572             :  * 
   24573             :  *             for k in range(nvalues):             # <<<<<<<<<<<<<<
   24574             :  *                 out[i,k] = 0
   24575             :  * 
   24576             :  */
   24577       11464 :     __pyx_t_16 = __pyx_v_nvalues;
   24578             :     __pyx_t_17 = __pyx_t_16;
   24579       11464 :     for (__pyx_t_18 = 0; __pyx_t_18 < __pyx_t_17; __pyx_t_18+=1) {
   24580        5742 :       __pyx_v_k = __pyx_t_18;
   24581             : 
   24582             :       /* "scipy/interpolate/_interpnd.pyx":359
   24583             :  * 
   24584             :  *             for k in range(nvalues):
   24585             :  *                 out[i,k] = 0             # <<<<<<<<<<<<<<
   24586             :  * 
   24587             :  *             for j in range(ndim+1):
   24588             :  */
   24589        5742 :       __pyx_t_13 = __pyx_v_i;
   24590        5742 :       __pyx_t_14 = __pyx_v_k;
   24591        5742 :       *((double *) ( /* dim=1 */ ((char *) (((double *) ( /* dim=0 */ (__pyx_v_out.data + __pyx_t_13 * __pyx_v_out.strides[0]) )) + __pyx_t_14)) )) = 0.0;
   24592             :     }
   24593             : 
   24594             :     /* "scipy/interpolate/_interpnd.pyx":361
   24595             :  *                 out[i,k] = 0
   24596             :  * 
   24597             :  *             for j in range(ndim+1):             # <<<<<<<<<<<<<<
   24598             :  *                 for k in range(nvalues):
   24599             :  *                     m = simplices[isimplex,j]
   24600             :  */
   24601        5722 :     __pyx_t_19 = (__pyx_v_ndim + 1);
   24602        5722 :     __pyx_t_20 = __pyx_t_19;
   24603       22894 :     for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_20; __pyx_t_16+=1) {
   24604             :       __pyx_v_j = __pyx_t_16;
   24605             : 
   24606             :       /* "scipy/interpolate/_interpnd.pyx":362
   24607             :  * 
   24608             :  *             for j in range(ndim+1):
   24609             :  *                 for k in range(nvalues):             # <<<<<<<<<<<<<<
   24610             :  *                     m = simplices[isimplex,j]
   24611             :  *                     out[i,k] = out[i,k] + c[j] * values[m,k]
   24612             :  */
   24613             :       __pyx_t_17 = __pyx_v_nvalues;
   24614       34404 :       __pyx_t_18 = __pyx_t_17;
   24615       34404 :       for (__pyx_t_21 = 0; __pyx_t_21 < __pyx_t_18; __pyx_t_21+=1) {
   24616       17232 :         __pyx_v_k = __pyx_t_21;
   24617             : 
   24618             :         /* "scipy/interpolate/_interpnd.pyx":363
   24619             :  *             for j in range(ndim+1):
   24620             :  *                 for k in range(nvalues):
   24621             :  *                     m = simplices[isimplex,j]             # <<<<<<<<<<<<<<
   24622             :  *                     out[i,k] = out[i,k] + c[j] * values[m,k]
   24623             :  * 
   24624             :  */
   24625       17232 :         __pyx_t_14 = __pyx_v_isimplex;
   24626       17232 :         __pyx_t_13 = __pyx_v_j;
   24627       17232 :         __pyx_v_m = (*((int const  *) ( /* dim=1 */ ((char *) (((int const  *) ( /* dim=0 */ (__pyx_v_simplices.data + __pyx_t_14 * __pyx_v_simplices.strides[0]) )) + __pyx_t_13)) )));
   24628             : 
   24629             :         /* "scipy/interpolate/_interpnd.pyx":364
   24630             :  *                 for k in range(nvalues):
   24631             :  *                     m = simplices[isimplex,j]
   24632             :  *                     out[i,k] = out[i,k] + c[j] * values[m,k]             # <<<<<<<<<<<<<<
   24633             :  * 
   24634             :  *         return out
   24635             :  */
   24636       17232 :         __pyx_t_13 = __pyx_v_i;
   24637       17232 :         __pyx_t_14 = __pyx_v_k;
   24638       17232 :         __pyx_t_22 = __pyx_v_m;
   24639       17232 :         __pyx_t_23 = __pyx_v_k;
   24640       17232 :         __pyx_t_24 = __pyx_v_i;
   24641       17232 :         __pyx_t_25 = __pyx_v_k;
   24642       17232 :         *((double *) ( /* dim=1 */ ((char *) (((double *) ( /* dim=0 */ (__pyx_v_out.data + __pyx_t_24 * __pyx_v_out.strides[0]) )) + __pyx_t_25)) )) = ((*((double *) ( /* dim=1 */ ((char *) (((double *) ( /* dim=0 */ (__pyx_v_out.data + __pyx_t_13 * __pyx_v_out.strides[0]) )) + __pyx_t_14)) ))) + ((__pyx_v_c[__pyx_v_j]) * (*((double const  *) ( /* dim=1 */ ((char *) (((double const  *) ( /* dim=0 */ (__pyx_v_values.data + __pyx_t_22 * __pyx_v_values.strides[0]) )) + __pyx_t_23)) )))));
   24643             :       }
   24644             :     }
   24645       13604 :     __pyx_L3_continue:;
   24646             :   }
   24647             : 
   24648             :   /* "scipy/interpolate/_interpnd.pyx":366
   24649             :  *                     out[i,k] = out[i,k] + c[j] * values[m,k]
   24650             :  * 
   24651             :  *         return out             # <<<<<<<<<<<<<<
   24652             :  * 
   24653             :  * 
   24654             :  */
   24655          23 :   __Pyx_XDECREF(__pyx_r);
   24656          23 :   __pyx_t_9 = __pyx_memoryview_fromslice(__pyx_v_out, 2, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 366, __pyx_L1_error)
   24657          23 :   __Pyx_GOTREF(__pyx_t_9);
   24658          23 :   __pyx_r = __pyx_t_9;
   24659          23 :   __pyx_t_9 = 0;
   24660          23 :   goto __pyx_L0;
   24661             : 
   24662             :   /* "scipy/interpolate/_interpnd.pyx":314
   24663             :  *         return self._do_evaluate(xi, 1.0j)
   24664             :  * 
   24665             :  *     @cython.boundscheck(False)             # <<<<<<<<<<<<<<
   24666             :  *     @cython.wraparound(False)
   24667             :  *     def _do_evaluate(self, const double[:,::1] xi, const double_or_complex dummy):
   24668             :  */
   24669             : 
   24670             :   /* function exit code */
   24671           0 :   __pyx_L1_error:;
   24672           0 :   __Pyx_XDECREF(__pyx_t_1);
   24673           0 :   __PYX_XCLEAR_MEMVIEW(&__pyx_t_2, 1);
   24674           0 :   __Pyx_XDECREF(__pyx_t_3);
   24675           0 :   __PYX_XCLEAR_MEMVIEW(&__pyx_t_4, 1);
   24676           0 :   __Pyx_XDECREF(__pyx_t_7);
   24677           0 :   __Pyx_XDECREF(__pyx_t_8);
   24678           0 :   __Pyx_XDECREF(__pyx_t_9);
   24679           0 :   __PYX_XCLEAR_MEMVIEW(&__pyx_t_10, 1);
   24680           0 :   __Pyx_AddTraceback("scipy.interpolate._interpnd.LinearNDInterpolator._do_evaluate", __pyx_clineno, __pyx_lineno, __pyx_filename);
   24681           0 :   __pyx_r = NULL;
   24682          23 :   __pyx_L0:;
   24683          23 :   __PYX_XCLEAR_MEMVIEW(&__pyx_v_values, 1);
   24684          23 :   __PYX_XCLEAR_MEMVIEW(&__pyx_v_out, 1);
   24685          23 :   __PYX_XCLEAR_MEMVIEW(&__pyx_v_simplices, 1);
   24686          23 :   __Pyx_XGIVEREF(__pyx_r);
   24687          23 :   __Pyx_RefNannyFinishContext();
   24688          23 :   return __pyx_r;
   24689             : }
   24690             : 
   24691             : /* Python wrapper */
   24692             : static PyObject *__pyx_fuse_1__pyx_pw_5scipy_11interpolate_9_interpnd_20LinearNDInterpolator_13_do_evaluate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
   24693             : static PyMethodDef __pyx_fuse_1__pyx_mdef_5scipy_11interpolate_9_interpnd_20LinearNDInterpolator_13_do_evaluate = {"__pyx_fuse_1_do_evaluate", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_fuse_1__pyx_pw_5scipy_11interpolate_9_interpnd_20LinearNDInterpolator_13_do_evaluate, METH_VARARGS|METH_KEYWORDS, 0};
   24694          10 : static PyObject *__pyx_fuse_1__pyx_pw_5scipy_11interpolate_9_interpnd_20LinearNDInterpolator_13_do_evaluate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   24695          10 :   PyObject *__pyx_v_self = 0;
   24696          10 :   __Pyx_memviewslice __pyx_v_xi = { 0, 0, { 0 }, { 0 }, { 0 } };
   24697          10 :   CYTHON_UNUSED __pyx_t_double_complex __pyx_v_dummy;
   24698          10 :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
   24699          10 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   24700          10 :   PyObject* values[3] = {0,0,0};
   24701          10 :   int __pyx_lineno = 0;
   24702          10 :   const char *__pyx_filename = NULL;
   24703          10 :   int __pyx_clineno = 0;
   24704          10 :   PyObject *__pyx_r = 0;
   24705             :   __Pyx_RefNannyDeclarations
   24706          10 :   __Pyx_RefNannySetupContext("_do_evaluate (wrapper)", 0);
   24707             :   #if CYTHON_ASSUME_SAFE_MACROS
   24708          10 :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
   24709             :   #else
   24710             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
   24711             :   #endif
   24712          10 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
   24713             :   {
   24714          10 :     PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_xi,&__pyx_n_s_dummy,0};
   24715          10 :     if (__pyx_kwds) {
   24716           0 :       Py_ssize_t kw_args;
   24717           0 :       switch (__pyx_nargs) {
   24718           0 :         case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
   24719           0 :         CYTHON_FALLTHROUGH;
   24720           0 :         case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
   24721           0 :         CYTHON_FALLTHROUGH;
   24722           0 :         case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
   24723           0 :         CYTHON_FALLTHROUGH;
   24724           0 :         case  0: break;
   24725           0 :         default: goto __pyx_L5_argtuple_error;
   24726             :       }
   24727           0 :       kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
   24728           0 :       switch (__pyx_nargs) {
   24729           0 :         case  0:
   24730           0 :         if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
   24731           0 :           (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
   24732           0 :           kw_args--;
   24733             :         }
   24734           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 314, __pyx_L3_error)
   24735           0 :         else goto __pyx_L5_argtuple_error;
   24736           0 :         CYTHON_FALLTHROUGH;
   24737             :         case  1:
   24738           0 :         if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_xi)) != 0)) {
   24739           0 :           (void)__Pyx_Arg_NewRef_VARARGS(values[1]);
   24740           0 :           kw_args--;
   24741             :         }
   24742           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 314, __pyx_L3_error)
   24743             :         else {
   24744           0 :           __Pyx_RaiseArgtupleInvalid("_do_evaluate", 1, 3, 3, 1); __PYX_ERR(0, 314, __pyx_L3_error)
   24745             :         }
   24746           0 :         CYTHON_FALLTHROUGH;
   24747             :         case  2:
   24748           0 :         if (likely((values[2] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_dummy)) != 0)) {
   24749           0 :           (void)__Pyx_Arg_NewRef_VARARGS(values[2]);
   24750           0 :           kw_args--;
   24751             :         }
   24752           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 314, __pyx_L3_error)
   24753             :         else {
   24754           0 :           __Pyx_RaiseArgtupleInvalid("_do_evaluate", 1, 3, 3, 2); __PYX_ERR(0, 314, __pyx_L3_error)
   24755             :         }
   24756             :       }
   24757           0 :       if (unlikely(kw_args > 0)) {
   24758           0 :         const Py_ssize_t kwd_pos_args = __pyx_nargs;
   24759           0 :         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_do_evaluate") < 0)) __PYX_ERR(0, 314, __pyx_L3_error)
   24760             :       }
   24761          10 :     } else if (unlikely(__pyx_nargs != 3)) {
   24762           0 :       goto __pyx_L5_argtuple_error;
   24763             :     } else {
   24764          10 :       values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
   24765          10 :       values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
   24766          10 :       values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
   24767             :     }
   24768          10 :     __pyx_v_self = values[0];
   24769          10 :     __pyx_v_xi = __Pyx_PyObject_to_MemoryviewSlice_d_dc_double__const__(values[1], 0); if (unlikely(!__pyx_v_xi.memview)) __PYX_ERR(0, 316, __pyx_L3_error)
   24770          10 :     __pyx_v_dummy = __Pyx_PyComplex_As___pyx_t_double_complex(values[2]); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 316, __pyx_L3_error)
   24771             :   }
   24772          10 :   goto __pyx_L6_skip;
   24773           0 :   __pyx_L5_argtuple_error:;
   24774           0 :   __Pyx_RaiseArgtupleInvalid("_do_evaluate", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 314, __pyx_L3_error)
   24775          10 :   __pyx_L6_skip:;
   24776          10 :   goto __pyx_L4_argument_unpacking_done;
   24777           0 :   __pyx_L3_error:;
   24778             :   {
   24779           0 :     Py_ssize_t __pyx_temp;
   24780           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   24781             :       __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
   24782             :     }
   24783             :   }
   24784           0 :   __PYX_XCLEAR_MEMVIEW(&__pyx_v_xi, 1);
   24785           0 :   __Pyx_AddTraceback("scipy.interpolate._interpnd.LinearNDInterpolator._do_evaluate", __pyx_clineno, __pyx_lineno, __pyx_filename);
   24786           0 :   __Pyx_RefNannyFinishContext();
   24787           0 :   return NULL;
   24788          10 :   __pyx_L4_argument_unpacking_done:;
   24789          10 :   __pyx_r = __pyx_pf_5scipy_11interpolate_9_interpnd_20LinearNDInterpolator_12_do_evaluate(__pyx_self, __pyx_v_self, __pyx_v_xi, __pyx_v_dummy);
   24790             : 
   24791             :   /* function exit code */
   24792          10 :   __PYX_XCLEAR_MEMVIEW(&__pyx_v_xi, 1);
   24793             :   {
   24794          10 :     Py_ssize_t __pyx_temp;
   24795          10 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   24796             :       __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
   24797             :     }
   24798             :   }
   24799             :   __Pyx_RefNannyFinishContext();
   24800             :   return __pyx_r;
   24801             : }
   24802             : 
   24803          10 : static PyObject *__pyx_pf_5scipy_11interpolate_9_interpnd_20LinearNDInterpolator_12_do_evaluate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, __Pyx_memviewslice __pyx_v_xi, CYTHON_UNUSED __pyx_t_double_complex __pyx_v_dummy) {
   24804          10 :   __Pyx_memviewslice __pyx_v_values = { 0, 0, { 0 }, { 0 }, { 0 } };
   24805          10 :   __Pyx_memviewslice __pyx_v_out = { 0, 0, { 0 }, { 0 }, { 0 } };
   24806          10 :   __Pyx_memviewslice __pyx_v_simplices = { 0, 0, { 0 }, { 0 }, { 0 } };
   24807          10 :   __pyx_t_double_complex __pyx_v_fill_value;
   24808          10 :   double __pyx_v_c[NPY_MAXDIMS];
   24809          10 :   int __pyx_v_i;
   24810          10 :   int __pyx_v_j;
   24811          10 :   int __pyx_v_k;
   24812          10 :   int __pyx_v_m;
   24813          10 :   int __pyx_v_ndim;
   24814          10 :   int __pyx_v_isimplex;
   24815          10 :   int __pyx_v_start;
   24816          10 :   int __pyx_v_nvalues;
   24817          10 :   __pyx_t_5scipy_7spatial_6_qhull_DelaunayInfo_t __pyx_v_info;
   24818          10 :   double __pyx_v_eps;
   24819          10 :   double __pyx_v_eps_broad;
   24820          10 :   PyObject *__pyx_r = NULL;
   24821             :   __Pyx_RefNannyDeclarations
   24822          10 :   PyObject *__pyx_t_1 = NULL;
   24823          10 :   __Pyx_memviewslice __pyx_t_2 = { 0, 0, { 0 }, { 0 }, { 0 } };
   24824          10 :   PyObject *__pyx_t_3 = NULL;
   24825          10 :   __Pyx_memviewslice __pyx_t_4 = { 0, 0, { 0 }, { 0 }, { 0 } };
   24826          10 :   __pyx_t_double_complex __pyx_t_5;
   24827          10 :   int __pyx_t_6;
   24828          10 :   PyObject *__pyx_t_7 = NULL;
   24829          10 :   PyObject *__pyx_t_8 = NULL;
   24830          10 :   PyObject *__pyx_t_9 = NULL;
   24831          10 :   __Pyx_memviewslice __pyx_t_10 = { 0, 0, { 0 }, { 0 }, { 0 } };
   24832          10 :   Py_ssize_t __pyx_t_11;
   24833          10 :   Py_ssize_t __pyx_t_12;
   24834          10 :   Py_ssize_t __pyx_t_13;
   24835          10 :   Py_ssize_t __pyx_t_14;
   24836          10 :   int __pyx_t_15;
   24837          10 :   int __pyx_t_16;
   24838          10 :   int __pyx_t_17;
   24839          10 :   int __pyx_t_18;
   24840          10 :   long __pyx_t_19;
   24841          10 :   long __pyx_t_20;
   24842          10 :   int __pyx_t_21;
   24843          10 :   Py_ssize_t __pyx_t_22;
   24844          10 :   Py_ssize_t __pyx_t_23;
   24845          10 :   Py_ssize_t __pyx_t_24;
   24846          10 :   Py_ssize_t __pyx_t_25;
   24847          10 :   int __pyx_lineno = 0;
   24848          10 :   const char *__pyx_filename = NULL;
   24849          10 :   int __pyx_clineno = 0;
   24850          10 :   __Pyx_RefNannySetupContext("__pyx_fuse_1_do_evaluate", 1);
   24851             : 
   24852             :   /* "scipy/interpolate/_interpnd.pyx":317
   24853             :  *     @cython.wraparound(False)
   24854             :  *     def _do_evaluate(self, const double[:,::1] xi, const double_or_complex dummy):
   24855             :  *         cdef const double_or_complex[:,::1] values = self.values             # <<<<<<<<<<<<<<
   24856             :  *         cdef double_or_complex[:,::1] out
   24857             :  *         cdef const int[:,::1] simplices = self.tri.simplices
   24858             :  */
   24859          10 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 317, __pyx_L1_error)
   24860          10 :   __Pyx_GOTREF(__pyx_t_1);
   24861          10 :   __pyx_t_2 = __Pyx_PyObject_to_MemoryviewSlice_d_dc___pyx_t_double_complex__const__(__pyx_t_1, 0); if (unlikely(!__pyx_t_2.memview)) __PYX_ERR(0, 317, __pyx_L1_error)
   24862          10 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   24863          10 :   __pyx_v_values = __pyx_t_2;
   24864          10 :   __pyx_t_2.memview = NULL;
   24865          10 :   __pyx_t_2.data = NULL;
   24866             : 
   24867             :   /* "scipy/interpolate/_interpnd.pyx":319
   24868             :  *         cdef const double_or_complex[:,::1] values = self.values
   24869             :  *         cdef double_or_complex[:,::1] out
   24870             :  *         cdef const int[:,::1] simplices = self.tri.simplices             # <<<<<<<<<<<<<<
   24871             :  *         cdef double_or_complex fill_value
   24872             :  *         cdef double c[NPY_MAXDIMS]
   24873             :  */
   24874          10 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tri); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 319, __pyx_L1_error)
   24875          10 :   __Pyx_GOTREF(__pyx_t_1);
   24876          10 :   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_simplices); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 319, __pyx_L1_error)
   24877          10 :   __Pyx_GOTREF(__pyx_t_3);
   24878          10 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   24879          10 :   __pyx_t_4 = __Pyx_PyObject_to_MemoryviewSlice_d_dc_int__const__(__pyx_t_3, 0); if (unlikely(!__pyx_t_4.memview)) __PYX_ERR(0, 319, __pyx_L1_error)
   24880          10 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   24881          10 :   __pyx_v_simplices = __pyx_t_4;
   24882          10 :   __pyx_t_4.memview = NULL;
   24883          10 :   __pyx_t_4.data = NULL;
   24884             : 
   24885             :   /* "scipy/interpolate/_interpnd.pyx":326
   24886             :  *         cdef double eps, eps_broad
   24887             :  * 
   24888             :  *         ndim = xi.shape[1]             # <<<<<<<<<<<<<<
   24889             :  *         fill_value = self.fill_value
   24890             :  * 
   24891             :  */
   24892          10 :   __pyx_v_ndim = (__pyx_v_xi.shape[1]);
   24893             : 
   24894             :   /* "scipy/interpolate/_interpnd.pyx":327
   24895             :  * 
   24896             :  *         ndim = xi.shape[1]
   24897             :  *         fill_value = self.fill_value             # <<<<<<<<<<<<<<
   24898             :  * 
   24899             :  *         qhull._get_delaunay_info(&info, self.tri, 1, 0, 0)
   24900             :  */
   24901          10 :   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fill_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 327, __pyx_L1_error)
   24902          10 :   __Pyx_GOTREF(__pyx_t_3);
   24903          10 :   __pyx_t_5 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_3); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 327, __pyx_L1_error)
   24904          10 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   24905          10 :   __pyx_v_fill_value = __pyx_t_5;
   24906             : 
   24907             :   /* "scipy/interpolate/_interpnd.pyx":329
   24908             :  *         fill_value = self.fill_value
   24909             :  * 
   24910             :  *         qhull._get_delaunay_info(&info, self.tri, 1, 0, 0)             # <<<<<<<<<<<<<<
   24911             :  * 
   24912             :  *         out = np.empty((xi.shape[0], self.values.shape[1]),
   24913             :  */
   24914          10 :   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tri); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 329, __pyx_L1_error)
   24915          10 :   __Pyx_GOTREF(__pyx_t_3);
   24916          10 :   __pyx_t_6 = __pyx_f_5scipy_7spatial_6_qhull__get_delaunay_info((&__pyx_v_info), __pyx_t_3, 1, 0, 0); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 329, __pyx_L1_error)
   24917          10 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   24918             : 
   24919             :   /* "scipy/interpolate/_interpnd.pyx":331
   24920             :  *         qhull._get_delaunay_info(&info, self.tri, 1, 0, 0)
   24921             :  * 
   24922             :  *         out = np.empty((xi.shape[0], self.values.shape[1]),             # <<<<<<<<<<<<<<
   24923             :  *                        dtype=self.values.dtype)
   24924             :  *         nvalues = out.shape[1]
   24925             :  */
   24926          10 :   __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 331, __pyx_L1_error)
   24927          10 :   __Pyx_GOTREF(__pyx_t_3);
   24928          10 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 331, __pyx_L1_error)
   24929          10 :   __Pyx_GOTREF(__pyx_t_1);
   24930          10 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   24931          10 :   __pyx_t_3 = PyInt_FromSsize_t((__pyx_v_xi.shape[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 331, __pyx_L1_error)
   24932          10 :   __Pyx_GOTREF(__pyx_t_3);
   24933          10 :   __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_values); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 331, __pyx_L1_error)
   24934          10 :   __Pyx_GOTREF(__pyx_t_7);
   24935          10 :   __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_shape); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 331, __pyx_L1_error)
   24936          10 :   __Pyx_GOTREF(__pyx_t_8);
   24937          10 :   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   24938          10 :   __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_8, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 331, __pyx_L1_error)
   24939          10 :   __Pyx_GOTREF(__pyx_t_7);
   24940          10 :   __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   24941          10 :   __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 331, __pyx_L1_error)
   24942          10 :   __Pyx_GOTREF(__pyx_t_8);
   24943          10 :   __Pyx_GIVEREF(__pyx_t_3);
   24944          10 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3)) __PYX_ERR(0, 331, __pyx_L1_error);
   24945          10 :   __Pyx_GIVEREF(__pyx_t_7);
   24946          10 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_7)) __PYX_ERR(0, 331, __pyx_L1_error);
   24947          10 :   __pyx_t_3 = 0;
   24948          10 :   __pyx_t_7 = 0;
   24949          10 :   __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 331, __pyx_L1_error)
   24950          10 :   __Pyx_GOTREF(__pyx_t_7);
   24951          10 :   __Pyx_GIVEREF(__pyx_t_8);
   24952          10 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8)) __PYX_ERR(0, 331, __pyx_L1_error);
   24953          10 :   __pyx_t_8 = 0;
   24954             : 
   24955             :   /* "scipy/interpolate/_interpnd.pyx":332
   24956             :  * 
   24957             :  *         out = np.empty((xi.shape[0], self.values.shape[1]),
   24958             :  *                        dtype=self.values.dtype)             # <<<<<<<<<<<<<<
   24959             :  *         nvalues = out.shape[1]
   24960             :  * 
   24961             :  */
   24962          10 :   __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 332, __pyx_L1_error)
   24963          10 :   __Pyx_GOTREF(__pyx_t_8);
   24964          10 :   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_values); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 332, __pyx_L1_error)
   24965          10 :   __Pyx_GOTREF(__pyx_t_3);
   24966          10 :   __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_dtype); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 332, __pyx_L1_error)
   24967          10 :   __Pyx_GOTREF(__pyx_t_9);
   24968          10 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   24969          10 :   if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(0, 332, __pyx_L1_error)
   24970          10 :   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
   24971             : 
   24972             :   /* "scipy/interpolate/_interpnd.pyx":331
   24973             :  *         qhull._get_delaunay_info(&info, self.tri, 1, 0, 0)
   24974             :  * 
   24975             :  *         out = np.empty((xi.shape[0], self.values.shape[1]),             # <<<<<<<<<<<<<<
   24976             :  *                        dtype=self.values.dtype)
   24977             :  *         nvalues = out.shape[1]
   24978             :  */
   24979          10 :   __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 331, __pyx_L1_error)
   24980          10 :   __Pyx_GOTREF(__pyx_t_9);
   24981          10 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   24982          10 :   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   24983          10 :   __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   24984          10 :   __pyx_t_10 = __Pyx_PyObject_to_MemoryviewSlice_d_dc___pyx_t_double_complex(__pyx_t_9, PyBUF_WRITABLE); if (unlikely(!__pyx_t_10.memview)) __PYX_ERR(0, 331, __pyx_L1_error)
   24985          10 :   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
   24986          10 :   __pyx_v_out = __pyx_t_10;
   24987          10 :   __pyx_t_10.memview = NULL;
   24988          10 :   __pyx_t_10.data = NULL;
   24989             : 
   24990             :   /* "scipy/interpolate/_interpnd.pyx":333
   24991             :  *         out = np.empty((xi.shape[0], self.values.shape[1]),
   24992             :  *                        dtype=self.values.dtype)
   24993             :  *         nvalues = out.shape[1]             # <<<<<<<<<<<<<<
   24994             :  * 
   24995             :  *         start = 0
   24996             :  */
   24997          10 :   __pyx_v_nvalues = (__pyx_v_out.shape[1]);
   24998             : 
   24999             :   /* "scipy/interpolate/_interpnd.pyx":335
   25000             :  *         nvalues = out.shape[1]
   25001             :  * 
   25002             :  *         start = 0             # <<<<<<<<<<<<<<
   25003             :  *         eps = 100 * DBL_EPSILON
   25004             :  *         eps_broad = sqrt(DBL_EPSILON)
   25005             :  */
   25006          10 :   __pyx_v_start = 0;
   25007             : 
   25008             :   /* "scipy/interpolate/_interpnd.pyx":336
   25009             :  * 
   25010             :  *         start = 0
   25011             :  *         eps = 100 * DBL_EPSILON             # <<<<<<<<<<<<<<
   25012             :  *         eps_broad = sqrt(DBL_EPSILON)
   25013             :  * 
   25014             :  */
   25015          10 :   __pyx_v_eps = (100.0 * DBL_EPSILON);
   25016             : 
   25017             :   /* "scipy/interpolate/_interpnd.pyx":337
   25018             :  *         start = 0
   25019             :  *         eps = 100 * DBL_EPSILON
   25020             :  *         eps_broad = sqrt(DBL_EPSILON)             # <<<<<<<<<<<<<<
   25021             :  * 
   25022             :  *         # NOTE: a nogil block segfaults here with Python 3.10
   25023             :  */
   25024          10 :   __pyx_v_eps_broad = sqrt(DBL_EPSILON);
   25025             : 
   25026             :   /* "scipy/interpolate/_interpnd.pyx":342
   25027             :  *         # and 3.11 on x86_64 Ubuntu Linux with gcc 9.x and 11.x
   25028             :  *         # and therefore nogil was disabled to fix gh-21885
   25029             :  *         for i in range(xi.shape[0]):             # <<<<<<<<<<<<<<
   25030             :  * 
   25031             :  *             # 1) Find the simplex
   25032             :  */
   25033          10 :   __pyx_t_11 = (__pyx_v_xi.shape[0]);
   25034          10 :   __pyx_t_12 = __pyx_t_11;
   25035          64 :   for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_12; __pyx_t_6+=1) {
   25036          54 :     __pyx_v_i = __pyx_t_6;
   25037             : 
   25038             :     /* "scipy/interpolate/_interpnd.pyx":347
   25039             :  * 
   25040             :  *             isimplex = qhull._find_simplex(&info, c,
   25041             :  *                                            &xi[0,0] + i*ndim,             # <<<<<<<<<<<<<<
   25042             :  *                                            &start, eps, eps_broad)
   25043             :  * 
   25044             :  */
   25045          54 :     __pyx_t_13 = 0;
   25046          54 :     __pyx_t_14 = 0;
   25047             : 
   25048             :     /* "scipy/interpolate/_interpnd.pyx":346
   25049             :  *             # 1) Find the simplex
   25050             :  * 
   25051             :  *             isimplex = qhull._find_simplex(&info, c,             # <<<<<<<<<<<<<<
   25052             :  *                                            &xi[0,0] + i*ndim,
   25053             :  *                                            &start, eps, eps_broad)
   25054             :  */
   25055          54 :     __pyx_v_isimplex = __pyx_f_5scipy_7spatial_6_qhull__find_simplex((&__pyx_v_info), __pyx_v_c, ((&(*((double const  *) ( /* dim=1 */ ((char *) (((double const  *) ( /* dim=0 */ (__pyx_v_xi.data + __pyx_t_13 * __pyx_v_xi.strides[0]) )) + __pyx_t_14)) )))) + (__pyx_v_i * __pyx_v_ndim)), (&__pyx_v_start), __pyx_v_eps, __pyx_v_eps_broad);
   25056             : 
   25057             :     /* "scipy/interpolate/_interpnd.pyx":352
   25058             :  *             # 2) Linear barycentric interpolation
   25059             :  * 
   25060             :  *             if isimplex == -1:             # <<<<<<<<<<<<<<
   25061             :  *                 # don't extrapolate
   25062             :  *                 for k in range(nvalues):
   25063             :  */
   25064          54 :     __pyx_t_15 = (__pyx_v_isimplex == -1L);
   25065          54 :     if (__pyx_t_15) {
   25066             : 
   25067             :       /* "scipy/interpolate/_interpnd.pyx":354
   25068             :  *             if isimplex == -1:
   25069             :  *                 # don't extrapolate
   25070             :  *                 for k in range(nvalues):             # <<<<<<<<<<<<<<
   25071             :  *                     out[i,k] = fill_value
   25072             :  *                 continue
   25073             :  */
   25074           0 :       __pyx_t_16 = __pyx_v_nvalues;
   25075             :       __pyx_t_17 = __pyx_t_16;
   25076           0 :       for (__pyx_t_18 = 0; __pyx_t_18 < __pyx_t_17; __pyx_t_18+=1) {
   25077           0 :         __pyx_v_k = __pyx_t_18;
   25078             : 
   25079             :         /* "scipy/interpolate/_interpnd.pyx":355
   25080             :  *                 # don't extrapolate
   25081             :  *                 for k in range(nvalues):
   25082             :  *                     out[i,k] = fill_value             # <<<<<<<<<<<<<<
   25083             :  *                 continue
   25084             :  * 
   25085             :  */
   25086           0 :         __pyx_t_14 = __pyx_v_i;
   25087           0 :         __pyx_t_13 = __pyx_v_k;
   25088           0 :         *((__pyx_t_double_complex *) ( /* dim=1 */ ((char *) (((__pyx_t_double_complex *) ( /* dim=0 */ (__pyx_v_out.data + __pyx_t_14 * __pyx_v_out.strides[0]) )) + __pyx_t_13)) )) = __pyx_v_fill_value;
   25089             :       }
   25090             : 
   25091             :       /* "scipy/interpolate/_interpnd.pyx":356
   25092             :  *                 for k in range(nvalues):
   25093             :  *                     out[i,k] = fill_value
   25094             :  *                 continue             # <<<<<<<<<<<<<<
   25095             :  * 
   25096             :  *             for k in range(nvalues):
   25097             :  */
   25098           0 :       goto __pyx_L3_continue;
   25099             : 
   25100             :       /* "scipy/interpolate/_interpnd.pyx":352
   25101             :  *             # 2) Linear barycentric interpolation
   25102             :  * 
   25103             :  *             if isimplex == -1:             # <<<<<<<<<<<<<<
   25104             :  *                 # don't extrapolate
   25105             :  *                 for k in range(nvalues):
   25106             :  */
   25107             :     }
   25108             : 
   25109             :     /* "scipy/interpolate/_interpnd.pyx":358
   25110             :  *                 continue
   25111             :  * 
   25112             :  *             for k in range(nvalues):             # <<<<<<<<<<<<<<
   25113             :  *                 out[i,k] = 0
   25114             :  * 
   25115             :  */
   25116         108 :     __pyx_t_16 = __pyx_v_nvalues;
   25117             :     __pyx_t_17 = __pyx_t_16;
   25118         108 :     for (__pyx_t_18 = 0; __pyx_t_18 < __pyx_t_17; __pyx_t_18+=1) {
   25119          54 :       __pyx_v_k = __pyx_t_18;
   25120             : 
   25121             :       /* "scipy/interpolate/_interpnd.pyx":359
   25122             :  * 
   25123             :  *             for k in range(nvalues):
   25124             :  *                 out[i,k] = 0             # <<<<<<<<<<<<<<
   25125             :  * 
   25126             :  *             for j in range(ndim+1):
   25127             :  */
   25128          54 :       __pyx_t_13 = __pyx_v_i;
   25129          54 :       __pyx_t_14 = __pyx_v_k;
   25130          54 :       *((__pyx_t_double_complex *) ( /* dim=1 */ ((char *) (((__pyx_t_double_complex *) ( /* dim=0 */ (__pyx_v_out.data + __pyx_t_13 * __pyx_v_out.strides[0]) )) + __pyx_t_14)) )) = __pyx_t_double_complex_from_parts(0, 0);
   25131             :     }
   25132             : 
   25133             :     /* "scipy/interpolate/_interpnd.pyx":361
   25134             :  *                 out[i,k] = 0
   25135             :  * 
   25136             :  *             for j in range(ndim+1):             # <<<<<<<<<<<<<<
   25137             :  *                 for k in range(nvalues):
   25138             :  *                     m = simplices[isimplex,j]
   25139             :  */
   25140          54 :     __pyx_t_19 = (__pyx_v_ndim + 1);
   25141          54 :     __pyx_t_20 = __pyx_t_19;
   25142         216 :     for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_20; __pyx_t_16+=1) {
   25143             :       __pyx_v_j = __pyx_t_16;
   25144             : 
   25145             :       /* "scipy/interpolate/_interpnd.pyx":362
   25146             :  * 
   25147             :  *             for j in range(ndim+1):
   25148             :  *                 for k in range(nvalues):             # <<<<<<<<<<<<<<
   25149             :  *                     m = simplices[isimplex,j]
   25150             :  *                     out[i,k] = out[i,k] + c[j] * values[m,k]
   25151             :  */
   25152             :       __pyx_t_17 = __pyx_v_nvalues;
   25153         324 :       __pyx_t_18 = __pyx_t_17;
   25154         324 :       for (__pyx_t_21 = 0; __pyx_t_21 < __pyx_t_18; __pyx_t_21+=1) {
   25155         162 :         __pyx_v_k = __pyx_t_21;
   25156             : 
   25157             :         /* "scipy/interpolate/_interpnd.pyx":363
   25158             :  *             for j in range(ndim+1):
   25159             :  *                 for k in range(nvalues):
   25160             :  *                     m = simplices[isimplex,j]             # <<<<<<<<<<<<<<
   25161             :  *                     out[i,k] = out[i,k] + c[j] * values[m,k]
   25162             :  * 
   25163             :  */
   25164         162 :         __pyx_t_14 = __pyx_v_isimplex;
   25165         162 :         __pyx_t_13 = __pyx_v_j;
   25166         162 :         __pyx_v_m = (*((int const  *) ( /* dim=1 */ ((char *) (((int const  *) ( /* dim=0 */ (__pyx_v_simplices.data + __pyx_t_14 * __pyx_v_simplices.strides[0]) )) + __pyx_t_13)) )));
   25167             : 
   25168             :         /* "scipy/interpolate/_interpnd.pyx":364
   25169             :  *                 for k in range(nvalues):
   25170             :  *                     m = simplices[isimplex,j]
   25171             :  *                     out[i,k] = out[i,k] + c[j] * values[m,k]             # <<<<<<<<<<<<<<
   25172             :  * 
   25173             :  *         return out
   25174             :  */
   25175         162 :         __pyx_t_13 = __pyx_v_i;
   25176         162 :         __pyx_t_14 = __pyx_v_k;
   25177         162 :         __pyx_t_22 = __pyx_v_m;
   25178         162 :         __pyx_t_23 = __pyx_v_k;
   25179         162 :         __pyx_t_24 = __pyx_v_i;
   25180         162 :         __pyx_t_25 = __pyx_v_k;
   25181         162 :         *((__pyx_t_double_complex *) ( /* dim=1 */ ((char *) (((__pyx_t_double_complex *) ( /* dim=0 */ (__pyx_v_out.data + __pyx_t_24 * __pyx_v_out.strides[0]) )) + __pyx_t_25)) )) = __Pyx_c_sum_double((*((__pyx_t_double_complex *) ( /* dim=1 */ ((char *) (((__pyx_t_double_complex *) ( /* dim=0 */ (__pyx_v_out.data + __pyx_t_13 * __pyx_v_out.strides[0]) )) + __pyx_t_14)) ))), __Pyx_c_prod_double(__pyx_t_double_complex_from_parts((__pyx_v_c[__pyx_v_j]), 0), (*((__pyx_t_double_complex const  *) ( /* dim=1 */ ((char *) (((__pyx_t_double_complex const  *) ( /* dim=0 */ (__pyx_v_values.data + __pyx_t_22 * __pyx_v_values.strides[0]) )) + __pyx_t_23)) )))));
   25182             :       }
   25183             :     }
   25184          54 :     __pyx_L3_continue:;
   25185             :   }
   25186             : 
   25187             :   /* "scipy/interpolate/_interpnd.pyx":366
   25188             :  *                     out[i,k] = out[i,k] + c[j] * values[m,k]
   25189             :  * 
   25190             :  *         return out             # <<<<<<<<<<<<<<
   25191             :  * 
   25192             :  * 
   25193             :  */
   25194          10 :   __Pyx_XDECREF(__pyx_r);
   25195          10 :   __pyx_t_9 = __pyx_memoryview_fromslice(__pyx_v_out, 2, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_double_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_double_complex, 0);; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 366, __pyx_L1_error)
   25196          10 :   __Pyx_GOTREF(__pyx_t_9);
   25197          10 :   __pyx_r = __pyx_t_9;
   25198          10 :   __pyx_t_9 = 0;
   25199          10 :   goto __pyx_L0;
   25200             : 
   25201             :   /* "scipy/interpolate/_interpnd.pyx":314
   25202             :  *         return self._do_evaluate(xi, 1.0j)
   25203             :  * 
   25204             :  *     @cython.boundscheck(False)             # <<<<<<<<<<<<<<
   25205             :  *     @cython.wraparound(False)
   25206             :  *     def _do_evaluate(self, const double[:,::1] xi, const double_or_complex dummy):
   25207             :  */
   25208             : 
   25209             :   /* function exit code */
   25210           0 :   __pyx_L1_error:;
   25211           0 :   __Pyx_XDECREF(__pyx_t_1);
   25212           0 :   __PYX_XCLEAR_MEMVIEW(&__pyx_t_2, 1);
   25213           0 :   __Pyx_XDECREF(__pyx_t_3);
   25214           0 :   __PYX_XCLEAR_MEMVIEW(&__pyx_t_4, 1);
   25215           0 :   __Pyx_XDECREF(__pyx_t_7);
   25216           0 :   __Pyx_XDECREF(__pyx_t_8);
   25217           0 :   __Pyx_XDECREF(__pyx_t_9);
   25218           0 :   __PYX_XCLEAR_MEMVIEW(&__pyx_t_10, 1);
   25219           0 :   __Pyx_AddTraceback("scipy.interpolate._interpnd.LinearNDInterpolator._do_evaluate", __pyx_clineno, __pyx_lineno, __pyx_filename);
   25220           0 :   __pyx_r = NULL;
   25221          10 :   __pyx_L0:;
   25222          10 :   __PYX_XCLEAR_MEMVIEW(&__pyx_v_values, 1);
   25223          10 :   __PYX_XCLEAR_MEMVIEW(&__pyx_v_out, 1);
   25224          10 :   __PYX_XCLEAR_MEMVIEW(&__pyx_v_simplices, 1);
   25225          10 :   __Pyx_XGIVEREF(__pyx_r);
   25226          10 :   __Pyx_RefNannyFinishContext();
   25227          10 :   return __pyx_r;
   25228             : }
   25229             : 
   25230             : /* "scipy/interpolate/_interpnd.pyx":377
   25231             :  * 
   25232             :  * @cython.cdivision(True)
   25233             :  * cdef int _estimate_gradients_2d_global(const qhull.DelaunayInfo_t *d,             # <<<<<<<<<<<<<<
   25234             :  *                                        const double *data,
   25235             :  *                                        int maxiter,
   25236             :  */
   25237             : 
   25238          75 : static int __pyx_f_5scipy_11interpolate_9_interpnd__estimate_gradients_2d_global(__pyx_t_5scipy_7spatial_6_qhull_DelaunayInfo_t const *__pyx_v_d, double const *__pyx_v_data, int __pyx_v_maxiter, double __pyx_v_tol, double *__pyx_v_y) {
   25239          75 :   double __pyx_v_Q[(2 * 2)];
   25240          75 :   double __pyx_v_s[2];
   25241          75 :   double __pyx_v_r[2];
   25242          75 :   int __pyx_v_ipoint;
   25243          75 :   int __pyx_v_iiter;
   25244          75 :   int __pyx_v_k;
   25245          75 :   int __pyx_v_ipoint2;
   25246          75 :   int __pyx_v_jpoint2;
   25247          75 :   double __pyx_v_f1;
   25248          75 :   double __pyx_v_f2;
   25249          75 :   double __pyx_v_df2;
   25250          75 :   double __pyx_v_ex;
   25251          75 :   double __pyx_v_ey;
   25252          75 :   double __pyx_v_L;
   25253          75 :   double __pyx_v_L3;
   25254          75 :   double __pyx_v_det;
   25255          75 :   double __pyx_v_err;
   25256          75 :   double __pyx_v_change;
   25257          75 :   int __pyx_r;
   25258          75 :   long __pyx_t_1;
   25259          75 :   long __pyx_t_2;
   25260          75 :   int __pyx_t_3;
   25261          75 :   int __pyx_t_4;
   25262          75 :   int __pyx_t_5;
   25263          75 :   int __pyx_t_6;
   25264          75 :   int __pyx_t_7;
   25265          75 :   int __pyx_t_8;
   25266          75 :   int __pyx_t_9;
   25267          75 :   int __pyx_t_10;
   25268          75 :   int __pyx_t_11;
   25269          75 :   double __pyx_t_12;
   25270          75 :   double __pyx_t_13;
   25271          75 :   double __pyx_t_14;
   25272          75 :   int __pyx_t_15;
   25273             : 
   25274             :   /* "scipy/interpolate/_interpnd.pyx":427
   25275             :  * 
   25276             :  *     # initialize
   25277             :  *     for ipoint in range(2*d.npoints):             # <<<<<<<<<<<<<<
   25278             :  *         y[ipoint] = 0
   25279             :  * 
   25280             :  */
   25281          75 :   __pyx_t_1 = (2 * __pyx_v_d->npoints);
   25282          75 :   __pyx_t_2 = __pyx_t_1;
   25283       23461 :   for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
   25284       23386 :     __pyx_v_ipoint = __pyx_t_3;
   25285             : 
   25286             :     /* "scipy/interpolate/_interpnd.pyx":428
   25287             :  *     # initialize
   25288             :  *     for ipoint in range(2*d.npoints):
   25289             :  *         y[ipoint] = 0             # <<<<<<<<<<<<<<
   25290             :  * 
   25291             :  *     #
   25292             :  */
   25293       23386 :     (__pyx_v_y[__pyx_v_ipoint]) = 0.0;
   25294             :   }
   25295             : 
   25296             :   /* "scipy/interpolate/_interpnd.pyx":493
   25297             :  * 
   25298             :  *     # Gauss-Seidel
   25299             :  *     for iiter in range(maxiter):             # <<<<<<<<<<<<<<
   25300             :  *         err = 0
   25301             :  *         for ipoint in range(d.npoints):
   25302             :  */
   25303         770 :   __pyx_t_3 = __pyx_v_maxiter;
   25304             :   __pyx_t_4 = __pyx_t_3;
   25305         770 :   for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
   25306             :     __pyx_v_iiter = __pyx_t_5;
   25307             : 
   25308             :     /* "scipy/interpolate/_interpnd.pyx":494
   25309             :  *     # Gauss-Seidel
   25310             :  *     for iiter in range(maxiter):
   25311             :  *         err = 0             # <<<<<<<<<<<<<<
   25312             :  *         for ipoint in range(d.npoints):
   25313             :  *             for k in range(2*2):
   25314             :  */
   25315             :     __pyx_v_err = 0.0;
   25316             : 
   25317             :     /* "scipy/interpolate/_interpnd.pyx":495
   25318             :  *     for iiter in range(maxiter):
   25319             :  *         err = 0
   25320             :  *         for ipoint in range(d.npoints):             # <<<<<<<<<<<<<<
   25321             :  *             for k in range(2*2):
   25322             :  *                 Q[k] = 0
   25323             :  */
   25324             :     __pyx_t_6 = __pyx_v_d->npoints;
   25325             :     __pyx_t_7 = __pyx_t_6;
   25326      110472 :     for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
   25327      548515 :       __pyx_v_ipoint = __pyx_t_8;
   25328             : 
   25329             :       /* "scipy/interpolate/_interpnd.pyx":496
   25330             :  *         err = 0
   25331             :  *         for ipoint in range(d.npoints):
   25332             :  *             for k in range(2*2):             # <<<<<<<<<<<<<<
   25333             :  *                 Q[k] = 0
   25334             :  *             for k in range(2):
   25335             :  */
   25336      548515 :       for (__pyx_t_9 = 0; __pyx_t_9 < 0x4; __pyx_t_9+=1) {
   25337      438812 :         __pyx_v_k = __pyx_t_9;
   25338             : 
   25339             :         /* "scipy/interpolate/_interpnd.pyx":497
   25340             :  *         for ipoint in range(d.npoints):
   25341             :  *             for k in range(2*2):
   25342             :  *                 Q[k] = 0             # <<<<<<<<<<<<<<
   25343             :  *             for k in range(2):
   25344             :  *                 s[k] = 0
   25345             :  */
   25346      438812 :         (__pyx_v_Q[__pyx_v_k]) = 0.0;
   25347             :       }
   25348             : 
   25349             :       /* "scipy/interpolate/_interpnd.pyx":498
   25350             :  *             for k in range(2*2):
   25351             :  *                 Q[k] = 0
   25352             :  *             for k in range(2):             # <<<<<<<<<<<<<<
   25353             :  *                 s[k] = 0
   25354             :  * 
   25355             :  */
   25356      329109 :       for (__pyx_t_9 = 0; __pyx_t_9 < 2; __pyx_t_9+=1) {
   25357      219406 :         __pyx_v_k = __pyx_t_9;
   25358             : 
   25359             :         /* "scipy/interpolate/_interpnd.pyx":499
   25360             :  *                 Q[k] = 0
   25361             :  *             for k in range(2):
   25362             :  *                 s[k] = 0             # <<<<<<<<<<<<<<
   25363             :  * 
   25364             :  *             # walk over neighbours of given point
   25365             :  */
   25366      219406 :         (__pyx_v_s[__pyx_v_k]) = 0.0;
   25367             :       }
   25368             : 
   25369             :       /* "scipy/interpolate/_interpnd.pyx":503
   25370             :  *             # walk over neighbours of given point
   25371             :  *             for jpoint2 in range(d.vertex_neighbors_indptr[ipoint],
   25372             :  *                                   d.vertex_neighbors_indptr[ipoint+1]):             # <<<<<<<<<<<<<<
   25373             :  *                 ipoint2 = d.vertex_neighbors_indices[jpoint2]
   25374             :  * 
   25375             :  */
   25376      109703 :       __pyx_t_9 = (__pyx_v_d->vertex_neighbors_indptr[(__pyx_v_ipoint + 1)]);
   25377             : 
   25378             :       /* "scipy/interpolate/_interpnd.pyx":502
   25379             :  * 
   25380             :  *             # walk over neighbours of given point
   25381             :  *             for jpoint2 in range(d.vertex_neighbors_indptr[ipoint],             # <<<<<<<<<<<<<<
   25382             :  *                                   d.vertex_neighbors_indptr[ipoint+1]):
   25383             :  *                 ipoint2 = d.vertex_neighbors_indices[jpoint2]
   25384             :  */
   25385      109703 :       __pyx_t_10 = __pyx_t_9;
   25386      756703 :       for (__pyx_t_11 = (__pyx_v_d->vertex_neighbors_indptr[__pyx_v_ipoint]); __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {
   25387      647000 :         __pyx_v_jpoint2 = __pyx_t_11;
   25388             : 
   25389             :         /* "scipy/interpolate/_interpnd.pyx":504
   25390             :  *             for jpoint2 in range(d.vertex_neighbors_indptr[ipoint],
   25391             :  *                                   d.vertex_neighbors_indptr[ipoint+1]):
   25392             :  *                 ipoint2 = d.vertex_neighbors_indices[jpoint2]             # <<<<<<<<<<<<<<
   25393             :  * 
   25394             :  *                 # edge
   25395             :  */
   25396      647000 :         __pyx_v_ipoint2 = (__pyx_v_d->vertex_neighbors_indices[__pyx_v_jpoint2]);
   25397             : 
   25398             :         /* "scipy/interpolate/_interpnd.pyx":507
   25399             :  * 
   25400             :  *                 # edge
   25401             :  *                 ex = d.points[2*ipoint2 + 0] - d.points[2*ipoint + 0]             # <<<<<<<<<<<<<<
   25402             :  *                 ey = d.points[2*ipoint2 + 1] - d.points[2*ipoint + 1]
   25403             :  *                 L = sqrt(ex**2 + ey**2)
   25404             :  */
   25405      647000 :         __pyx_v_ex = ((__pyx_v_d->points[((2 * __pyx_v_ipoint2) + 0)]) - (__pyx_v_d->points[((2 * __pyx_v_ipoint) + 0)]));
   25406             : 
   25407             :         /* "scipy/interpolate/_interpnd.pyx":508
   25408             :  *                 # edge
   25409             :  *                 ex = d.points[2*ipoint2 + 0] - d.points[2*ipoint + 0]
   25410             :  *                 ey = d.points[2*ipoint2 + 1] - d.points[2*ipoint + 1]             # <<<<<<<<<<<<<<
   25411             :  *                 L = sqrt(ex**2 + ey**2)
   25412             :  *                 L3 = L*L*L
   25413             :  */
   25414      647000 :         __pyx_v_ey = ((__pyx_v_d->points[((2 * __pyx_v_ipoint2) + 1)]) - (__pyx_v_d->points[((2 * __pyx_v_ipoint) + 1)]));
   25415             : 
   25416             :         /* "scipy/interpolate/_interpnd.pyx":509
   25417             :  *                 ex = d.points[2*ipoint2 + 0] - d.points[2*ipoint + 0]
   25418             :  *                 ey = d.points[2*ipoint2 + 1] - d.points[2*ipoint + 1]
   25419             :  *                 L = sqrt(ex**2 + ey**2)             # <<<<<<<<<<<<<<
   25420             :  *                 L3 = L*L*L
   25421             :  * 
   25422             :  */
   25423      647000 :         __pyx_v_L = sqrt((pow(__pyx_v_ex, 2.0) + pow(__pyx_v_ey, 2.0)));
   25424             : 
   25425             :         /* "scipy/interpolate/_interpnd.pyx":510
   25426             :  *                 ey = d.points[2*ipoint2 + 1] - d.points[2*ipoint + 1]
   25427             :  *                 L = sqrt(ex**2 + ey**2)
   25428             :  *                 L3 = L*L*L             # <<<<<<<<<<<<<<
   25429             :  * 
   25430             :  *                 # data at vertices
   25431             :  */
   25432      647000 :         __pyx_v_L3 = ((__pyx_v_L * __pyx_v_L) * __pyx_v_L);
   25433             : 
   25434             :         /* "scipy/interpolate/_interpnd.pyx":513
   25435             :  * 
   25436             :  *                 # data at vertices
   25437             :  *                 f1 = data[ipoint]             # <<<<<<<<<<<<<<
   25438             :  *                 f2 = data[ipoint2]
   25439             :  * 
   25440             :  */
   25441      647000 :         __pyx_v_f1 = (__pyx_v_data[__pyx_v_ipoint]);
   25442             : 
   25443             :         /* "scipy/interpolate/_interpnd.pyx":514
   25444             :  *                 # data at vertices
   25445             :  *                 f1 = data[ipoint]
   25446             :  *                 f2 = data[ipoint2]             # <<<<<<<<<<<<<<
   25447             :  * 
   25448             :  *                 # scaled gradient projections on the edge
   25449             :  */
   25450      647000 :         __pyx_v_f2 = (__pyx_v_data[__pyx_v_ipoint2]);
   25451             : 
   25452             :         /* "scipy/interpolate/_interpnd.pyx":517
   25453             :  * 
   25454             :  *                 # scaled gradient projections on the edge
   25455             :  *                 df2 = -ex*y[2*ipoint2 + 0] - ey*y[2*ipoint2 + 1]             # <<<<<<<<<<<<<<
   25456             :  * 
   25457             :  *                 # edge sum
   25458             :  */
   25459      647000 :         __pyx_v_df2 = (((-__pyx_v_ex) * (__pyx_v_y[((2 * __pyx_v_ipoint2) + 0)])) - (__pyx_v_ey * (__pyx_v_y[((2 * __pyx_v_ipoint2) + 1)])));
   25460             : 
   25461             :         /* "scipy/interpolate/_interpnd.pyx":520
   25462             :  * 
   25463             :  *                 # edge sum
   25464             :  *                 Q[0] += 4*ex*ex / L3             # <<<<<<<<<<<<<<
   25465             :  *                 Q[1] += 4*ex*ey / L3
   25466             :  *                 Q[3] += 4*ey*ey / L3
   25467             :  */
   25468      647000 :         __pyx_t_1 = 0;
   25469      647000 :         (__pyx_v_Q[__pyx_t_1]) = ((__pyx_v_Q[__pyx_t_1]) + (((4.0 * __pyx_v_ex) * __pyx_v_ex) / __pyx_v_L3));
   25470             : 
   25471             :         /* "scipy/interpolate/_interpnd.pyx":521
   25472             :  *                 # edge sum
   25473             :  *                 Q[0] += 4*ex*ex / L3
   25474             :  *                 Q[1] += 4*ex*ey / L3             # <<<<<<<<<<<<<<
   25475             :  *                 Q[3] += 4*ey*ey / L3
   25476             :  * 
   25477             :  */
   25478      647000 :         __pyx_t_1 = 1;
   25479      647000 :         (__pyx_v_Q[__pyx_t_1]) = ((__pyx_v_Q[__pyx_t_1]) + (((4.0 * __pyx_v_ex) * __pyx_v_ey) / __pyx_v_L3));
   25480             : 
   25481             :         /* "scipy/interpolate/_interpnd.pyx":522
   25482             :  *                 Q[0] += 4*ex*ex / L3
   25483             :  *                 Q[1] += 4*ex*ey / L3
   25484             :  *                 Q[3] += 4*ey*ey / L3             # <<<<<<<<<<<<<<
   25485             :  * 
   25486             :  *                 s[0] += (6*(f1 - f2) - 2*df2) * ex / L3
   25487             :  */
   25488      647000 :         __pyx_t_1 = 3;
   25489      647000 :         (__pyx_v_Q[__pyx_t_1]) = ((__pyx_v_Q[__pyx_t_1]) + (((4.0 * __pyx_v_ey) * __pyx_v_ey) / __pyx_v_L3));
   25490             : 
   25491             :         /* "scipy/interpolate/_interpnd.pyx":524
   25492             :  *                 Q[3] += 4*ey*ey / L3
   25493             :  * 
   25494             :  *                 s[0] += (6*(f1 - f2) - 2*df2) * ex / L3             # <<<<<<<<<<<<<<
   25495             :  *                 s[1] += (6*(f1 - f2) - 2*df2) * ey / L3
   25496             :  * 
   25497             :  */
   25498      647000 :         __pyx_t_1 = 0;
   25499      647000 :         (__pyx_v_s[__pyx_t_1]) = ((__pyx_v_s[__pyx_t_1]) + ((((6.0 * (__pyx_v_f1 - __pyx_v_f2)) - (2.0 * __pyx_v_df2)) * __pyx_v_ex) / __pyx_v_L3));
   25500             : 
   25501             :         /* "scipy/interpolate/_interpnd.pyx":525
   25502             :  * 
   25503             :  *                 s[0] += (6*(f1 - f2) - 2*df2) * ex / L3
   25504             :  *                 s[1] += (6*(f1 - f2) - 2*df2) * ey / L3             # <<<<<<<<<<<<<<
   25505             :  * 
   25506             :  *             Q[2] = Q[1]
   25507             :  */
   25508      647000 :         __pyx_t_1 = 1;
   25509      647000 :         (__pyx_v_s[__pyx_t_1]) = ((__pyx_v_s[__pyx_t_1]) + ((((6.0 * (__pyx_v_f1 - __pyx_v_f2)) - (2.0 * __pyx_v_df2)) * __pyx_v_ey) / __pyx_v_L3));
   25510             :       }
   25511             : 
   25512             :       /* "scipy/interpolate/_interpnd.pyx":527
   25513             :  *                 s[1] += (6*(f1 - f2) - 2*df2) * ey / L3
   25514             :  * 
   25515             :  *             Q[2] = Q[1]             # <<<<<<<<<<<<<<
   25516             :  * 
   25517             :  *             # solve
   25518             :  */
   25519      109703 :       (__pyx_v_Q[2]) = (__pyx_v_Q[1]);
   25520             : 
   25521             :       /* "scipy/interpolate/_interpnd.pyx":531
   25522             :  *             # solve
   25523             :  * 
   25524             :  *             det = Q[0]*Q[3] - Q[1]*Q[2]             # <<<<<<<<<<<<<<
   25525             :  *             r[0] = ( Q[3]*s[0] - Q[1]*s[1])/det
   25526             :  *             r[1] = (-Q[2]*s[0] + Q[0]*s[1])/det
   25527             :  */
   25528      109703 :       __pyx_v_det = (((__pyx_v_Q[0]) * (__pyx_v_Q[3])) - ((__pyx_v_Q[1]) * (__pyx_v_Q[2])));
   25529             : 
   25530             :       /* "scipy/interpolate/_interpnd.pyx":532
   25531             :  * 
   25532             :  *             det = Q[0]*Q[3] - Q[1]*Q[2]
   25533             :  *             r[0] = ( Q[3]*s[0] - Q[1]*s[1])/det             # <<<<<<<<<<<<<<
   25534             :  *             r[1] = (-Q[2]*s[0] + Q[0]*s[1])/det
   25535             :  * 
   25536             :  */
   25537      109703 :       (__pyx_v_r[0]) = ((((__pyx_v_Q[3]) * (__pyx_v_s[0])) - ((__pyx_v_Q[1]) * (__pyx_v_s[1]))) / __pyx_v_det);
   25538             : 
   25539             :       /* "scipy/interpolate/_interpnd.pyx":533
   25540             :  *             det = Q[0]*Q[3] - Q[1]*Q[2]
   25541             :  *             r[0] = ( Q[3]*s[0] - Q[1]*s[1])/det
   25542             :  *             r[1] = (-Q[2]*s[0] + Q[0]*s[1])/det             # <<<<<<<<<<<<<<
   25543             :  * 
   25544             :  *             change = max(fabs(y[2*ipoint + 0] + r[0]),
   25545             :  */
   25546      109703 :       (__pyx_v_r[1]) = ((((-(__pyx_v_Q[2])) * (__pyx_v_s[0])) + ((__pyx_v_Q[0]) * (__pyx_v_s[1]))) / __pyx_v_det);
   25547             : 
   25548             :       /* "scipy/interpolate/_interpnd.pyx":536
   25549             :  * 
   25550             :  *             change = max(fabs(y[2*ipoint + 0] + r[0]),
   25551             :  *                          fabs(y[2*ipoint + 1] + r[1]))             # <<<<<<<<<<<<<<
   25552             :  * 
   25553             :  *             y[2*ipoint + 0] = -r[0]
   25554             :  */
   25555      109703 :       __pyx_t_12 = fabs(((__pyx_v_y[((2 * __pyx_v_ipoint) + 1)]) + (__pyx_v_r[1])));
   25556             : 
   25557             :       /* "scipy/interpolate/_interpnd.pyx":535
   25558             :  *             r[1] = (-Q[2]*s[0] + Q[0]*s[1])/det
   25559             :  * 
   25560             :  *             change = max(fabs(y[2*ipoint + 0] + r[0]),             # <<<<<<<<<<<<<<
   25561             :  *                          fabs(y[2*ipoint + 1] + r[1]))
   25562             :  * 
   25563             :  */
   25564      109703 :       __pyx_t_13 = fabs(((__pyx_v_y[((2 * __pyx_v_ipoint) + 0)]) + (__pyx_v_r[0])));
   25565             : 
   25566             :       /* "scipy/interpolate/_interpnd.pyx":536
   25567             :  * 
   25568             :  *             change = max(fabs(y[2*ipoint + 0] + r[0]),
   25569             :  *                          fabs(y[2*ipoint + 1] + r[1]))             # <<<<<<<<<<<<<<
   25570             :  * 
   25571             :  *             y[2*ipoint + 0] = -r[0]
   25572             :  */
   25573      109703 :       __pyx_t_15 = (__pyx_t_12 > __pyx_t_13);
   25574      109703 :       if (__pyx_t_15) {
   25575             :         __pyx_t_14 = __pyx_t_12;
   25576             :       } else {
   25577       53105 :         __pyx_t_14 = __pyx_t_13;
   25578             :       }
   25579      109703 :       __pyx_v_change = __pyx_t_14;
   25580             : 
   25581             :       /* "scipy/interpolate/_interpnd.pyx":538
   25582             :  *                          fabs(y[2*ipoint + 1] + r[1]))
   25583             :  * 
   25584             :  *             y[2*ipoint + 0] = -r[0]             # <<<<<<<<<<<<<<
   25585             :  *             y[2*ipoint + 1] = -r[1]
   25586             :  * 
   25587             :  */
   25588      109703 :       (__pyx_v_y[((2 * __pyx_v_ipoint) + 0)]) = (-(__pyx_v_r[0]));
   25589             : 
   25590             :       /* "scipy/interpolate/_interpnd.pyx":539
   25591             :  * 
   25592             :  *             y[2*ipoint + 0] = -r[0]
   25593             :  *             y[2*ipoint + 1] = -r[1]             # <<<<<<<<<<<<<<
   25594             :  * 
   25595             :  *             # relative/absolute error
   25596             :  */
   25597      109703 :       (__pyx_v_y[((2 * __pyx_v_ipoint) + 1)]) = (-(__pyx_v_r[1]));
   25598             : 
   25599             :       /* "scipy/interpolate/_interpnd.pyx":542
   25600             :  * 
   25601             :  *             # relative/absolute error
   25602             :  *             change /= max(1.0, max(fabs(r[0]), fabs(r[1])))             # <<<<<<<<<<<<<<
   25603             :  *             err = max(err, change)
   25604             :  * 
   25605             :  */
   25606      109703 :       __pyx_t_14 = fabs((__pyx_v_r[1]));
   25607      109703 :       __pyx_t_12 = fabs((__pyx_v_r[0]));
   25608      109703 :       __pyx_t_15 = (__pyx_t_14 > __pyx_t_12);
   25609      109703 :       if (__pyx_t_15) {
   25610             :         __pyx_t_13 = __pyx_t_14;
   25611             :       } else {
   25612       54957 :         __pyx_t_13 = __pyx_t_12;
   25613             :       }
   25614      109703 :       __pyx_t_14 = __pyx_t_13;
   25615      109703 :       __pyx_t_13 = 1.0;
   25616      109703 :       __pyx_t_15 = (__pyx_t_14 > __pyx_t_13);
   25617      109703 :       if (__pyx_t_15) {
   25618             :         __pyx_t_12 = __pyx_t_14;
   25619             :       } else {
   25620       48339 :         __pyx_t_12 = __pyx_t_13;
   25621             :       }
   25622      109703 :       __pyx_v_change = (__pyx_v_change / __pyx_t_12);
   25623             : 
   25624             :       /* "scipy/interpolate/_interpnd.pyx":543
   25625             :  *             # relative/absolute error
   25626             :  *             change /= max(1.0, max(fabs(r[0]), fabs(r[1])))
   25627             :  *             err = max(err, change)             # <<<<<<<<<<<<<<
   25628             :  * 
   25629             :  *         if err < tol:
   25630             :  */
   25631      109703 :       __pyx_t_12 = __pyx_v_change;
   25632      109703 :       __pyx_t_14 = __pyx_v_err;
   25633      109703 :       __pyx_t_15 = (__pyx_t_12 > __pyx_t_14);
   25634      109703 :       if (__pyx_t_15) {
   25635             :         __pyx_t_13 = __pyx_t_12;
   25636             :       } else {
   25637      107685 :         __pyx_t_13 = __pyx_t_14;
   25638             :       }
   25639      109703 :       __pyx_v_err = __pyx_t_13;
   25640             :     }
   25641             : 
   25642             :     /* "scipy/interpolate/_interpnd.pyx":545
   25643             :  *             err = max(err, change)
   25644             :  * 
   25645             :  *         if err < tol:             # <<<<<<<<<<<<<<
   25646             :  *             return iiter + 1
   25647             :  * 
   25648             :  */
   25649         769 :     __pyx_t_15 = (__pyx_v_err < __pyx_v_tol);
   25650         769 :     if (__pyx_t_15) {
   25651             : 
   25652             :       /* "scipy/interpolate/_interpnd.pyx":546
   25653             :  * 
   25654             :  *         if err < tol:
   25655             :  *             return iiter + 1             # <<<<<<<<<<<<<<
   25656             :  * 
   25657             :  *     # Didn't converge before maxiter
   25658             :  */
   25659          74 :       __pyx_r = (__pyx_v_iiter + 1);
   25660          74 :       goto __pyx_L0;
   25661             : 
   25662             :       /* "scipy/interpolate/_interpnd.pyx":545
   25663             :  *             err = max(err, change)
   25664             :  * 
   25665             :  *         if err < tol:             # <<<<<<<<<<<<<<
   25666             :  *             return iiter + 1
   25667             :  * 
   25668             :  */
   25669             :     }
   25670             :   }
   25671             : 
   25672             :   /* "scipy/interpolate/_interpnd.pyx":549
   25673             :  * 
   25674             :  *     # Didn't converge before maxiter
   25675             :  *     return 0             # <<<<<<<<<<<<<<
   25676             :  * 
   25677             :  * @cython.boundscheck(False)
   25678             :  */
   25679           1 :   __pyx_r = 0;
   25680           1 :   goto __pyx_L0;
   25681             : 
   25682             :   /* "scipy/interpolate/_interpnd.pyx":377
   25683             :  * 
   25684             :  * @cython.cdivision(True)
   25685             :  * cdef int _estimate_gradients_2d_global(const qhull.DelaunayInfo_t *d,             # <<<<<<<<<<<<<<
   25686             :  *                                        const double *data,
   25687             :  *                                        int maxiter,
   25688             :  */
   25689             : 
   25690             :   /* function exit code */
   25691          75 :   __pyx_L0:;
   25692          75 :   return __pyx_r;
   25693             : }
   25694             : 
   25695             : /* "scipy/interpolate/_interpnd.pyx":553
   25696             :  * @cython.boundscheck(False)
   25697             :  * @cython.wraparound(False)
   25698             :  * cpdef estimate_gradients_2d_global(tri, y, int maxiter=400, double tol=1e-6):             # <<<<<<<<<<<<<<
   25699             :  *     cdef const double[:,::1] data
   25700             :  *     cdef double[:,:,::1] grad
   25701             :  */
   25702             : 
   25703             : static PyObject *__pyx_pw_5scipy_11interpolate_9_interpnd_3estimate_gradients_2d_global(PyObject *__pyx_self, 
   25704             : #if CYTHON_METH_FASTCALL
   25705             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   25706             : #else
   25707             : PyObject *__pyx_args, PyObject *__pyx_kwds
   25708             : #endif
   25709             : ); /*proto*/
   25710          81 : static PyObject *__pyx_f_5scipy_11interpolate_9_interpnd_estimate_gradients_2d_global(PyObject *__pyx_v_tri, PyObject *__pyx_v_y, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_5scipy_11interpolate_9_interpnd_estimate_gradients_2d_global *__pyx_optional_args) {
   25711          81 :   int __pyx_v_maxiter = ((int)0x190);
   25712          81 :   double __pyx_v_tol = ((double)1e-6);
   25713          81 :   __Pyx_memviewslice __pyx_v_data = { 0, 0, { 0 }, { 0 }, { 0 } };
   25714          81 :   __Pyx_memviewslice __pyx_v_grad = { 0, 0, { 0 }, { 0 }, { 0 } };
   25715          81 :   __pyx_t_5scipy_7spatial_6_qhull_DelaunayInfo_t __pyx_v_info;
   25716          81 :   int __pyx_v_k;
   25717          81 :   int __pyx_v_ret;
   25718          81 :   int __pyx_v_nvalues;
   25719          81 :   PyObject *__pyx_v_rg = NULL;
   25720          81 :   PyObject *__pyx_v_ig = NULL;
   25721          81 :   PyObject *__pyx_v_r = NULL;
   25722          81 :   PyObject *__pyx_v_y_shape = NULL;
   25723          81 :   PyObject *__pyx_v_yi = NULL;
   25724          81 :   PyObject *__pyx_r = NULL;
   25725             :   __Pyx_RefNannyDeclarations
   25726          81 :   PyObject *__pyx_t_1 = NULL;
   25727          81 :   PyObject *__pyx_t_2 = NULL;
   25728          81 :   PyObject *__pyx_t_3 = NULL;
   25729          81 :   unsigned int __pyx_t_4;
   25730          81 :   int __pyx_t_5;
   25731          81 :   PyObject *__pyx_t_6 = NULL;
   25732          81 :   PyObject *__pyx_t_7 = NULL;
   25733          81 :   struct __pyx_opt_args_5scipy_11interpolate_9_interpnd_estimate_gradients_2d_global __pyx_t_8;
   25734          81 :   __Pyx_memviewslice __pyx_t_9 = { 0, 0, { 0 }, { 0 }, { 0 } };
   25735          81 :   __Pyx_memviewslice __pyx_t_10 = { 0, 0, { 0 }, { 0 }, { 0 } };
   25736          81 :   int __pyx_t_11;
   25737          81 :   int __pyx_t_12;
   25738          81 :   int __pyx_t_13;
   25739          81 :   Py_ssize_t __pyx_t_14;
   25740          81 :   Py_ssize_t __pyx_t_15;
   25741          81 :   Py_ssize_t __pyx_t_16;
   25742          81 :   Py_ssize_t __pyx_t_17;
   25743          81 :   Py_ssize_t __pyx_t_18;
   25744          81 :   int __pyx_lineno = 0;
   25745          81 :   const char *__pyx_filename = NULL;
   25746          81 :   int __pyx_clineno = 0;
   25747          81 :   __Pyx_RefNannySetupContext("estimate_gradients_2d_global", 0);
   25748          81 :   if (__pyx_optional_args) {
   25749          81 :     if (__pyx_optional_args->__pyx_n > 0) {
   25750          81 :       __pyx_v_maxiter = __pyx_optional_args->maxiter;
   25751          81 :       if (__pyx_optional_args->__pyx_n > 1) {
   25752          81 :         __pyx_v_tol = __pyx_optional_args->tol;
   25753             :       }
   25754             :     }
   25755             :   }
   25756          81 :   __Pyx_INCREF(__pyx_v_y);
   25757             : 
   25758             :   /* "scipy/interpolate/_interpnd.pyx":559
   25759             :  *     cdef int k, ret, nvalues
   25760             :  * 
   25761             :  *     y = np.asanyarray(y)             # <<<<<<<<<<<<<<
   25762             :  * 
   25763             :  *     if y.shape[0] != tri.npoints:
   25764             :  */
   25765          81 :   __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 559, __pyx_L1_error)
   25766          81 :   __Pyx_GOTREF(__pyx_t_2);
   25767          81 :   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asanyarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 559, __pyx_L1_error)
   25768          81 :   __Pyx_GOTREF(__pyx_t_3);
   25769          81 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   25770          81 :   __pyx_t_2 = NULL;
   25771          81 :   __pyx_t_4 = 0;
   25772             :   #if CYTHON_UNPACK_METHODS
   25773          81 :   if (unlikely(PyMethod_Check(__pyx_t_3))) {
   25774           0 :     __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
   25775           0 :     if (likely(__pyx_t_2)) {
   25776           0 :       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
   25777           0 :       __Pyx_INCREF(__pyx_t_2);
   25778           0 :       __Pyx_INCREF(function);
   25779           0 :       __Pyx_DECREF_SET(__pyx_t_3, function);
   25780             :       __pyx_t_4 = 1;
   25781             :     }
   25782             :   }
   25783             :   #endif
   25784             :   {
   25785          81 :     PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_y};
   25786          81 :     __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
   25787          81 :     __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
   25788          81 :     if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 559, __pyx_L1_error)
   25789          81 :     __Pyx_GOTREF(__pyx_t_1);
   25790          81 :     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   25791             :   }
   25792          81 :   __Pyx_DECREF_SET(__pyx_v_y, __pyx_t_1);
   25793          81 :   __pyx_t_1 = 0;
   25794             : 
   25795             :   /* "scipy/interpolate/_interpnd.pyx":561
   25796             :  *     y = np.asanyarray(y)
   25797             :  * 
   25798             :  *     if y.shape[0] != tri.npoints:             # <<<<<<<<<<<<<<
   25799             :  *         raise ValueError("'y' has a wrong number of items")
   25800             :  * 
   25801             :  */
   25802          81 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_y, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 561, __pyx_L1_error)
   25803          81 :   __Pyx_GOTREF(__pyx_t_1);
   25804          81 :   __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 561, __pyx_L1_error)
   25805          81 :   __Pyx_GOTREF(__pyx_t_3);
   25806          81 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   25807          81 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_tri, __pyx_n_s_npoints); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 561, __pyx_L1_error)
   25808          81 :   __Pyx_GOTREF(__pyx_t_1);
   25809          81 :   __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 561, __pyx_L1_error)
   25810          81 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   25811          81 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   25812          81 :   __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 561, __pyx_L1_error)
   25813          81 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   25814          81 :   if (unlikely(__pyx_t_5)) {
   25815             : 
   25816             :     /* "scipy/interpolate/_interpnd.pyx":562
   25817             :  * 
   25818             :  *     if y.shape[0] != tri.npoints:
   25819             :  *         raise ValueError("'y' has a wrong number of items")             # <<<<<<<<<<<<<<
   25820             :  * 
   25821             :  *     if np.issubdtype(y.dtype, np.complexfloating):
   25822             :  */
   25823           0 :     __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__23, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 562, __pyx_L1_error)
   25824           0 :     __Pyx_GOTREF(__pyx_t_2);
   25825           0 :     __Pyx_Raise(__pyx_t_2, 0, 0, 0);
   25826           0 :     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   25827           0 :     __PYX_ERR(0, 562, __pyx_L1_error)
   25828             : 
   25829             :     /* "scipy/interpolate/_interpnd.pyx":561
   25830             :  *     y = np.asanyarray(y)
   25831             :  * 
   25832             :  *     if y.shape[0] != tri.npoints:             # <<<<<<<<<<<<<<
   25833             :  *         raise ValueError("'y' has a wrong number of items")
   25834             :  * 
   25835             :  */
   25836             :   }
   25837             : 
   25838             :   /* "scipy/interpolate/_interpnd.pyx":564
   25839             :  *         raise ValueError("'y' has a wrong number of items")
   25840             :  * 
   25841             :  *     if np.issubdtype(y.dtype, np.complexfloating):             # <<<<<<<<<<<<<<
   25842             :  *         rg = estimate_gradients_2d_global(tri, y.real, maxiter=maxiter, tol=tol)
   25843             :  *         ig = estimate_gradients_2d_global(tri, y.imag, maxiter=maxiter, tol=tol)
   25844             :  */
   25845          81 :   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 564, __pyx_L1_error)
   25846          81 :   __Pyx_GOTREF(__pyx_t_1);
   25847          81 :   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_issubdtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 564, __pyx_L1_error)
   25848          81 :   __Pyx_GOTREF(__pyx_t_3);
   25849          81 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   25850          81 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_y, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 564, __pyx_L1_error)
   25851          81 :   __Pyx_GOTREF(__pyx_t_1);
   25852          81 :   __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 564, __pyx_L1_error)
   25853          81 :   __Pyx_GOTREF(__pyx_t_6);
   25854          81 :   __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_complexfloating); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 564, __pyx_L1_error)
   25855          81 :   __Pyx_GOTREF(__pyx_t_7);
   25856          81 :   __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
   25857          81 :   __pyx_t_6 = NULL;
   25858          81 :   __pyx_t_4 = 0;
   25859             :   #if CYTHON_UNPACK_METHODS
   25860          81 :   if (unlikely(PyMethod_Check(__pyx_t_3))) {
   25861           0 :     __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
   25862           0 :     if (likely(__pyx_t_6)) {
   25863           0 :       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
   25864           0 :       __Pyx_INCREF(__pyx_t_6);
   25865           0 :       __Pyx_INCREF(function);
   25866           0 :       __Pyx_DECREF_SET(__pyx_t_3, function);
   25867             :       __pyx_t_4 = 1;
   25868             :     }
   25869             :   }
   25870             :   #endif
   25871             :   {
   25872          81 :     PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_t_1, __pyx_t_7};
   25873          81 :     __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
   25874          81 :     __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
   25875          81 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   25876          81 :     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   25877          81 :     if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 564, __pyx_L1_error)
   25878          81 :     __Pyx_GOTREF(__pyx_t_2);
   25879          81 :     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   25880             :   }
   25881          81 :   __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 564, __pyx_L1_error)
   25882          81 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   25883          81 :   if (__pyx_t_5) {
   25884             : 
   25885             :     /* "scipy/interpolate/_interpnd.pyx":565
   25886             :  * 
   25887             :  *     if np.issubdtype(y.dtype, np.complexfloating):
   25888             :  *         rg = estimate_gradients_2d_global(tri, y.real, maxiter=maxiter, tol=tol)             # <<<<<<<<<<<<<<
   25889             :  *         ig = estimate_gradients_2d_global(tri, y.imag, maxiter=maxiter, tol=tol)
   25890             :  *         r = np.zeros(rg.shape, dtype=complex)
   25891             :  */
   25892          10 :     __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_y, __pyx_n_s_real); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 565, __pyx_L1_error)
   25893          10 :     __Pyx_GOTREF(__pyx_t_2);
   25894          10 :     __pyx_t_8.__pyx_n = 2;
   25895          10 :     __pyx_t_8.maxiter = __pyx_v_maxiter;
   25896          10 :     __pyx_t_8.tol = __pyx_v_tol;
   25897          10 :     __pyx_t_3 = __pyx_f_5scipy_11interpolate_9_interpnd_estimate_gradients_2d_global(__pyx_v_tri, __pyx_t_2, 0, &__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 565, __pyx_L1_error)
   25898          10 :     __Pyx_GOTREF(__pyx_t_3);
   25899          10 :     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   25900          10 :     __pyx_v_rg = __pyx_t_3;
   25901          10 :     __pyx_t_3 = 0;
   25902             : 
   25903             :     /* "scipy/interpolate/_interpnd.pyx":566
   25904             :  *     if np.issubdtype(y.dtype, np.complexfloating):
   25905             :  *         rg = estimate_gradients_2d_global(tri, y.real, maxiter=maxiter, tol=tol)
   25906             :  *         ig = estimate_gradients_2d_global(tri, y.imag, maxiter=maxiter, tol=tol)             # <<<<<<<<<<<<<<
   25907             :  *         r = np.zeros(rg.shape, dtype=complex)
   25908             :  *         r.real = rg
   25909             :  */
   25910          10 :     __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_y, __pyx_n_s_imag); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 566, __pyx_L1_error)
   25911          10 :     __Pyx_GOTREF(__pyx_t_3);
   25912          10 :     __pyx_t_8.__pyx_n = 2;
   25913          10 :     __pyx_t_8.maxiter = __pyx_v_maxiter;
   25914          10 :     __pyx_t_8.tol = __pyx_v_tol;
   25915          10 :     __pyx_t_2 = __pyx_f_5scipy_11interpolate_9_interpnd_estimate_gradients_2d_global(__pyx_v_tri, __pyx_t_3, 0, &__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 566, __pyx_L1_error)
   25916          10 :     __Pyx_GOTREF(__pyx_t_2);
   25917          10 :     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   25918          10 :     __pyx_v_ig = __pyx_t_2;
   25919          10 :     __pyx_t_2 = 0;
   25920             : 
   25921             :     /* "scipy/interpolate/_interpnd.pyx":567
   25922             :  *         rg = estimate_gradients_2d_global(tri, y.real, maxiter=maxiter, tol=tol)
   25923             :  *         ig = estimate_gradients_2d_global(tri, y.imag, maxiter=maxiter, tol=tol)
   25924             :  *         r = np.zeros(rg.shape, dtype=complex)             # <<<<<<<<<<<<<<
   25925             :  *         r.real = rg
   25926             :  *         r.imag = ig
   25927             :  */
   25928          10 :     __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 567, __pyx_L1_error)
   25929          10 :     __Pyx_GOTREF(__pyx_t_2);
   25930          10 :     __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 567, __pyx_L1_error)
   25931          10 :     __Pyx_GOTREF(__pyx_t_3);
   25932          10 :     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   25933          10 :     __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_rg, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 567, __pyx_L1_error)
   25934          10 :     __Pyx_GOTREF(__pyx_t_2);
   25935          10 :     __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 567, __pyx_L1_error)
   25936          10 :     __Pyx_GOTREF(__pyx_t_7);
   25937          10 :     __Pyx_GIVEREF(__pyx_t_2);
   25938          10 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2)) __PYX_ERR(0, 567, __pyx_L1_error);
   25939          10 :     __pyx_t_2 = 0;
   25940          10 :     __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 567, __pyx_L1_error)
   25941          10 :     __Pyx_GOTREF(__pyx_t_2);
   25942          10 :     if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, ((PyObject *)(&PyComplex_Type))) < 0) __PYX_ERR(0, 567, __pyx_L1_error)
   25943          10 :     __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 567, __pyx_L1_error)
   25944          10 :     __Pyx_GOTREF(__pyx_t_1);
   25945          10 :     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   25946          10 :     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   25947          10 :     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   25948          10 :     __pyx_v_r = __pyx_t_1;
   25949          10 :     __pyx_t_1 = 0;
   25950             : 
   25951             :     /* "scipy/interpolate/_interpnd.pyx":568
   25952             :  *         ig = estimate_gradients_2d_global(tri, y.imag, maxiter=maxiter, tol=tol)
   25953             :  *         r = np.zeros(rg.shape, dtype=complex)
   25954             :  *         r.real = rg             # <<<<<<<<<<<<<<
   25955             :  *         r.imag = ig
   25956             :  *         return r
   25957             :  */
   25958          10 :     if (__Pyx_PyObject_SetAttrStr(__pyx_v_r, __pyx_n_s_real, __pyx_v_rg) < 0) __PYX_ERR(0, 568, __pyx_L1_error)
   25959             : 
   25960             :     /* "scipy/interpolate/_interpnd.pyx":569
   25961             :  *         r = np.zeros(rg.shape, dtype=complex)
   25962             :  *         r.real = rg
   25963             :  *         r.imag = ig             # <<<<<<<<<<<<<<
   25964             :  *         return r
   25965             :  * 
   25966             :  */
   25967          10 :     if (__Pyx_PyObject_SetAttrStr(__pyx_v_r, __pyx_n_s_imag, __pyx_v_ig) < 0) __PYX_ERR(0, 569, __pyx_L1_error)
   25968             : 
   25969             :     /* "scipy/interpolate/_interpnd.pyx":570
   25970             :  *         r.real = rg
   25971             :  *         r.imag = ig
   25972             :  *         return r             # <<<<<<<<<<<<<<
   25973             :  * 
   25974             :  *     y_shape = y.shape
   25975             :  */
   25976          10 :     __Pyx_XDECREF(__pyx_r);
   25977          10 :     __Pyx_INCREF(__pyx_v_r);
   25978          10 :     __pyx_r = __pyx_v_r;
   25979          10 :     goto __pyx_L0;
   25980             : 
   25981             :     /* "scipy/interpolate/_interpnd.pyx":564
   25982             :  *         raise ValueError("'y' has a wrong number of items")
   25983             :  * 
   25984             :  *     if np.issubdtype(y.dtype, np.complexfloating):             # <<<<<<<<<<<<<<
   25985             :  *         rg = estimate_gradients_2d_global(tri, y.real, maxiter=maxiter, tol=tol)
   25986             :  *         ig = estimate_gradients_2d_global(tri, y.imag, maxiter=maxiter, tol=tol)
   25987             :  */
   25988             :   }
   25989             : 
   25990             :   /* "scipy/interpolate/_interpnd.pyx":572
   25991             :  *         return r
   25992             :  * 
   25993             :  *     y_shape = y.shape             # <<<<<<<<<<<<<<
   25994             :  * 
   25995             :  *     if y.ndim == 1:
   25996             :  */
   25997          71 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_y, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 572, __pyx_L1_error)
   25998          71 :   __Pyx_GOTREF(__pyx_t_1);
   25999          71 :   __pyx_v_y_shape = __pyx_t_1;
   26000          71 :   __pyx_t_1 = 0;
   26001             : 
   26002             :   /* "scipy/interpolate/_interpnd.pyx":574
   26003             :  *     y_shape = y.shape
   26004             :  * 
   26005             :  *     if y.ndim == 1:             # <<<<<<<<<<<<<<
   26006             :  *         y = y[:,None]
   26007             :  * 
   26008             :  */
   26009          71 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_y, __pyx_n_s_ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 574, __pyx_L1_error)
   26010          71 :   __Pyx_GOTREF(__pyx_t_1);
   26011          71 :   __pyx_t_5 = (__Pyx_PyInt_BoolEqObjC(__pyx_t_1, __pyx_int_1, 1, 0)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 574, __pyx_L1_error)
   26012          71 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   26013          71 :   if (__pyx_t_5) {
   26014             : 
   26015             :     /* "scipy/interpolate/_interpnd.pyx":575
   26016             :  * 
   26017             :  *     if y.ndim == 1:
   26018             :  *         y = y[:,None]             # <<<<<<<<<<<<<<
   26019             :  * 
   26020             :  *     y = y.reshape(tri.npoints, -1).T
   26021             :  */
   26022           5 :     __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_y, __pyx_tuple__11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 575, __pyx_L1_error)
   26023           5 :     __Pyx_GOTREF(__pyx_t_1);
   26024           5 :     __Pyx_DECREF_SET(__pyx_v_y, __pyx_t_1);
   26025             :     __pyx_t_1 = 0;
   26026             : 
   26027             :     /* "scipy/interpolate/_interpnd.pyx":574
   26028             :  *     y_shape = y.shape
   26029             :  * 
   26030             :  *     if y.ndim == 1:             # <<<<<<<<<<<<<<
   26031             :  *         y = y[:,None]
   26032             :  * 
   26033             :  */
   26034             :   }
   26035             : 
   26036             :   /* "scipy/interpolate/_interpnd.pyx":577
   26037             :  *         y = y[:,None]
   26038             :  * 
   26039             :  *     y = y.reshape(tri.npoints, -1).T             # <<<<<<<<<<<<<<
   26040             :  *     y = np.ascontiguousarray(y, dtype=np.float64)
   26041             :  *     yi = np.empty((y.shape[0], y.shape[1], 2))
   26042             :  */
   26043          71 :   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_y, __pyx_n_s_reshape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 577, __pyx_L1_error)
   26044          71 :   __Pyx_GOTREF(__pyx_t_2);
   26045          71 :   __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_tri, __pyx_n_s_npoints); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 577, __pyx_L1_error)
   26046          71 :   __Pyx_GOTREF(__pyx_t_7);
   26047          71 :   __pyx_t_3 = NULL;
   26048          71 :   __pyx_t_4 = 0;
   26049             :   #if CYTHON_UNPACK_METHODS
   26050          71 :   if (likely(PyMethod_Check(__pyx_t_2))) {
   26051           0 :     __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
   26052           0 :     if (likely(__pyx_t_3)) {
   26053           0 :       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
   26054           0 :       __Pyx_INCREF(__pyx_t_3);
   26055           0 :       __Pyx_INCREF(function);
   26056           0 :       __Pyx_DECREF_SET(__pyx_t_2, function);
   26057             :       __pyx_t_4 = 1;
   26058             :     }
   26059             :   }
   26060             :   #endif
   26061             :   {
   26062          71 :     PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_t_7, __pyx_int_neg_1};
   26063          71 :     __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
   26064          71 :     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
   26065          71 :     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   26066          71 :     if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 577, __pyx_L1_error)
   26067          71 :     __Pyx_GOTREF(__pyx_t_1);
   26068          71 :     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   26069             :   }
   26070          71 :   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_T); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 577, __pyx_L1_error)
   26071          71 :   __Pyx_GOTREF(__pyx_t_2);
   26072          71 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   26073          71 :   __Pyx_DECREF_SET(__pyx_v_y, __pyx_t_2);
   26074          71 :   __pyx_t_2 = 0;
   26075             : 
   26076             :   /* "scipy/interpolate/_interpnd.pyx":578
   26077             :  * 
   26078             :  *     y = y.reshape(tri.npoints, -1).T
   26079             :  *     y = np.ascontiguousarray(y, dtype=np.float64)             # <<<<<<<<<<<<<<
   26080             :  *     yi = np.empty((y.shape[0], y.shape[1], 2))
   26081             :  * 
   26082             :  */
   26083          71 :   __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 578, __pyx_L1_error)
   26084          71 :   __Pyx_GOTREF(__pyx_t_2);
   26085          71 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ascontiguousarray); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 578, __pyx_L1_error)
   26086          71 :   __Pyx_GOTREF(__pyx_t_1);
   26087          71 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   26088          71 :   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 578, __pyx_L1_error)
   26089          71 :   __Pyx_GOTREF(__pyx_t_2);
   26090          71 :   __Pyx_INCREF(__pyx_v_y);
   26091          71 :   __Pyx_GIVEREF(__pyx_v_y);
   26092          71 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_y)) __PYX_ERR(0, 578, __pyx_L1_error);
   26093          71 :   __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 578, __pyx_L1_error)
   26094          71 :   __Pyx_GOTREF(__pyx_t_7);
   26095          71 :   __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 578, __pyx_L1_error)
   26096          71 :   __Pyx_GOTREF(__pyx_t_3);
   26097          71 :   __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_float64); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 578, __pyx_L1_error)
   26098          71 :   __Pyx_GOTREF(__pyx_t_6);
   26099          71 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   26100          71 :   if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 578, __pyx_L1_error)
   26101          71 :   __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
   26102          71 :   __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 578, __pyx_L1_error)
   26103          71 :   __Pyx_GOTREF(__pyx_t_6);
   26104          71 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   26105          71 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   26106          71 :   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   26107          71 :   __Pyx_DECREF_SET(__pyx_v_y, __pyx_t_6);
   26108          71 :   __pyx_t_6 = 0;
   26109             : 
   26110             :   /* "scipy/interpolate/_interpnd.pyx":579
   26111             :  *     y = y.reshape(tri.npoints, -1).T
   26112             :  *     y = np.ascontiguousarray(y, dtype=np.float64)
   26113             :  *     yi = np.empty((y.shape[0], y.shape[1], 2))             # <<<<<<<<<<<<<<
   26114             :  * 
   26115             :  *     data = y
   26116             :  */
   26117          71 :   __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 579, __pyx_L1_error)
   26118          71 :   __Pyx_GOTREF(__pyx_t_7);
   26119          71 :   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 579, __pyx_L1_error)
   26120          71 :   __Pyx_GOTREF(__pyx_t_2);
   26121          71 :   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   26122          71 :   __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_y, __pyx_n_s_shape); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 579, __pyx_L1_error)
   26123          71 :   __Pyx_GOTREF(__pyx_t_7);
   26124          71 :   __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_7, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 579, __pyx_L1_error)
   26125          71 :   __Pyx_GOTREF(__pyx_t_1);
   26126          71 :   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   26127          71 :   __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_y, __pyx_n_s_shape); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 579, __pyx_L1_error)
   26128          71 :   __Pyx_GOTREF(__pyx_t_7);
   26129          71 :   __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_7, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 579, __pyx_L1_error)
   26130          71 :   __Pyx_GOTREF(__pyx_t_3);
   26131          71 :   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   26132          71 :   __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 579, __pyx_L1_error)
   26133          71 :   __Pyx_GOTREF(__pyx_t_7);
   26134          71 :   __Pyx_GIVEREF(__pyx_t_1);
   26135          71 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1)) __PYX_ERR(0, 579, __pyx_L1_error);
   26136          71 :   __Pyx_GIVEREF(__pyx_t_3);
   26137          71 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_3)) __PYX_ERR(0, 579, __pyx_L1_error);
   26138          71 :   __Pyx_INCREF(__pyx_int_2);
   26139          71 :   __Pyx_GIVEREF(__pyx_int_2);
   26140          71 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_int_2)) __PYX_ERR(0, 579, __pyx_L1_error);
   26141          71 :   __pyx_t_1 = 0;
   26142          71 :   __pyx_t_3 = 0;
   26143          71 :   __pyx_t_3 = NULL;
   26144          71 :   __pyx_t_4 = 0;
   26145             :   #if CYTHON_UNPACK_METHODS
   26146          71 :   if (unlikely(PyMethod_Check(__pyx_t_2))) {
   26147           0 :     __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
   26148           0 :     if (likely(__pyx_t_3)) {
   26149           0 :       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
   26150           0 :       __Pyx_INCREF(__pyx_t_3);
   26151           0 :       __Pyx_INCREF(function);
   26152           0 :       __Pyx_DECREF_SET(__pyx_t_2, function);
   26153             :       __pyx_t_4 = 1;
   26154             :     }
   26155             :   }
   26156             :   #endif
   26157             :   {
   26158          71 :     PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_7};
   26159          71 :     __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
   26160          71 :     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
   26161          71 :     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   26162          71 :     if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 579, __pyx_L1_error)
   26163          71 :     __Pyx_GOTREF(__pyx_t_6);
   26164          71 :     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   26165             :   }
   26166          71 :   __pyx_v_yi = __pyx_t_6;
   26167          71 :   __pyx_t_6 = 0;
   26168             : 
   26169             :   /* "scipy/interpolate/_interpnd.pyx":581
   26170             :  *     yi = np.empty((y.shape[0], y.shape[1], 2))
   26171             :  * 
   26172             :  *     data = y             # <<<<<<<<<<<<<<
   26173             :  *     grad = yi
   26174             :  * 
   26175             :  */
   26176          71 :   __pyx_t_9 = __Pyx_PyObject_to_MemoryviewSlice_d_dc_double__const__(__pyx_v_y, 0); if (unlikely(!__pyx_t_9.memview)) __PYX_ERR(0, 581, __pyx_L1_error)
   26177          71 :   __pyx_v_data = __pyx_t_9;
   26178          71 :   __pyx_t_9.memview = NULL;
   26179          71 :   __pyx_t_9.data = NULL;
   26180             : 
   26181             :   /* "scipy/interpolate/_interpnd.pyx":582
   26182             :  * 
   26183             :  *     data = y
   26184             :  *     grad = yi             # <<<<<<<<<<<<<<
   26185             :  * 
   26186             :  *     qhull._get_delaunay_info(&info, tri, 0, 0, 1)
   26187             :  */
   26188          71 :   __pyx_t_10 = __Pyx_PyObject_to_MemoryviewSlice_d_d_dc_double(__pyx_v_yi, PyBUF_WRITABLE); if (unlikely(!__pyx_t_10.memview)) __PYX_ERR(0, 582, __pyx_L1_error)
   26189          71 :   __pyx_v_grad = __pyx_t_10;
   26190          71 :   __pyx_t_10.memview = NULL;
   26191          71 :   __pyx_t_10.data = NULL;
   26192             : 
   26193             :   /* "scipy/interpolate/_interpnd.pyx":584
   26194             :  *     grad = yi
   26195             :  * 
   26196             :  *     qhull._get_delaunay_info(&info, tri, 0, 0, 1)             # <<<<<<<<<<<<<<
   26197             :  *     nvalues = data.shape[0]
   26198             :  * 
   26199             :  */
   26200          71 :   __pyx_t_11 = __pyx_f_5scipy_7spatial_6_qhull__get_delaunay_info((&__pyx_v_info), __pyx_v_tri, 0, 0, 1); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 584, __pyx_L1_error)
   26201             : 
   26202             :   /* "scipy/interpolate/_interpnd.pyx":585
   26203             :  * 
   26204             :  *     qhull._get_delaunay_info(&info, tri, 0, 0, 1)
   26205             :  *     nvalues = data.shape[0]             # <<<<<<<<<<<<<<
   26206             :  * 
   26207             :  *     for k in range(nvalues):
   26208             :  */
   26209          71 :   __pyx_v_nvalues = (__pyx_v_data.shape[0]);
   26210             : 
   26211             :   /* "scipy/interpolate/_interpnd.pyx":587
   26212             :  *     nvalues = data.shape[0]
   26213             :  * 
   26214             :  *     for k in range(nvalues):             # <<<<<<<<<<<<<<
   26215             :  *         with nogil:
   26216             :  *             ret = _estimate_gradients_2d_global(
   26217             :  */
   26218          71 :   __pyx_t_11 = __pyx_v_nvalues;
   26219          71 :   __pyx_t_12 = __pyx_t_11;
   26220         146 :   for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_12; __pyx_t_13+=1) {
   26221          75 :     __pyx_v_k = __pyx_t_13;
   26222             : 
   26223             :     /* "scipy/interpolate/_interpnd.pyx":588
   26224             :  * 
   26225             :  *     for k in range(nvalues):
   26226             :  *         with nogil:             # <<<<<<<<<<<<<<
   26227             :  *             ret = _estimate_gradients_2d_global(
   26228             :  *                 &info,
   26229             :  */
   26230             :     {
   26231             :         #ifdef WITH_THREAD
   26232          75 :         PyThreadState *_save;
   26233          75 :         _save = NULL;
   26234          75 :         Py_UNBLOCK_THREADS
   26235          75 :         __Pyx_FastGIL_Remember();
   26236             :         #endif
   26237             :         /*try:*/ {
   26238             : 
   26239             :           /* "scipy/interpolate/_interpnd.pyx":591
   26240             :  *             ret = _estimate_gradients_2d_global(
   26241             :  *                 &info,
   26242             :  *                 &data[k,0],             # <<<<<<<<<<<<<<
   26243             :  *                 maxiter,
   26244             :  *                 tol,
   26245             :  */
   26246          75 :           __pyx_t_14 = __pyx_v_k;
   26247          75 :           __pyx_t_15 = 0;
   26248             : 
   26249             :           /* "scipy/interpolate/_interpnd.pyx":594
   26250             :  *                 maxiter,
   26251             :  *                 tol,
   26252             :  *                 &grad[k,0,0])             # <<<<<<<<<<<<<<
   26253             :  * 
   26254             :  *         if ret == 0:
   26255             :  */
   26256          75 :           __pyx_t_16 = __pyx_v_k;
   26257          75 :           __pyx_t_17 = 0;
   26258          75 :           __pyx_t_18 = 0;
   26259             : 
   26260             :           /* "scipy/interpolate/_interpnd.pyx":589
   26261             :  *     for k in range(nvalues):
   26262             :  *         with nogil:
   26263             :  *             ret = _estimate_gradients_2d_global(             # <<<<<<<<<<<<<<
   26264             :  *                 &info,
   26265             :  *                 &data[k,0],
   26266             :  */
   26267          75 :           __pyx_v_ret = __pyx_f_5scipy_11interpolate_9_interpnd__estimate_gradients_2d_global((&__pyx_v_info), (&(*((double const  *) ( /* dim=1 */ ((char *) (((double const  *) ( /* dim=0 */ (__pyx_v_data.data + __pyx_t_14 * __pyx_v_data.strides[0]) )) + __pyx_t_15)) )))), __pyx_v_maxiter, __pyx_v_tol, (&(*((double *) ( /* dim=2 */ ((char *) (((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_grad.data + __pyx_t_16 * __pyx_v_grad.strides[0]) ) + __pyx_t_17 * __pyx_v_grad.strides[1]) )) + __pyx_t_18)) )))));
   26268             :         }
   26269             : 
   26270             :         /* "scipy/interpolate/_interpnd.pyx":588
   26271             :  * 
   26272             :  *     for k in range(nvalues):
   26273             :  *         with nogil:             # <<<<<<<<<<<<<<
   26274             :  *             ret = _estimate_gradients_2d_global(
   26275             :  *                 &info,
   26276             :  */
   26277             :         /*finally:*/ {
   26278             :           /*normal exit:*/{
   26279             :             #ifdef WITH_THREAD
   26280          75 :             __Pyx_FastGIL_Forget();
   26281          75 :             Py_BLOCK_THREADS
   26282             :             #endif
   26283          75 :             goto __pyx_L12;
   26284             :           }
   26285          75 :           __pyx_L12:;
   26286             :         }
   26287             :     }
   26288             : 
   26289             :     /* "scipy/interpolate/_interpnd.pyx":596
   26290             :  *                 &grad[k,0,0])
   26291             :  * 
   26292             :  *         if ret == 0:             # <<<<<<<<<<<<<<
   26293             :  *             warnings.warn("Gradient estimation did not converge, "
   26294             :  *                           "the results may be inaccurate",
   26295             :  */
   26296          75 :     __pyx_t_5 = (__pyx_v_ret == 0);
   26297          75 :     if (__pyx_t_5) {
   26298             : 
   26299             :       /* "scipy/interpolate/_interpnd.pyx":597
   26300             :  * 
   26301             :  *         if ret == 0:
   26302             :  *             warnings.warn("Gradient estimation did not converge, "             # <<<<<<<<<<<<<<
   26303             :  *                           "the results may be inaccurate",
   26304             :  *                           GradientEstimationWarning)
   26305             :  */
   26306           1 :       __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_warnings); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 597, __pyx_L1_error)
   26307           1 :       __Pyx_GOTREF(__pyx_t_2);
   26308           1 :       __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_warn); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 597, __pyx_L1_error)
   26309           1 :       __Pyx_GOTREF(__pyx_t_7);
   26310           1 :       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   26311             : 
   26312             :       /* "scipy/interpolate/_interpnd.pyx":599
   26313             :  *             warnings.warn("Gradient estimation did not converge, "
   26314             :  *                           "the results may be inaccurate",
   26315             :  *                           GradientEstimationWarning)             # <<<<<<<<<<<<<<
   26316             :  * 
   26317             :  *     return yi.transpose(1, 0, 2).reshape(y_shape + (2,))
   26318             :  */
   26319           1 :       __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_GradientEstimationWarning); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 599, __pyx_L1_error)
   26320           1 :       __Pyx_GOTREF(__pyx_t_2);
   26321           1 :       __pyx_t_3 = NULL;
   26322           1 :       __pyx_t_4 = 0;
   26323             :       #if CYTHON_UNPACK_METHODS
   26324           1 :       if (unlikely(PyMethod_Check(__pyx_t_7))) {
   26325           0 :         __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
   26326           0 :         if (likely(__pyx_t_3)) {
   26327           0 :           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
   26328           0 :           __Pyx_INCREF(__pyx_t_3);
   26329           0 :           __Pyx_INCREF(function);
   26330           0 :           __Pyx_DECREF_SET(__pyx_t_7, function);
   26331             :           __pyx_t_4 = 1;
   26332             :         }
   26333             :       }
   26334             :       #endif
   26335             :       {
   26336           1 :         PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_kp_u_Gradient_estimation_did_not_conv, __pyx_t_2};
   26337           1 :         __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
   26338           1 :         __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
   26339           1 :         __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   26340           1 :         if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 597, __pyx_L1_error)
   26341           1 :         __Pyx_GOTREF(__pyx_t_6);
   26342           1 :         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   26343             :       }
   26344          75 :       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
   26345             : 
   26346             :       /* "scipy/interpolate/_interpnd.pyx":596
   26347             :  *                 &grad[k,0,0])
   26348             :  * 
   26349             :  *         if ret == 0:             # <<<<<<<<<<<<<<
   26350             :  *             warnings.warn("Gradient estimation did not converge, "
   26351             :  *                           "the results may be inaccurate",
   26352             :  */
   26353             :     }
   26354             :   }
   26355             : 
   26356             :   /* "scipy/interpolate/_interpnd.pyx":601
   26357             :  *                           GradientEstimationWarning)
   26358             :  * 
   26359             :  *     return yi.transpose(1, 0, 2).reshape(y_shape + (2,))             # <<<<<<<<<<<<<<
   26360             :  * 
   26361             :  * 
   26362             :  */
   26363          71 :   __Pyx_XDECREF(__pyx_r);
   26364          71 :   __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_yi, __pyx_n_s_transpose); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 601, __pyx_L1_error)
   26365          71 :   __Pyx_GOTREF(__pyx_t_7);
   26366          71 :   __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 601, __pyx_L1_error)
   26367          71 :   __Pyx_GOTREF(__pyx_t_2);
   26368          71 :   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   26369          71 :   __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_reshape); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 601, __pyx_L1_error)
   26370          71 :   __Pyx_GOTREF(__pyx_t_7);
   26371          71 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   26372          71 :   __pyx_t_2 = PyNumber_Add(__pyx_v_y_shape, __pyx_tuple__25); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 601, __pyx_L1_error)
   26373          71 :   __Pyx_GOTREF(__pyx_t_2);
   26374          71 :   __pyx_t_3 = NULL;
   26375          71 :   __pyx_t_4 = 0;
   26376             :   #if CYTHON_UNPACK_METHODS
   26377          71 :   if (likely(PyMethod_Check(__pyx_t_7))) {
   26378           0 :     __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
   26379           0 :     if (likely(__pyx_t_3)) {
   26380           0 :       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
   26381           0 :       __Pyx_INCREF(__pyx_t_3);
   26382           0 :       __Pyx_INCREF(function);
   26383           0 :       __Pyx_DECREF_SET(__pyx_t_7, function);
   26384             :       __pyx_t_4 = 1;
   26385             :     }
   26386             :   }
   26387             :   #endif
   26388             :   {
   26389          71 :     PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_2};
   26390          71 :     __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
   26391          71 :     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
   26392          71 :     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   26393          71 :     if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 601, __pyx_L1_error)
   26394          71 :     __Pyx_GOTREF(__pyx_t_6);
   26395          71 :     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   26396             :   }
   26397          71 :   __pyx_r = __pyx_t_6;
   26398          71 :   __pyx_t_6 = 0;
   26399          71 :   goto __pyx_L0;
   26400             : 
   26401             :   /* "scipy/interpolate/_interpnd.pyx":553
   26402             :  * @cython.boundscheck(False)
   26403             :  * @cython.wraparound(False)
   26404             :  * cpdef estimate_gradients_2d_global(tri, y, int maxiter=400, double tol=1e-6):             # <<<<<<<<<<<<<<
   26405             :  *     cdef const double[:,::1] data
   26406             :  *     cdef double[:,:,::1] grad
   26407             :  */
   26408             : 
   26409             :   /* function exit code */
   26410           0 :   __pyx_L1_error:;
   26411           0 :   __Pyx_XDECREF(__pyx_t_1);
   26412           0 :   __Pyx_XDECREF(__pyx_t_2);
   26413           0 :   __Pyx_XDECREF(__pyx_t_3);
   26414           0 :   __Pyx_XDECREF(__pyx_t_6);
   26415           0 :   __Pyx_XDECREF(__pyx_t_7);
   26416           0 :   __PYX_XCLEAR_MEMVIEW(&__pyx_t_9, 1);
   26417           0 :   __PYX_XCLEAR_MEMVIEW(&__pyx_t_10, 1);
   26418           0 :   __Pyx_AddTraceback("scipy.interpolate._interpnd.estimate_gradients_2d_global", __pyx_clineno, __pyx_lineno, __pyx_filename);
   26419           0 :   __pyx_r = 0;
   26420          81 :   __pyx_L0:;
   26421          81 :   __PYX_XCLEAR_MEMVIEW(&__pyx_v_data, 1);
   26422          81 :   __PYX_XCLEAR_MEMVIEW(&__pyx_v_grad, 1);
   26423          81 :   __Pyx_XDECREF(__pyx_v_rg);
   26424          81 :   __Pyx_XDECREF(__pyx_v_ig);
   26425          81 :   __Pyx_XDECREF(__pyx_v_r);
   26426          81 :   __Pyx_XDECREF(__pyx_v_y_shape);
   26427          81 :   __Pyx_XDECREF(__pyx_v_yi);
   26428          81 :   __Pyx_XDECREF(__pyx_v_y);
   26429          81 :   __Pyx_XGIVEREF(__pyx_r);
   26430          81 :   __Pyx_RefNannyFinishContext();
   26431          81 :   return __pyx_r;
   26432             : }
   26433             : 
   26434             : /* Python wrapper */
   26435             : static PyObject *__pyx_pw_5scipy_11interpolate_9_interpnd_3estimate_gradients_2d_global(PyObject *__pyx_self, 
   26436             : #if CYTHON_METH_FASTCALL
   26437             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   26438             : #else
   26439             : PyObject *__pyx_args, PyObject *__pyx_kwds
   26440             : #endif
   26441             : ); /*proto*/
   26442             : static PyMethodDef __pyx_mdef_5scipy_11interpolate_9_interpnd_3estimate_gradients_2d_global = {"estimate_gradients_2d_global", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5scipy_11interpolate_9_interpnd_3estimate_gradients_2d_global, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
   26443           5 : static PyObject *__pyx_pw_5scipy_11interpolate_9_interpnd_3estimate_gradients_2d_global(PyObject *__pyx_self, 
   26444             : #if CYTHON_METH_FASTCALL
   26445             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   26446             : #else
   26447             : PyObject *__pyx_args, PyObject *__pyx_kwds
   26448             : #endif
   26449             : ) {
   26450           5 :   PyObject *__pyx_v_tri = 0;
   26451           5 :   PyObject *__pyx_v_y = 0;
   26452           5 :   int __pyx_v_maxiter;
   26453           5 :   double __pyx_v_tol;
   26454             :   #if !CYTHON_METH_FASTCALL
   26455             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
   26456             :   #endif
   26457           5 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   26458           5 :   PyObject* values[4] = {0,0,0,0};
   26459           5 :   int __pyx_lineno = 0;
   26460           5 :   const char *__pyx_filename = NULL;
   26461           5 :   int __pyx_clineno = 0;
   26462           5 :   PyObject *__pyx_r = 0;
   26463             :   __Pyx_RefNannyDeclarations
   26464           5 :   __Pyx_RefNannySetupContext("estimate_gradients_2d_global (wrapper)", 0);
   26465             :   #if !CYTHON_METH_FASTCALL
   26466             :   #if CYTHON_ASSUME_SAFE_MACROS
   26467             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
   26468             :   #else
   26469             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
   26470             :   #endif
   26471             :   #endif
   26472           5 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
   26473             :   {
   26474           5 :     PyObject **__pyx_pyargnames[] = {&__pyx_n_s_tri,&__pyx_n_s_y,&__pyx_n_s_maxiter,&__pyx_n_s_tol,0};
   26475           5 :     if (__pyx_kwds) {
   26476           5 :       Py_ssize_t kw_args;
   26477           5 :       switch (__pyx_nargs) {
   26478           0 :         case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
   26479           0 :         CYTHON_FALLTHROUGH;
   26480           0 :         case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
   26481           5 :         CYTHON_FALLTHROUGH;
   26482           5 :         case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
   26483           5 :         CYTHON_FALLTHROUGH;
   26484           5 :         case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
   26485           5 :         CYTHON_FALLTHROUGH;
   26486           5 :         case  0: break;
   26487           0 :         default: goto __pyx_L5_argtuple_error;
   26488             :       }
   26489           5 :       kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
   26490           5 :       switch (__pyx_nargs) {
   26491           0 :         case  0:
   26492           0 :         if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_tri)) != 0)) {
   26493           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
   26494           0 :           kw_args--;
   26495             :         }
   26496           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 553, __pyx_L3_error)
   26497           0 :         else goto __pyx_L5_argtuple_error;
   26498           0 :         CYTHON_FALLTHROUGH;
   26499             :         case  1:
   26500           0 :         if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_y)) != 0)) {
   26501           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
   26502           0 :           kw_args--;
   26503             :         }
   26504           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 553, __pyx_L3_error)
   26505             :         else {
   26506           0 :           __Pyx_RaiseArgtupleInvalid("estimate_gradients_2d_global", 0, 2, 4, 1); __PYX_ERR(0, 553, __pyx_L3_error)
   26507             :         }
   26508           5 :         CYTHON_FALLTHROUGH;
   26509             :         case  2:
   26510           5 :         if (kw_args > 0) {
   26511           5 :           PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_maxiter);
   26512           5 :           if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
   26513           4 :           else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 553, __pyx_L3_error)
   26514             :         }
   26515           5 :         CYTHON_FALLTHROUGH;
   26516             :         case  3:
   26517           5 :         if (kw_args > 0) {
   26518           4 :           PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_tol);
   26519           4 :           if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
   26520           0 :           else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 553, __pyx_L3_error)
   26521             :         }
   26522             :       }
   26523           5 :       if (unlikely(kw_args > 0)) {
   26524           0 :         const Py_ssize_t kwd_pos_args = __pyx_nargs;
   26525           0 :         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "estimate_gradients_2d_global") < 0)) __PYX_ERR(0, 553, __pyx_L3_error)
   26526             :       }
   26527             :     } else {
   26528           0 :       switch (__pyx_nargs) {
   26529           0 :         case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
   26530           0 :         CYTHON_FALLTHROUGH;
   26531           0 :         case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
   26532           0 :         CYTHON_FALLTHROUGH;
   26533           0 :         case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
   26534           0 :         values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
   26535           0 :         break;
   26536           0 :         default: goto __pyx_L5_argtuple_error;
   26537             :       }
   26538             :     }
   26539           5 :     __pyx_v_tri = values[0];
   26540           5 :     __pyx_v_y = values[1];
   26541           5 :     if (values[2]) {
   26542           1 :       __pyx_v_maxiter = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_maxiter == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 553, __pyx_L3_error)
   26543             :     } else {
   26544             :       __pyx_v_maxiter = ((int)0x190);
   26545             :     }
   26546           5 :     if (values[3]) {
   26547           4 :       __pyx_v_tol = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_tol == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 553, __pyx_L3_error)
   26548             :     } else {
   26549             :       __pyx_v_tol = ((double)1e-6);
   26550             :     }
   26551             :   }
   26552           5 :   goto __pyx_L6_skip;
   26553           0 :   __pyx_L5_argtuple_error:;
   26554           0 :   __Pyx_RaiseArgtupleInvalid("estimate_gradients_2d_global", 0, 2, 4, __pyx_nargs); __PYX_ERR(0, 553, __pyx_L3_error)
   26555           5 :   __pyx_L6_skip:;
   26556           5 :   goto __pyx_L4_argument_unpacking_done;
   26557           0 :   __pyx_L3_error:;
   26558             :   {
   26559           0 :     Py_ssize_t __pyx_temp;
   26560           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   26561             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
   26562             :     }
   26563             :   }
   26564           0 :   __Pyx_AddTraceback("scipy.interpolate._interpnd.estimate_gradients_2d_global", __pyx_clineno, __pyx_lineno, __pyx_filename);
   26565           0 :   __Pyx_RefNannyFinishContext();
   26566           0 :   return NULL;
   26567           5 :   __pyx_L4_argument_unpacking_done:;
   26568           5 :   __pyx_r = __pyx_pf_5scipy_11interpolate_9_interpnd_2estimate_gradients_2d_global(__pyx_self, __pyx_v_tri, __pyx_v_y, __pyx_v_maxiter, __pyx_v_tol);
   26569             : 
   26570             :   /* function exit code */
   26571             :   {
   26572           5 :     Py_ssize_t __pyx_temp;
   26573           5 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   26574             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
   26575             :     }
   26576             :   }
   26577             :   __Pyx_RefNannyFinishContext();
   26578             :   return __pyx_r;
   26579             : }
   26580             : 
   26581           5 : static PyObject *__pyx_pf_5scipy_11interpolate_9_interpnd_2estimate_gradients_2d_global(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_tri, PyObject *__pyx_v_y, int __pyx_v_maxiter, double __pyx_v_tol) {
   26582           5 :   PyObject *__pyx_r = NULL;
   26583             :   __Pyx_RefNannyDeclarations
   26584           5 :   PyObject *__pyx_t_1 = NULL;
   26585           5 :   struct __pyx_opt_args_5scipy_11interpolate_9_interpnd_estimate_gradients_2d_global __pyx_t_2;
   26586           5 :   int __pyx_lineno = 0;
   26587           5 :   const char *__pyx_filename = NULL;
   26588           5 :   int __pyx_clineno = 0;
   26589           5 :   __Pyx_RefNannySetupContext("estimate_gradients_2d_global", 1);
   26590           5 :   __Pyx_XDECREF(__pyx_r);
   26591           5 :   __pyx_t_2.__pyx_n = 2;
   26592           5 :   __pyx_t_2.maxiter = __pyx_v_maxiter;
   26593           5 :   __pyx_t_2.tol = __pyx_v_tol;
   26594           5 :   __pyx_t_1 = __pyx_f_5scipy_11interpolate_9_interpnd_estimate_gradients_2d_global(__pyx_v_tri, __pyx_v_y, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 553, __pyx_L1_error)
   26595           5 :   __Pyx_GOTREF(__pyx_t_1);
   26596           5 :   __pyx_r = __pyx_t_1;
   26597           5 :   __pyx_t_1 = 0;
   26598           5 :   goto __pyx_L0;
   26599             : 
   26600             :   /* function exit code */
   26601           0 :   __pyx_L1_error:;
   26602           0 :   __Pyx_XDECREF(__pyx_t_1);
   26603           0 :   __Pyx_AddTraceback("scipy.interpolate._interpnd.estimate_gradients_2d_global", __pyx_clineno, __pyx_lineno, __pyx_filename);
   26604           0 :   __pyx_r = NULL;
   26605           5 :   __pyx_L0:;
   26606           5 :   __Pyx_XGIVEREF(__pyx_r);
   26607           5 :   __Pyx_RefNannyFinishContext();
   26608           5 :   return __pyx_r;
   26609             : }
   26610             : 
   26611             : /* "scipy/interpolate/_interpnd.pyx":610
   26612             :  * 
   26613             :  * @cython.cdivision(True)
   26614             :  * cdef double_or_complex _clough_tocher_2d_single(const qhull.DelaunayInfo_t *d,             # <<<<<<<<<<<<<<
   26615             :  *                                                 int isimplex,
   26616             :  *                                                 double *b,
   26617             :  */
   26618             : 
   26619        6838 : static double __pyx_fuse_0__pyx_f_5scipy_11interpolate_9_interpnd__clough_tocher_2d_single(__pyx_t_5scipy_7spatial_6_qhull_DelaunayInfo_t const *__pyx_v_d, int __pyx_v_isimplex, double *__pyx_v_b, double *__pyx_v_f, double *__pyx_v_df) {
   26620        6838 :   double __pyx_v_c3000;
   26621        6838 :   double __pyx_v_c0300;
   26622        6838 :   double __pyx_v_c0030;
   26623        6838 :   double __pyx_v_c0003;
   26624        6838 :   double __pyx_v_c2100;
   26625        6838 :   double __pyx_v_c2010;
   26626        6838 :   double __pyx_v_c2001;
   26627        6838 :   double __pyx_v_c0210;
   26628        6838 :   double __pyx_v_c0201;
   26629        6838 :   double __pyx_v_c0021;
   26630        6838 :   double __pyx_v_c1200;
   26631        6838 :   double __pyx_v_c1020;
   26632        6838 :   double __pyx_v_c1002;
   26633        6838 :   double __pyx_v_c0120;
   26634        6838 :   double __pyx_v_c0102;
   26635        6838 :   double __pyx_v_c0012;
   26636        6838 :   double __pyx_v_c1101;
   26637        6838 :   double __pyx_v_c1011;
   26638        6838 :   double __pyx_v_c0111;
   26639        6838 :   double __pyx_v_f1;
   26640        6838 :   double __pyx_v_f2;
   26641        6838 :   double __pyx_v_f3;
   26642        6838 :   double __pyx_v_df12;
   26643        6838 :   double __pyx_v_df13;
   26644        6838 :   double __pyx_v_df21;
   26645        6838 :   double __pyx_v_df23;
   26646        6838 :   double __pyx_v_df31;
   26647        6838 :   double __pyx_v_df32;
   26648        6838 :   double __pyx_v_g[3];
   26649        6838 :   double __pyx_v_e12x;
   26650        6838 :   double __pyx_v_e12y;
   26651        6838 :   double __pyx_v_e23x;
   26652        6838 :   double __pyx_v_e23y;
   26653        6838 :   double __pyx_v_e31x;
   26654        6838 :   double __pyx_v_e31y;
   26655        6838 :   double __pyx_v_w;
   26656        6838 :   double __pyx_v_minval;
   26657        6838 :   double __pyx_v_b1;
   26658        6838 :   double __pyx_v_b2;
   26659        6838 :   double __pyx_v_b3;
   26660        6838 :   double __pyx_v_b4;
   26661        6838 :   int __pyx_v_k;
   26662        6838 :   int __pyx_v_itri;
   26663        6838 :   double __pyx_v_c[3];
   26664        6838 :   double __pyx_v_y[2];
   26665        6838 :   double __pyx_r;
   26666        6838 :   int __pyx_t_1;
   26667        6838 :   int __pyx_t_2;
   26668             : 
   26669             :   /* "scipy/interpolate/_interpnd.pyx":666
   26670             :  * 
   26671             :  *     e12x = (+ d.points[0 + 2*d.simplices[3*isimplex + 1]]
   26672             :  *             - d.points[0 + 2*d.simplices[3*isimplex + 0]])             # <<<<<<<<<<<<<<
   26673             :  *     e12y = (+ d.points[1 + 2*d.simplices[3*isimplex + 1]]
   26674             :  *             - d.points[1 + 2*d.simplices[3*isimplex + 0]])
   26675             :  */
   26676        6838 :   __pyx_v_e12x = ((__pyx_v_d->points[(0 + (2 * (__pyx_v_d->simplices[((3 * __pyx_v_isimplex) + 1)])))]) - (__pyx_v_d->points[(0 + (2 * (__pyx_v_d->simplices[((3 * __pyx_v_isimplex) + 0)])))]));
   26677             : 
   26678             :   /* "scipy/interpolate/_interpnd.pyx":668
   26679             :  *             - d.points[0 + 2*d.simplices[3*isimplex + 0]])
   26680             :  *     e12y = (+ d.points[1 + 2*d.simplices[3*isimplex + 1]]
   26681             :  *             - d.points[1 + 2*d.simplices[3*isimplex + 0]])             # <<<<<<<<<<<<<<
   26682             :  * 
   26683             :  *     e23x = (+ d.points[0 + 2*d.simplices[3*isimplex + 2]]
   26684             :  */
   26685        6838 :   __pyx_v_e12y = ((__pyx_v_d->points[(1 + (2 * (__pyx_v_d->simplices[((3 * __pyx_v_isimplex) + 1)])))]) - (__pyx_v_d->points[(1 + (2 * (__pyx_v_d->simplices[((3 * __pyx_v_isimplex) + 0)])))]));
   26686             : 
   26687             :   /* "scipy/interpolate/_interpnd.pyx":671
   26688             :  * 
   26689             :  *     e23x = (+ d.points[0 + 2*d.simplices[3*isimplex + 2]]
   26690             :  *             - d.points[0 + 2*d.simplices[3*isimplex + 1]])             # <<<<<<<<<<<<<<
   26691             :  *     e23y = (+ d.points[1 + 2*d.simplices[3*isimplex + 2]]
   26692             :  *             - d.points[1 + 2*d.simplices[3*isimplex + 1]])
   26693             :  */
   26694        6838 :   __pyx_v_e23x = ((__pyx_v_d->points[(0 + (2 * (__pyx_v_d->simplices[((3 * __pyx_v_isimplex) + 2)])))]) - (__pyx_v_d->points[(0 + (2 * (__pyx_v_d->simplices[((3 * __pyx_v_isimplex) + 1)])))]));
   26695             : 
   26696             :   /* "scipy/interpolate/_interpnd.pyx":673
   26697             :  *             - d.points[0 + 2*d.simplices[3*isimplex + 1]])
   26698             :  *     e23y = (+ d.points[1 + 2*d.simplices[3*isimplex + 2]]
   26699             :  *             - d.points[1 + 2*d.simplices[3*isimplex + 1]])             # <<<<<<<<<<<<<<
   26700             :  * 
   26701             :  *     e31x = (+ d.points[0 + 2*d.simplices[3*isimplex + 0]]
   26702             :  */
   26703        6838 :   __pyx_v_e23y = ((__pyx_v_d->points[(1 + (2 * (__pyx_v_d->simplices[((3 * __pyx_v_isimplex) + 2)])))]) - (__pyx_v_d->points[(1 + (2 * (__pyx_v_d->simplices[((3 * __pyx_v_isimplex) + 1)])))]));
   26704             : 
   26705             :   /* "scipy/interpolate/_interpnd.pyx":676
   26706             :  * 
   26707             :  *     e31x = (+ d.points[0 + 2*d.simplices[3*isimplex + 0]]
   26708             :  *             - d.points[0 + 2*d.simplices[3*isimplex + 2]])             # <<<<<<<<<<<<<<
   26709             :  *     e31y = (+ d.points[1 + 2*d.simplices[3*isimplex + 0]]
   26710             :  *             - d.points[1 + 2*d.simplices[3*isimplex + 2]])
   26711             :  */
   26712        6838 :   __pyx_v_e31x = ((__pyx_v_d->points[(0 + (2 * (__pyx_v_d->simplices[((3 * __pyx_v_isimplex) + 0)])))]) - (__pyx_v_d->points[(0 + (2 * (__pyx_v_d->simplices[((3 * __pyx_v_isimplex) + 2)])))]));
   26713             : 
   26714             :   /* "scipy/interpolate/_interpnd.pyx":678
   26715             :  *             - d.points[0 + 2*d.simplices[3*isimplex + 2]])
   26716             :  *     e31y = (+ d.points[1 + 2*d.simplices[3*isimplex + 0]]
   26717             :  *             - d.points[1 + 2*d.simplices[3*isimplex + 2]])             # <<<<<<<<<<<<<<
   26718             :  * 
   26719             :  *     f1 = f[0]
   26720             :  */
   26721        6838 :   __pyx_v_e31y = ((__pyx_v_d->points[(1 + (2 * (__pyx_v_d->simplices[((3 * __pyx_v_isimplex) + 0)])))]) - (__pyx_v_d->points[(1 + (2 * (__pyx_v_d->simplices[((3 * __pyx_v_isimplex) + 2)])))]));
   26722             : 
   26723             :   /* "scipy/interpolate/_interpnd.pyx":680
   26724             :  *             - d.points[1 + 2*d.simplices[3*isimplex + 2]])
   26725             :  * 
   26726             :  *     f1 = f[0]             # <<<<<<<<<<<<<<
   26727             :  *     f2 = f[1]
   26728             :  *     f3 = f[2]
   26729             :  */
   26730        6838 :   __pyx_v_f1 = (__pyx_v_f[0]);
   26731             : 
   26732             :   /* "scipy/interpolate/_interpnd.pyx":681
   26733             :  * 
   26734             :  *     f1 = f[0]
   26735             :  *     f2 = f[1]             # <<<<<<<<<<<<<<
   26736             :  *     f3 = f[2]
   26737             :  * 
   26738             :  */
   26739        6838 :   __pyx_v_f2 = (__pyx_v_f[1]);
   26740             : 
   26741             :   /* "scipy/interpolate/_interpnd.pyx":682
   26742             :  *     f1 = f[0]
   26743             :  *     f2 = f[1]
   26744             :  *     f3 = f[2]             # <<<<<<<<<<<<<<
   26745             :  * 
   26746             :  *     df12 = +(df[2*0+0]*e12x + df[2*0+1]*e12y)
   26747             :  */
   26748        6838 :   __pyx_v_f3 = (__pyx_v_f[2]);
   26749             : 
   26750             :   /* "scipy/interpolate/_interpnd.pyx":684
   26751             :  *     f3 = f[2]
   26752             :  * 
   26753             :  *     df12 = +(df[2*0+0]*e12x + df[2*0+1]*e12y)             # <<<<<<<<<<<<<<
   26754             :  *     df21 = -(df[2*1+0]*e12x + df[2*1+1]*e12y)
   26755             :  *     df23 = +(df[2*1+0]*e23x + df[2*1+1]*e23y)
   26756             :  */
   26757        6838 :   __pyx_v_df12 = (((__pyx_v_df[0x0]) * __pyx_v_e12x) + ((__pyx_v_df[0x1]) * __pyx_v_e12y));
   26758             : 
   26759             :   /* "scipy/interpolate/_interpnd.pyx":685
   26760             :  * 
   26761             :  *     df12 = +(df[2*0+0]*e12x + df[2*0+1]*e12y)
   26762             :  *     df21 = -(df[2*1+0]*e12x + df[2*1+1]*e12y)             # <<<<<<<<<<<<<<
   26763             :  *     df23 = +(df[2*1+0]*e23x + df[2*1+1]*e23y)
   26764             :  *     df32 = -(df[2*2+0]*e23x + df[2*2+1]*e23y)
   26765             :  */
   26766        6838 :   __pyx_v_df21 = (-(((__pyx_v_df[0x2]) * __pyx_v_e12x) + ((__pyx_v_df[0x3]) * __pyx_v_e12y)));
   26767             : 
   26768             :   /* "scipy/interpolate/_interpnd.pyx":686
   26769             :  *     df12 = +(df[2*0+0]*e12x + df[2*0+1]*e12y)
   26770             :  *     df21 = -(df[2*1+0]*e12x + df[2*1+1]*e12y)
   26771             :  *     df23 = +(df[2*1+0]*e23x + df[2*1+1]*e23y)             # <<<<<<<<<<<<<<
   26772             :  *     df32 = -(df[2*2+0]*e23x + df[2*2+1]*e23y)
   26773             :  *     df31 = +(df[2*2+0]*e31x + df[2*2+1]*e31y)
   26774             :  */
   26775        6838 :   __pyx_v_df23 = (((__pyx_v_df[0x2]) * __pyx_v_e23x) + ((__pyx_v_df[0x3]) * __pyx_v_e23y));
   26776             : 
   26777             :   /* "scipy/interpolate/_interpnd.pyx":687
   26778             :  *     df21 = -(df[2*1+0]*e12x + df[2*1+1]*e12y)
   26779             :  *     df23 = +(df[2*1+0]*e23x + df[2*1+1]*e23y)
   26780             :  *     df32 = -(df[2*2+0]*e23x + df[2*2+1]*e23y)             # <<<<<<<<<<<<<<
   26781             :  *     df31 = +(df[2*2+0]*e31x + df[2*2+1]*e31y)
   26782             :  *     df13 = -(df[2*0+0]*e31x + df[2*0+1]*e31y)
   26783             :  */
   26784        6838 :   __pyx_v_df32 = (-(((__pyx_v_df[0x4]) * __pyx_v_e23x) + ((__pyx_v_df[0x5]) * __pyx_v_e23y)));
   26785             : 
   26786             :   /* "scipy/interpolate/_interpnd.pyx":688
   26787             :  *     df23 = +(df[2*1+0]*e23x + df[2*1+1]*e23y)
   26788             :  *     df32 = -(df[2*2+0]*e23x + df[2*2+1]*e23y)
   26789             :  *     df31 = +(df[2*2+0]*e31x + df[2*2+1]*e31y)             # <<<<<<<<<<<<<<
   26790             :  *     df13 = -(df[2*0+0]*e31x + df[2*0+1]*e31y)
   26791             :  * 
   26792             :  */
   26793        6838 :   __pyx_v_df31 = (((__pyx_v_df[0x4]) * __pyx_v_e31x) + ((__pyx_v_df[0x5]) * __pyx_v_e31y));
   26794             : 
   26795             :   /* "scipy/interpolate/_interpnd.pyx":689
   26796             :  *     df32 = -(df[2*2+0]*e23x + df[2*2+1]*e23y)
   26797             :  *     df31 = +(df[2*2+0]*e31x + df[2*2+1]*e31y)
   26798             :  *     df13 = -(df[2*0+0]*e31x + df[2*0+1]*e31y)             # <<<<<<<<<<<<<<
   26799             :  * 
   26800             :  *     c3000 = f1
   26801             :  */
   26802        6838 :   __pyx_v_df13 = (-(((__pyx_v_df[0x0]) * __pyx_v_e31x) + ((__pyx_v_df[0x1]) * __pyx_v_e31y)));
   26803             : 
   26804             :   /* "scipy/interpolate/_interpnd.pyx":691
   26805             :  *     df13 = -(df[2*0+0]*e31x + df[2*0+1]*e31y)
   26806             :  * 
   26807             :  *     c3000 = f1             # <<<<<<<<<<<<<<
   26808             :  *     c2100 = (df12 + 3*c3000)/3
   26809             :  *     c2010 = (df13 + 3*c3000)/3
   26810             :  */
   26811        6838 :   __pyx_v_c3000 = __pyx_v_f1;
   26812             : 
   26813             :   /* "scipy/interpolate/_interpnd.pyx":692
   26814             :  * 
   26815             :  *     c3000 = f1
   26816             :  *     c2100 = (df12 + 3*c3000)/3             # <<<<<<<<<<<<<<
   26817             :  *     c2010 = (df13 + 3*c3000)/3
   26818             :  *     c0300 = f2
   26819             :  */
   26820        6838 :   __pyx_v_c2100 = ((__pyx_v_df12 + (3.0 * __pyx_v_c3000)) / 3.0);
   26821             : 
   26822             :   /* "scipy/interpolate/_interpnd.pyx":693
   26823             :  *     c3000 = f1
   26824             :  *     c2100 = (df12 + 3*c3000)/3
   26825             :  *     c2010 = (df13 + 3*c3000)/3             # <<<<<<<<<<<<<<
   26826             :  *     c0300 = f2
   26827             :  *     c1200 = (df21 + 3*c0300)/3
   26828             :  */
   26829        6838 :   __pyx_v_c2010 = ((__pyx_v_df13 + (3.0 * __pyx_v_c3000)) / 3.0);
   26830             : 
   26831             :   /* "scipy/interpolate/_interpnd.pyx":694
   26832             :  *     c2100 = (df12 + 3*c3000)/3
   26833             :  *     c2010 = (df13 + 3*c3000)/3
   26834             :  *     c0300 = f2             # <<<<<<<<<<<<<<
   26835             :  *     c1200 = (df21 + 3*c0300)/3
   26836             :  *     c0210 = (df23 + 3*c0300)/3
   26837             :  */
   26838        6838 :   __pyx_v_c0300 = __pyx_v_f2;
   26839             : 
   26840             :   /* "scipy/interpolate/_interpnd.pyx":695
   26841             :  *     c2010 = (df13 + 3*c3000)/3
   26842             :  *     c0300 = f2
   26843             :  *     c1200 = (df21 + 3*c0300)/3             # <<<<<<<<<<<<<<
   26844             :  *     c0210 = (df23 + 3*c0300)/3
   26845             :  *     c0030 = f3
   26846             :  */
   26847        6838 :   __pyx_v_c1200 = ((__pyx_v_df21 + (3.0 * __pyx_v_c0300)) / 3.0);
   26848             : 
   26849             :   /* "scipy/interpolate/_interpnd.pyx":696
   26850             :  *     c0300 = f2
   26851             :  *     c1200 = (df21 + 3*c0300)/3
   26852             :  *     c0210 = (df23 + 3*c0300)/3             # <<<<<<<<<<<<<<
   26853             :  *     c0030 = f3
   26854             :  *     c1020 = (df31 + 3*c0030)/3
   26855             :  */
   26856        6838 :   __pyx_v_c0210 = ((__pyx_v_df23 + (3.0 * __pyx_v_c0300)) / 3.0);
   26857             : 
   26858             :   /* "scipy/interpolate/_interpnd.pyx":697
   26859             :  *     c1200 = (df21 + 3*c0300)/3
   26860             :  *     c0210 = (df23 + 3*c0300)/3
   26861             :  *     c0030 = f3             # <<<<<<<<<<<<<<
   26862             :  *     c1020 = (df31 + 3*c0030)/3
   26863             :  *     c0120 = (df32 + 3*c0030)/3
   26864             :  */
   26865        6838 :   __pyx_v_c0030 = __pyx_v_f3;
   26866             : 
   26867             :   /* "scipy/interpolate/_interpnd.pyx":698
   26868             :  *     c0210 = (df23 + 3*c0300)/3
   26869             :  *     c0030 = f3
   26870             :  *     c1020 = (df31 + 3*c0030)/3             # <<<<<<<<<<<<<<
   26871             :  *     c0120 = (df32 + 3*c0030)/3
   26872             :  * 
   26873             :  */
   26874        6838 :   __pyx_v_c1020 = ((__pyx_v_df31 + (3.0 * __pyx_v_c0030)) / 3.0);
   26875             : 
   26876             :   /* "scipy/interpolate/_interpnd.pyx":699
   26877             :  *     c0030 = f3
   26878             :  *     c1020 = (df31 + 3*c0030)/3
   26879             :  *     c0120 = (df32 + 3*c0030)/3             # <<<<<<<<<<<<<<
   26880             :  * 
   26881             :  *     c2001 = (c2100 + c2010 + c3000)/3
   26882             :  */
   26883        6838 :   __pyx_v_c0120 = ((__pyx_v_df32 + (3.0 * __pyx_v_c0030)) / 3.0);
   26884             : 
   26885             :   /* "scipy/interpolate/_interpnd.pyx":701
   26886             :  *     c0120 = (df32 + 3*c0030)/3
   26887             :  * 
   26888             :  *     c2001 = (c2100 + c2010 + c3000)/3             # <<<<<<<<<<<<<<
   26889             :  *     c0201 = (c1200 + c0300 + c0210)/3
   26890             :  *     c0021 = (c1020 + c0120 + c0030)/3
   26891             :  */
   26892        6838 :   __pyx_v_c2001 = (((__pyx_v_c2100 + __pyx_v_c2010) + __pyx_v_c3000) / 3.0);
   26893             : 
   26894             :   /* "scipy/interpolate/_interpnd.pyx":702
   26895             :  * 
   26896             :  *     c2001 = (c2100 + c2010 + c3000)/3
   26897             :  *     c0201 = (c1200 + c0300 + c0210)/3             # <<<<<<<<<<<<<<
   26898             :  *     c0021 = (c1020 + c0120 + c0030)/3
   26899             :  * 
   26900             :  */
   26901        6838 :   __pyx_v_c0201 = (((__pyx_v_c1200 + __pyx_v_c0300) + __pyx_v_c0210) / 3.0);
   26902             : 
   26903             :   /* "scipy/interpolate/_interpnd.pyx":703
   26904             :  *     c2001 = (c2100 + c2010 + c3000)/3
   26905             :  *     c0201 = (c1200 + c0300 + c0210)/3
   26906             :  *     c0021 = (c1020 + c0120 + c0030)/3             # <<<<<<<<<<<<<<
   26907             :  * 
   26908             :  *     #
   26909             :  */
   26910        6838 :   __pyx_v_c0021 = (((__pyx_v_c1020 + __pyx_v_c0120) + __pyx_v_c0030) / 3.0);
   26911             : 
   26912             :   /* "scipy/interpolate/_interpnd.pyx":753
   26913             :  *     #
   26914             :  * 
   26915             :  *     for k in range(3):             # <<<<<<<<<<<<<<
   26916             :  *         itri = d.neighbors[3*isimplex + k]
   26917             :  * 
   26918             :  */
   26919       27352 :   for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
   26920       20514 :     __pyx_v_k = __pyx_t_1;
   26921             : 
   26922             :     /* "scipy/interpolate/_interpnd.pyx":754
   26923             :  * 
   26924             :  *     for k in range(3):
   26925             :  *         itri = d.neighbors[3*isimplex + k]             # <<<<<<<<<<<<<<
   26926             :  * 
   26927             :  *         if itri == -1:
   26928             :  */
   26929       20514 :     __pyx_v_itri = (__pyx_v_d->neighbors[((3 * __pyx_v_isimplex) + __pyx_v_k)]);
   26930             : 
   26931             :     /* "scipy/interpolate/_interpnd.pyx":756
   26932             :  *         itri = d.neighbors[3*isimplex + k]
   26933             :  * 
   26934             :  *         if itri == -1:             # <<<<<<<<<<<<<<
   26935             :  *             # No neighbour.
   26936             :  *             # Compute derivative to the centroid direction (e_12 + e_13)/2.
   26937             :  */
   26938       20514 :     __pyx_t_2 = (__pyx_v_itri == -1L);
   26939       20514 :     if (__pyx_t_2) {
   26940             : 
   26941             :       /* "scipy/interpolate/_interpnd.pyx":759
   26942             :  *             # No neighbour.
   26943             :  *             # Compute derivative to the centroid direction (e_12 + e_13)/2.
   26944             :  *             g[k] = -1./2             # <<<<<<<<<<<<<<
   26945             :  *             continue
   26946             :  * 
   26947             :  */
   26948        3798 :       (__pyx_v_g[__pyx_v_k]) = (-1. / 2.0);
   26949             : 
   26950             :       /* "scipy/interpolate/_interpnd.pyx":760
   26951             :  *             # Compute derivative to the centroid direction (e_12 + e_13)/2.
   26952             :  *             g[k] = -1./2
   26953             :  *             continue             # <<<<<<<<<<<<<<
   26954             :  * 
   26955             :  *         # Centroid of the neighbour, in our local barycentric coordinates
   26956             :  */
   26957        3798 :       goto __pyx_L3_continue;
   26958             : 
   26959             :       /* "scipy/interpolate/_interpnd.pyx":756
   26960             :  *         itri = d.neighbors[3*isimplex + k]
   26961             :  * 
   26962             :  *         if itri == -1:             # <<<<<<<<<<<<<<
   26963             :  *             # No neighbour.
   26964             :  *             # Compute derivative to the centroid direction (e_12 + e_13)/2.
   26965             :  */
   26966             :     }
   26967             : 
   26968             :     /* "scipy/interpolate/_interpnd.pyx":764
   26969             :  *         # Centroid of the neighbour, in our local barycentric coordinates
   26970             :  * 
   26971             :  *         y[0] = (+ d.points[0 + 2*d.simplices[3*itri + 0]]             # <<<<<<<<<<<<<<
   26972             :  *                 + d.points[0 + 2*d.simplices[3*itri + 1]]
   26973             :  *                 + d.points[0 + 2*d.simplices[3*itri + 2]]) / 3
   26974             :  */
   26975       16716 :     (__pyx_v_y[0]) = ((((__pyx_v_d->points[(0 + (2 * (__pyx_v_d->simplices[((3 * __pyx_v_itri) + 0)])))]) + (__pyx_v_d->points[(0 + (2 * (__pyx_v_d->simplices[((3 * __pyx_v_itri) + 1)])))])) + (__pyx_v_d->points[(0 + (2 * (__pyx_v_d->simplices[((3 * __pyx_v_itri) + 2)])))])) / 3.0);
   26976             : 
   26977             :     /* "scipy/interpolate/_interpnd.pyx":768
   26978             :  *                 + d.points[0 + 2*d.simplices[3*itri + 2]]) / 3
   26979             :  * 
   26980             :  *         y[1] = (+ d.points[1 + 2*d.simplices[3*itri + 0]]             # <<<<<<<<<<<<<<
   26981             :  *                 + d.points[1 + 2*d.simplices[3*itri + 1]]
   26982             :  *                 + d.points[1 + 2*d.simplices[3*itri + 2]]) / 3
   26983             :  */
   26984       16716 :     (__pyx_v_y[1]) = ((((__pyx_v_d->points[(1 + (2 * (__pyx_v_d->simplices[((3 * __pyx_v_itri) + 0)])))]) + (__pyx_v_d->points[(1 + (2 * (__pyx_v_d->simplices[((3 * __pyx_v_itri) + 1)])))])) + (__pyx_v_d->points[(1 + (2 * (__pyx_v_d->simplices[((3 * __pyx_v_itri) + 2)])))])) / 3.0);
   26985             : 
   26986             :     /* "scipy/interpolate/_interpnd.pyx":772
   26987             :  *                 + d.points[1 + 2*d.simplices[3*itri + 2]]) / 3
   26988             :  * 
   26989             :  *         qhull._barycentric_coordinates(2, d.transform + isimplex*2*3, y, c)             # <<<<<<<<<<<<<<
   26990             :  * 
   26991             :  *         # Rewrite V_4'-V_4 = const*[(V_4-V_2) + g_i*(V_3 - V_2)]
   26992             :  */
   26993       16716 :     __pyx_f_5scipy_7spatial_6_qhull__barycentric_coordinates(2, (__pyx_v_d->transform + ((__pyx_v_isimplex * 2) * 3)), __pyx_v_y, __pyx_v_c);
   26994             : 
   26995             :     /* "scipy/interpolate/_interpnd.pyx":781
   26996             :  *         # conclude that the choice below is affine-invariant.
   26997             :  * 
   26998             :  *         if k == 0:             # <<<<<<<<<<<<<<
   26999             :  *             g[k] = (2*c[2] + c[1] - 1) / (2 - 3*c[2] - 3*c[1])
   27000             :  *         elif k == 1:
   27001             :  */
   27002       16716 :     switch (__pyx_v_k) {
   27003        5390 :       case 0:
   27004             : 
   27005             :       /* "scipy/interpolate/_interpnd.pyx":782
   27006             :  * 
   27007             :  *         if k == 0:
   27008             :  *             g[k] = (2*c[2] + c[1] - 1) / (2 - 3*c[2] - 3*c[1])             # <<<<<<<<<<<<<<
   27009             :  *         elif k == 1:
   27010             :  *             g[k] = (2*c[0] + c[2] - 1) / (2 - 3*c[0] - 3*c[2])
   27011             :  */
   27012        5390 :       (__pyx_v_g[__pyx_v_k]) = ((((2.0 * (__pyx_v_c[2])) + (__pyx_v_c[1])) - 1.0) / ((2.0 - (3.0 * (__pyx_v_c[2]))) - (3.0 * (__pyx_v_c[1]))));
   27013             : 
   27014             :       /* "scipy/interpolate/_interpnd.pyx":781
   27015             :  *         # conclude that the choice below is affine-invariant.
   27016             :  * 
   27017             :  *         if k == 0:             # <<<<<<<<<<<<<<
   27018             :  *             g[k] = (2*c[2] + c[1] - 1) / (2 - 3*c[2] - 3*c[1])
   27019             :  *         elif k == 1:
   27020             :  */
   27021        5390 :       break;
   27022        4819 :       case 1:
   27023             : 
   27024             :       /* "scipy/interpolate/_interpnd.pyx":784
   27025             :  *             g[k] = (2*c[2] + c[1] - 1) / (2 - 3*c[2] - 3*c[1])
   27026             :  *         elif k == 1:
   27027             :  *             g[k] = (2*c[0] + c[2] - 1) / (2 - 3*c[0] - 3*c[2])             # <<<<<<<<<<<<<<
   27028             :  *         elif k == 2:
   27029             :  *             g[k] = (2*c[1] + c[0] - 1) / (2 - 3*c[1] - 3*c[0])
   27030             :  */
   27031        4819 :       (__pyx_v_g[__pyx_v_k]) = ((((2.0 * (__pyx_v_c[0])) + (__pyx_v_c[2])) - 1.0) / ((2.0 - (3.0 * (__pyx_v_c[0]))) - (3.0 * (__pyx_v_c[2]))));
   27032             : 
   27033             :       /* "scipy/interpolate/_interpnd.pyx":783
   27034             :  *         if k == 0:
   27035             :  *             g[k] = (2*c[2] + c[1] - 1) / (2 - 3*c[2] - 3*c[1])
   27036             :  *         elif k == 1:             # <<<<<<<<<<<<<<
   27037             :  *             g[k] = (2*c[0] + c[2] - 1) / (2 - 3*c[0] - 3*c[2])
   27038             :  *         elif k == 2:
   27039             :  */
   27040        4819 :       break;
   27041        6507 :       case 2:
   27042             : 
   27043             :       /* "scipy/interpolate/_interpnd.pyx":786
   27044             :  *             g[k] = (2*c[0] + c[2] - 1) / (2 - 3*c[0] - 3*c[2])
   27045             :  *         elif k == 2:
   27046             :  *             g[k] = (2*c[1] + c[0] - 1) / (2 - 3*c[1] - 3*c[0])             # <<<<<<<<<<<<<<
   27047             :  * 
   27048             :  *     c0111 = (g[0]*(-c0300 + 3*c0210 - 3*c0120 + c0030)
   27049             :  */
   27050        6507 :       (__pyx_v_g[__pyx_v_k]) = ((((2.0 * (__pyx_v_c[1])) + (__pyx_v_c[0])) - 1.0) / ((2.0 - (3.0 * (__pyx_v_c[1]))) - (3.0 * (__pyx_v_c[0]))));
   27051             : 
   27052             :       /* "scipy/interpolate/_interpnd.pyx":785
   27053             :  *         elif k == 1:
   27054             :  *             g[k] = (2*c[0] + c[2] - 1) / (2 - 3*c[0] - 3*c[2])
   27055             :  *         elif k == 2:             # <<<<<<<<<<<<<<
   27056             :  *             g[k] = (2*c[1] + c[0] - 1) / (2 - 3*c[1] - 3*c[0])
   27057             :  * 
   27058             :  */
   27059        6507 :       break;
   27060             :       default: break;
   27061             :     }
   27062       20514 :     __pyx_L3_continue:;
   27063             :   }
   27064             : 
   27065             :   /* "scipy/interpolate/_interpnd.pyx":789
   27066             :  * 
   27067             :  *     c0111 = (g[0]*(-c0300 + 3*c0210 - 3*c0120 + c0030)
   27068             :  *              + (-c0300 + 2*c0210 - c0120 + c0021 + c0201))/2             # <<<<<<<<<<<<<<
   27069             :  *     c1011 = (g[1]*(-c0030 + 3*c1020 - 3*c2010 + c3000)
   27070             :  *              + (-c0030 + 2*c1020 - c2010 + c2001 + c0021))/2
   27071             :  */
   27072        6838 :   __pyx_v_c0111 = ((((__pyx_v_g[0]) * ((((-__pyx_v_c0300) + (3.0 * __pyx_v_c0210)) - (3.0 * __pyx_v_c0120)) + __pyx_v_c0030)) + (((((-__pyx_v_c0300) + (2.0 * __pyx_v_c0210)) - __pyx_v_c0120) + __pyx_v_c0021) + __pyx_v_c0201)) / 2.0);
   27073             : 
   27074             :   /* "scipy/interpolate/_interpnd.pyx":791
   27075             :  *              + (-c0300 + 2*c0210 - c0120 + c0021 + c0201))/2
   27076             :  *     c1011 = (g[1]*(-c0030 + 3*c1020 - 3*c2010 + c3000)
   27077             :  *              + (-c0030 + 2*c1020 - c2010 + c2001 + c0021))/2             # <<<<<<<<<<<<<<
   27078             :  *     c1101 = (g[2]*(-c3000 + 3*c2100 - 3*c1200 + c0300)
   27079             :  *              + (-c3000 + 2*c2100 - c1200 + c2001 + c0201))/2
   27080             :  */
   27081        6838 :   __pyx_v_c1011 = ((((__pyx_v_g[1]) * ((((-__pyx_v_c0030) + (3.0 * __pyx_v_c1020)) - (3.0 * __pyx_v_c2010)) + __pyx_v_c3000)) + (((((-__pyx_v_c0030) + (2.0 * __pyx_v_c1020)) - __pyx_v_c2010) + __pyx_v_c2001) + __pyx_v_c0021)) / 2.0);
   27082             : 
   27083             :   /* "scipy/interpolate/_interpnd.pyx":793
   27084             :  *              + (-c0030 + 2*c1020 - c2010 + c2001 + c0021))/2
   27085             :  *     c1101 = (g[2]*(-c3000 + 3*c2100 - 3*c1200 + c0300)
   27086             :  *              + (-c3000 + 2*c2100 - c1200 + c2001 + c0201))/2             # <<<<<<<<<<<<<<
   27087             :  * 
   27088             :  *     c1002 = (c1101 + c1011 + c2001)/3
   27089             :  */
   27090        6838 :   __pyx_v_c1101 = ((((__pyx_v_g[2]) * ((((-__pyx_v_c3000) + (3.0 * __pyx_v_c2100)) - (3.0 * __pyx_v_c1200)) + __pyx_v_c0300)) + (((((-__pyx_v_c3000) + (2.0 * __pyx_v_c2100)) - __pyx_v_c1200) + __pyx_v_c2001) + __pyx_v_c0201)) / 2.0);
   27091             : 
   27092             :   /* "scipy/interpolate/_interpnd.pyx":795
   27093             :  *              + (-c3000 + 2*c2100 - c1200 + c2001 + c0201))/2
   27094             :  * 
   27095             :  *     c1002 = (c1101 + c1011 + c2001)/3             # <<<<<<<<<<<<<<
   27096             :  *     c0102 = (c1101 + c0111 + c0201)/3
   27097             :  *     c0012 = (c1011 + c0111 + c0021)/3
   27098             :  */
   27099        6838 :   __pyx_v_c1002 = (((__pyx_v_c1101 + __pyx_v_c1011) + __pyx_v_c2001) / 3.0);
   27100             : 
   27101             :   /* "scipy/interpolate/_interpnd.pyx":796
   27102             :  * 
   27103             :  *     c1002 = (c1101 + c1011 + c2001)/3
   27104             :  *     c0102 = (c1101 + c0111 + c0201)/3             # <<<<<<<<<<<<<<
   27105             :  *     c0012 = (c1011 + c0111 + c0021)/3
   27106             :  * 
   27107             :  */
   27108        6838 :   __pyx_v_c0102 = (((__pyx_v_c1101 + __pyx_v_c0111) + __pyx_v_c0201) / 3.0);
   27109             : 
   27110             :   /* "scipy/interpolate/_interpnd.pyx":797
   27111             :  *     c1002 = (c1101 + c1011 + c2001)/3
   27112             :  *     c0102 = (c1101 + c0111 + c0201)/3
   27113             :  *     c0012 = (c1011 + c0111 + c0021)/3             # <<<<<<<<<<<<<<
   27114             :  * 
   27115             :  *     c0003 = (c1002 + c0102 + c0012)/3
   27116             :  */
   27117        6838 :   __pyx_v_c0012 = (((__pyx_v_c1011 + __pyx_v_c0111) + __pyx_v_c0021) / 3.0);
   27118             : 
   27119             :   /* "scipy/interpolate/_interpnd.pyx":799
   27120             :  *     c0012 = (c1011 + c0111 + c0021)/3
   27121             :  * 
   27122             :  *     c0003 = (c1002 + c0102 + c0012)/3             # <<<<<<<<<<<<<<
   27123             :  * 
   27124             :  *     # extended barycentric coordinates
   27125             :  */
   27126        6838 :   __pyx_v_c0003 = (((__pyx_v_c1002 + __pyx_v_c0102) + __pyx_v_c0012) / 3.0);
   27127             : 
   27128             :   /* "scipy/interpolate/_interpnd.pyx":802
   27129             :  * 
   27130             :  *     # extended barycentric coordinates
   27131             :  *     minval = b[0]             # <<<<<<<<<<<<<<
   27132             :  *     for k in range(3):
   27133             :  *         if b[k] < minval:
   27134             :  */
   27135        6838 :   __pyx_v_minval = (__pyx_v_b[0]);
   27136             : 
   27137             :   /* "scipy/interpolate/_interpnd.pyx":803
   27138             :  *     # extended barycentric coordinates
   27139             :  *     minval = b[0]
   27140             :  *     for k in range(3):             # <<<<<<<<<<<<<<
   27141             :  *         if b[k] < minval:
   27142             :  *             minval = b[k]
   27143             :  */
   27144       27352 :   for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
   27145       20514 :     __pyx_v_k = __pyx_t_1;
   27146             : 
   27147             :     /* "scipy/interpolate/_interpnd.pyx":804
   27148             :  *     minval = b[0]
   27149             :  *     for k in range(3):
   27150             :  *         if b[k] < minval:             # <<<<<<<<<<<<<<
   27151             :  *             minval = b[k]
   27152             :  * 
   27153             :  */
   27154       20514 :     __pyx_t_2 = ((__pyx_v_b[__pyx_v_k]) < __pyx_v_minval);
   27155       20514 :     if (__pyx_t_2) {
   27156             : 
   27157             :       /* "scipy/interpolate/_interpnd.pyx":805
   27158             :  *     for k in range(3):
   27159             :  *         if b[k] < minval:
   27160             :  *             minval = b[k]             # <<<<<<<<<<<<<<
   27161             :  * 
   27162             :  *     b1 = b[0] - minval
   27163             :  */
   27164        5508 :       __pyx_v_minval = (__pyx_v_b[__pyx_v_k]);
   27165             : 
   27166             :       /* "scipy/interpolate/_interpnd.pyx":804
   27167             :  *     minval = b[0]
   27168             :  *     for k in range(3):
   27169             :  *         if b[k] < minval:             # <<<<<<<<<<<<<<
   27170             :  *             minval = b[k]
   27171             :  * 
   27172             :  */
   27173             :     }
   27174             :   }
   27175             : 
   27176             :   /* "scipy/interpolate/_interpnd.pyx":807
   27177             :  *             minval = b[k]
   27178             :  * 
   27179             :  *     b1 = b[0] - minval             # <<<<<<<<<<<<<<
   27180             :  *     b2 = b[1] - minval
   27181             :  *     b3 = b[2] - minval
   27182             :  */
   27183        6838 :   __pyx_v_b1 = ((__pyx_v_b[0]) - __pyx_v_minval);
   27184             : 
   27185             :   /* "scipy/interpolate/_interpnd.pyx":808
   27186             :  * 
   27187             :  *     b1 = b[0] - minval
   27188             :  *     b2 = b[1] - minval             # <<<<<<<<<<<<<<
   27189             :  *     b3 = b[2] - minval
   27190             :  *     b4 = 3*minval
   27191             :  */
   27192        6838 :   __pyx_v_b2 = ((__pyx_v_b[1]) - __pyx_v_minval);
   27193             : 
   27194             :   /* "scipy/interpolate/_interpnd.pyx":809
   27195             :  *     b1 = b[0] - minval
   27196             :  *     b2 = b[1] - minval
   27197             :  *     b3 = b[2] - minval             # <<<<<<<<<<<<<<
   27198             :  *     b4 = 3*minval
   27199             :  * 
   27200             :  */
   27201        6838 :   __pyx_v_b3 = ((__pyx_v_b[2]) - __pyx_v_minval);
   27202             : 
   27203             :   /* "scipy/interpolate/_interpnd.pyx":810
   27204             :  *     b2 = b[1] - minval
   27205             :  *     b3 = b[2] - minval
   27206             :  *     b4 = 3*minval             # <<<<<<<<<<<<<<
   27207             :  * 
   27208             :  *     # evaluate the polynomial -- the stupid and ugly way to do it,
   27209             :  */
   27210        6838 :   __pyx_v_b4 = (3.0 * __pyx_v_minval);
   27211             : 
   27212             :   /* "scipy/interpolate/_interpnd.pyx":820
   27213             :  *          3*b2**2*b4*c0201 + 3*b2*b3**2*c0120 + 6*b2*b3*b4*c0111 +
   27214             :  *          3*b2*b4**2*c0102 + b3**3*c0030 + 3*b3**2*b4*c0021 +
   27215             :  *          3*b3*b4**2*c0012 + b4**3*c0003)             # <<<<<<<<<<<<<<
   27216             :  * 
   27217             :  *     return w
   27218             :  */
   27219        6838 :   __pyx_v_w = (((((((((((((((((((pow(__pyx_v_b1, 3.0) * __pyx_v_c3000) + (((3.0 * pow(__pyx_v_b1, 2.0)) * __pyx_v_b2) * __pyx_v_c2100)) + (((3.0 * pow(__pyx_v_b1, 2.0)) * __pyx_v_b3) * __pyx_v_c2010)) + (((3.0 * pow(__pyx_v_b1, 2.0)) * __pyx_v_b4) * __pyx_v_c2001)) + (((3.0 * __pyx_v_b1) * pow(__pyx_v_b2, 2.0)) * __pyx_v_c1200)) + ((((6.0 * __pyx_v_b1) * __pyx_v_b2) * __pyx_v_b4) * __pyx_v_c1101)) + (((3.0 * __pyx_v_b1) * pow(__pyx_v_b3, 2.0)) * __pyx_v_c1020)) + ((((6.0 * __pyx_v_b1) * __pyx_v_b3) * __pyx_v_b4) * __pyx_v_c1011)) + (((3.0 * __pyx_v_b1) * pow(__pyx_v_b4, 2.0)) * __pyx_v_c1002)) + (pow(__pyx_v_b2, 3.0) * __pyx_v_c0300)) + (((3.0 * pow(__pyx_v_b2, 2.0)) * __pyx_v_b3) * __pyx_v_c0210)) + (((3.0 * pow(__pyx_v_b2, 2.0)) * __pyx_v_b4) * __pyx_v_c0201)) + (((3.0 * __pyx_v_b2) * pow(__pyx_v_b3, 2.0)) * __pyx_v_c0120)) + ((((6.0 * __pyx_v_b2) * __pyx_v_b3) * __pyx_v_b4) * __pyx_v_c0111)) + (((3.0 * __pyx_v_b2) * pow(__pyx_v_b4, 2.0)) * __pyx_v_c0102)) + (pow(__pyx_v_b3, 3.0) * __pyx_v_c0030)) + (((3.0 * pow(__pyx_v_b3, 2.0)) * __pyx_v_b4) * __pyx_v_c0021)) + (((3.0 * __pyx_v_b3) * pow(__pyx_v_b4, 2.0)) * __pyx_v_c0012)) + (pow(__pyx_v_b4, 3.0) * __pyx_v_c0003));
   27220             : 
   27221             :   /* "scipy/interpolate/_interpnd.pyx":822
   27222             :  *          3*b3*b4**2*c0012 + b4**3*c0003)
   27223             :  * 
   27224             :  *     return w             # <<<<<<<<<<<<<<
   27225             :  * 
   27226             :  * class CloughTocher2DInterpolator(NDInterpolatorBase):
   27227             :  */
   27228        6838 :   __pyx_r = __pyx_v_w;
   27229        6838 :   goto __pyx_L0;
   27230             : 
   27231             :   /* "scipy/interpolate/_interpnd.pyx":610
   27232             :  * 
   27233             :  * @cython.cdivision(True)
   27234             :  * cdef double_or_complex _clough_tocher_2d_single(const qhull.DelaunayInfo_t *d,             # <<<<<<<<<<<<<<
   27235             :  *                                                 int isimplex,
   27236             :  *                                                 double *b,
   27237             :  */
   27238             : 
   27239             :   /* function exit code */
   27240        6838 :   __pyx_L0:;
   27241        6838 :   return __pyx_r;
   27242             : }
   27243             : 
   27244          49 : static __pyx_t_double_complex __pyx_fuse_1__pyx_f_5scipy_11interpolate_9_interpnd__clough_tocher_2d_single(__pyx_t_5scipy_7spatial_6_qhull_DelaunayInfo_t const *__pyx_v_d, int __pyx_v_isimplex, double *__pyx_v_b, __pyx_t_double_complex *__pyx_v_f, __pyx_t_double_complex *__pyx_v_df) {
   27245          49 :   __pyx_t_double_complex __pyx_v_c3000;
   27246          49 :   __pyx_t_double_complex __pyx_v_c0300;
   27247          49 :   __pyx_t_double_complex __pyx_v_c0030;
   27248          49 :   __pyx_t_double_complex __pyx_v_c0003;
   27249          49 :   __pyx_t_double_complex __pyx_v_c2100;
   27250          49 :   __pyx_t_double_complex __pyx_v_c2010;
   27251          49 :   __pyx_t_double_complex __pyx_v_c2001;
   27252          49 :   __pyx_t_double_complex __pyx_v_c0210;
   27253          49 :   __pyx_t_double_complex __pyx_v_c0201;
   27254          49 :   __pyx_t_double_complex __pyx_v_c0021;
   27255          49 :   __pyx_t_double_complex __pyx_v_c1200;
   27256          49 :   __pyx_t_double_complex __pyx_v_c1020;
   27257          49 :   __pyx_t_double_complex __pyx_v_c1002;
   27258          49 :   __pyx_t_double_complex __pyx_v_c0120;
   27259          49 :   __pyx_t_double_complex __pyx_v_c0102;
   27260          49 :   __pyx_t_double_complex __pyx_v_c0012;
   27261          49 :   __pyx_t_double_complex __pyx_v_c1101;
   27262          49 :   __pyx_t_double_complex __pyx_v_c1011;
   27263          49 :   __pyx_t_double_complex __pyx_v_c0111;
   27264          49 :   __pyx_t_double_complex __pyx_v_f1;
   27265          49 :   __pyx_t_double_complex __pyx_v_f2;
   27266          49 :   __pyx_t_double_complex __pyx_v_f3;
   27267          49 :   __pyx_t_double_complex __pyx_v_df12;
   27268          49 :   __pyx_t_double_complex __pyx_v_df13;
   27269          49 :   __pyx_t_double_complex __pyx_v_df21;
   27270          49 :   __pyx_t_double_complex __pyx_v_df23;
   27271          49 :   __pyx_t_double_complex __pyx_v_df31;
   27272          49 :   __pyx_t_double_complex __pyx_v_df32;
   27273          49 :   double __pyx_v_g[3];
   27274          49 :   double __pyx_v_e12x;
   27275          49 :   double __pyx_v_e12y;
   27276          49 :   double __pyx_v_e23x;
   27277          49 :   double __pyx_v_e23y;
   27278          49 :   double __pyx_v_e31x;
   27279          49 :   double __pyx_v_e31y;
   27280          49 :   __pyx_t_double_complex __pyx_v_w;
   27281          49 :   double __pyx_v_minval;
   27282          49 :   double __pyx_v_b1;
   27283          49 :   double __pyx_v_b2;
   27284          49 :   double __pyx_v_b3;
   27285          49 :   double __pyx_v_b4;
   27286          49 :   int __pyx_v_k;
   27287          49 :   int __pyx_v_itri;
   27288          49 :   double __pyx_v_c[3];
   27289          49 :   double __pyx_v_y[2];
   27290          49 :   __pyx_t_double_complex __pyx_r;
   27291          49 :   int __pyx_t_1;
   27292          49 :   int __pyx_t_2;
   27293             : 
   27294             :   /* "scipy/interpolate/_interpnd.pyx":666
   27295             :  * 
   27296             :  *     e12x = (+ d.points[0 + 2*d.simplices[3*isimplex + 1]]
   27297             :  *             - d.points[0 + 2*d.simplices[3*isimplex + 0]])             # <<<<<<<<<<<<<<
   27298             :  *     e12y = (+ d.points[1 + 2*d.simplices[3*isimplex + 1]]
   27299             :  *             - d.points[1 + 2*d.simplices[3*isimplex + 0]])
   27300             :  */
   27301          49 :   __pyx_v_e12x = ((__pyx_v_d->points[(0 + (2 * (__pyx_v_d->simplices[((3 * __pyx_v_isimplex) + 1)])))]) - (__pyx_v_d->points[(0 + (2 * (__pyx_v_d->simplices[((3 * __pyx_v_isimplex) + 0)])))]));
   27302             : 
   27303             :   /* "scipy/interpolate/_interpnd.pyx":668
   27304             :  *             - d.points[0 + 2*d.simplices[3*isimplex + 0]])
   27305             :  *     e12y = (+ d.points[1 + 2*d.simplices[3*isimplex + 1]]
   27306             :  *             - d.points[1 + 2*d.simplices[3*isimplex + 0]])             # <<<<<<<<<<<<<<
   27307             :  * 
   27308             :  *     e23x = (+ d.points[0 + 2*d.simplices[3*isimplex + 2]]
   27309             :  */
   27310          49 :   __pyx_v_e12y = ((__pyx_v_d->points[(1 + (2 * (__pyx_v_d->simplices[((3 * __pyx_v_isimplex) + 1)])))]) - (__pyx_v_d->points[(1 + (2 * (__pyx_v_d->simplices[((3 * __pyx_v_isimplex) + 0)])))]));
   27311             : 
   27312             :   /* "scipy/interpolate/_interpnd.pyx":671
   27313             :  * 
   27314             :  *     e23x = (+ d.points[0 + 2*d.simplices[3*isimplex + 2]]
   27315             :  *             - d.points[0 + 2*d.simplices[3*isimplex + 1]])             # <<<<<<<<<<<<<<
   27316             :  *     e23y = (+ d.points[1 + 2*d.simplices[3*isimplex + 2]]
   27317             :  *             - d.points[1 + 2*d.simplices[3*isimplex + 1]])
   27318             :  */
   27319          49 :   __pyx_v_e23x = ((__pyx_v_d->points[(0 + (2 * (__pyx_v_d->simplices[((3 * __pyx_v_isimplex) + 2)])))]) - (__pyx_v_d->points[(0 + (2 * (__pyx_v_d->simplices[((3 * __pyx_v_isimplex) + 1)])))]));
   27320             : 
   27321             :   /* "scipy/interpolate/_interpnd.pyx":673
   27322             :  *             - d.points[0 + 2*d.simplices[3*isimplex + 1]])
   27323             :  *     e23y = (+ d.points[1 + 2*d.simplices[3*isimplex + 2]]
   27324             :  *             - d.points[1 + 2*d.simplices[3*isimplex + 1]])             # <<<<<<<<<<<<<<
   27325             :  * 
   27326             :  *     e31x = (+ d.points[0 + 2*d.simplices[3*isimplex + 0]]
   27327             :  */
   27328          49 :   __pyx_v_e23y = ((__pyx_v_d->points[(1 + (2 * (__pyx_v_d->simplices[((3 * __pyx_v_isimplex) + 2)])))]) - (__pyx_v_d->points[(1 + (2 * (__pyx_v_d->simplices[((3 * __pyx_v_isimplex) + 1)])))]));
   27329             : 
   27330             :   /* "scipy/interpolate/_interpnd.pyx":676
   27331             :  * 
   27332             :  *     e31x = (+ d.points[0 + 2*d.simplices[3*isimplex + 0]]
   27333             :  *             - d.points[0 + 2*d.simplices[3*isimplex + 2]])             # <<<<<<<<<<<<<<
   27334             :  *     e31y = (+ d.points[1 + 2*d.simplices[3*isimplex + 0]]
   27335             :  *             - d.points[1 + 2*d.simplices[3*isimplex + 2]])
   27336             :  */
   27337          49 :   __pyx_v_e31x = ((__pyx_v_d->points[(0 + (2 * (__pyx_v_d->simplices[((3 * __pyx_v_isimplex) + 0)])))]) - (__pyx_v_d->points[(0 + (2 * (__pyx_v_d->simplices[((3 * __pyx_v_isimplex) + 2)])))]));
   27338             : 
   27339             :   /* "scipy/interpolate/_interpnd.pyx":678
   27340             :  *             - d.points[0 + 2*d.simplices[3*isimplex + 2]])
   27341             :  *     e31y = (+ d.points[1 + 2*d.simplices[3*isimplex + 0]]
   27342             :  *             - d.points[1 + 2*d.simplices[3*isimplex + 2]])             # <<<<<<<<<<<<<<
   27343             :  * 
   27344             :  *     f1 = f[0]
   27345             :  */
   27346          49 :   __pyx_v_e31y = ((__pyx_v_d->points[(1 + (2 * (__pyx_v_d->simplices[((3 * __pyx_v_isimplex) + 0)])))]) - (__pyx_v_d->points[(1 + (2 * (__pyx_v_d->simplices[((3 * __pyx_v_isimplex) + 2)])))]));
   27347             : 
   27348             :   /* "scipy/interpolate/_interpnd.pyx":680
   27349             :  *             - d.points[1 + 2*d.simplices[3*isimplex + 2]])
   27350             :  * 
   27351             :  *     f1 = f[0]             # <<<<<<<<<<<<<<
   27352             :  *     f2 = f[1]
   27353             :  *     f3 = f[2]
   27354             :  */
   27355          49 :   __pyx_v_f1 = (__pyx_v_f[0]);
   27356             : 
   27357             :   /* "scipy/interpolate/_interpnd.pyx":681
   27358             :  * 
   27359             :  *     f1 = f[0]
   27360             :  *     f2 = f[1]             # <<<<<<<<<<<<<<
   27361             :  *     f3 = f[2]
   27362             :  * 
   27363             :  */
   27364          49 :   __pyx_v_f2 = (__pyx_v_f[1]);
   27365             : 
   27366             :   /* "scipy/interpolate/_interpnd.pyx":682
   27367             :  *     f1 = f[0]
   27368             :  *     f2 = f[1]
   27369             :  *     f3 = f[2]             # <<<<<<<<<<<<<<
   27370             :  * 
   27371             :  *     df12 = +(df[2*0+0]*e12x + df[2*0+1]*e12y)
   27372             :  */
   27373          49 :   __pyx_v_f3 = (__pyx_v_f[2]);
   27374             : 
   27375             :   /* "scipy/interpolate/_interpnd.pyx":684
   27376             :  *     f3 = f[2]
   27377             :  * 
   27378             :  *     df12 = +(df[2*0+0]*e12x + df[2*0+1]*e12y)             # <<<<<<<<<<<<<<
   27379             :  *     df21 = -(df[2*1+0]*e12x + df[2*1+1]*e12y)
   27380             :  *     df23 = +(df[2*1+0]*e23x + df[2*1+1]*e23y)
   27381             :  */
   27382          49 :   __pyx_v_df12 = __Pyx_c_sum_double(__Pyx_c_prod_double((__pyx_v_df[0x0]), __pyx_t_double_complex_from_parts(__pyx_v_e12x, 0)), __Pyx_c_prod_double((__pyx_v_df[0x1]), __pyx_t_double_complex_from_parts(__pyx_v_e12y, 0)));
   27383             : 
   27384             :   /* "scipy/interpolate/_interpnd.pyx":685
   27385             :  * 
   27386             :  *     df12 = +(df[2*0+0]*e12x + df[2*0+1]*e12y)
   27387             :  *     df21 = -(df[2*1+0]*e12x + df[2*1+1]*e12y)             # <<<<<<<<<<<<<<
   27388             :  *     df23 = +(df[2*1+0]*e23x + df[2*1+1]*e23y)
   27389             :  *     df32 = -(df[2*2+0]*e23x + df[2*2+1]*e23y)
   27390             :  */
   27391          49 :   __pyx_v_df21 = __Pyx_c_neg_double(__Pyx_c_sum_double(__Pyx_c_prod_double((__pyx_v_df[0x2]), __pyx_t_double_complex_from_parts(__pyx_v_e12x, 0)), __Pyx_c_prod_double((__pyx_v_df[0x3]), __pyx_t_double_complex_from_parts(__pyx_v_e12y, 0))));
   27392             : 
   27393             :   /* "scipy/interpolate/_interpnd.pyx":686
   27394             :  *     df12 = +(df[2*0+0]*e12x + df[2*0+1]*e12y)
   27395             :  *     df21 = -(df[2*1+0]*e12x + df[2*1+1]*e12y)
   27396             :  *     df23 = +(df[2*1+0]*e23x + df[2*1+1]*e23y)             # <<<<<<<<<<<<<<
   27397             :  *     df32 = -(df[2*2+0]*e23x + df[2*2+1]*e23y)
   27398             :  *     df31 = +(df[2*2+0]*e31x + df[2*2+1]*e31y)
   27399             :  */
   27400          49 :   __pyx_v_df23 = __Pyx_c_sum_double(__Pyx_c_prod_double((__pyx_v_df[0x2]), __pyx_t_double_complex_from_parts(__pyx_v_e23x, 0)), __Pyx_c_prod_double((__pyx_v_df[0x3]), __pyx_t_double_complex_from_parts(__pyx_v_e23y, 0)));
   27401             : 
   27402             :   /* "scipy/interpolate/_interpnd.pyx":687
   27403             :  *     df21 = -(df[2*1+0]*e12x + df[2*1+1]*e12y)
   27404             :  *     df23 = +(df[2*1+0]*e23x + df[2*1+1]*e23y)
   27405             :  *     df32 = -(df[2*2+0]*e23x + df[2*2+1]*e23y)             # <<<<<<<<<<<<<<
   27406             :  *     df31 = +(df[2*2+0]*e31x + df[2*2+1]*e31y)
   27407             :  *     df13 = -(df[2*0+0]*e31x + df[2*0+1]*e31y)
   27408             :  */
   27409          49 :   __pyx_v_df32 = __Pyx_c_neg_double(__Pyx_c_sum_double(__Pyx_c_prod_double((__pyx_v_df[0x4]), __pyx_t_double_complex_from_parts(__pyx_v_e23x, 0)), __Pyx_c_prod_double((__pyx_v_df[0x5]), __pyx_t_double_complex_from_parts(__pyx_v_e23y, 0))));
   27410             : 
   27411             :   /* "scipy/interpolate/_interpnd.pyx":688
   27412             :  *     df23 = +(df[2*1+0]*e23x + df[2*1+1]*e23y)
   27413             :  *     df32 = -(df[2*2+0]*e23x + df[2*2+1]*e23y)
   27414             :  *     df31 = +(df[2*2+0]*e31x + df[2*2+1]*e31y)             # <<<<<<<<<<<<<<
   27415             :  *     df13 = -(df[2*0+0]*e31x + df[2*0+1]*e31y)
   27416             :  * 
   27417             :  */
   27418          49 :   __pyx_v_df31 = __Pyx_c_sum_double(__Pyx_c_prod_double((__pyx_v_df[0x4]), __pyx_t_double_complex_from_parts(__pyx_v_e31x, 0)), __Pyx_c_prod_double((__pyx_v_df[0x5]), __pyx_t_double_complex_from_parts(__pyx_v_e31y, 0)));
   27419             : 
   27420             :   /* "scipy/interpolate/_interpnd.pyx":689
   27421             :  *     df32 = -(df[2*2+0]*e23x + df[2*2+1]*e23y)
   27422             :  *     df31 = +(df[2*2+0]*e31x + df[2*2+1]*e31y)
   27423             :  *     df13 = -(df[2*0+0]*e31x + df[2*0+1]*e31y)             # <<<<<<<<<<<<<<
   27424             :  * 
   27425             :  *     c3000 = f1
   27426             :  */
   27427          49 :   __pyx_v_df13 = __Pyx_c_neg_double(__Pyx_c_sum_double(__Pyx_c_prod_double((__pyx_v_df[0x0]), __pyx_t_double_complex_from_parts(__pyx_v_e31x, 0)), __Pyx_c_prod_double((__pyx_v_df[0x1]), __pyx_t_double_complex_from_parts(__pyx_v_e31y, 0))));
   27428             : 
   27429             :   /* "scipy/interpolate/_interpnd.pyx":691
   27430             :  *     df13 = -(df[2*0+0]*e31x + df[2*0+1]*e31y)
   27431             :  * 
   27432             :  *     c3000 = f1             # <<<<<<<<<<<<<<
   27433             :  *     c2100 = (df12 + 3*c3000)/3
   27434             :  *     c2010 = (df13 + 3*c3000)/3
   27435             :  */
   27436          49 :   __pyx_v_c3000 = __pyx_v_f1;
   27437             : 
   27438             :   /* "scipy/interpolate/_interpnd.pyx":692
   27439             :  * 
   27440             :  *     c3000 = f1
   27441             :  *     c2100 = (df12 + 3*c3000)/3             # <<<<<<<<<<<<<<
   27442             :  *     c2010 = (df13 + 3*c3000)/3
   27443             :  *     c0300 = f2
   27444             :  */
   27445          49 :   __pyx_v_c2100 = __Pyx_c_quot_double(__Pyx_c_sum_double(__pyx_v_df12, __Pyx_c_prod_double(__pyx_t_double_complex_from_parts(3, 0), __pyx_v_c3000)), __pyx_t_double_complex_from_parts(3, 0));
   27446             : 
   27447             :   /* "scipy/interpolate/_interpnd.pyx":693
   27448             :  *     c3000 = f1
   27449             :  *     c2100 = (df12 + 3*c3000)/3
   27450             :  *     c2010 = (df13 + 3*c3000)/3             # <<<<<<<<<<<<<<
   27451             :  *     c0300 = f2
   27452             :  *     c1200 = (df21 + 3*c0300)/3
   27453             :  */
   27454          49 :   __pyx_v_c2010 = __Pyx_c_quot_double(__Pyx_c_sum_double(__pyx_v_df13, __Pyx_c_prod_double(__pyx_t_double_complex_from_parts(3, 0), __pyx_v_c3000)), __pyx_t_double_complex_from_parts(3, 0));
   27455             : 
   27456             :   /* "scipy/interpolate/_interpnd.pyx":694
   27457             :  *     c2100 = (df12 + 3*c3000)/3
   27458             :  *     c2010 = (df13 + 3*c3000)/3
   27459             :  *     c0300 = f2             # <<<<<<<<<<<<<<
   27460             :  *     c1200 = (df21 + 3*c0300)/3
   27461             :  *     c0210 = (df23 + 3*c0300)/3
   27462             :  */
   27463          49 :   __pyx_v_c0300 = __pyx_v_f2;
   27464             : 
   27465             :   /* "scipy/interpolate/_interpnd.pyx":695
   27466             :  *     c2010 = (df13 + 3*c3000)/3
   27467             :  *     c0300 = f2
   27468             :  *     c1200 = (df21 + 3*c0300)/3             # <<<<<<<<<<<<<<
   27469             :  *     c0210 = (df23 + 3*c0300)/3
   27470             :  *     c0030 = f3
   27471             :  */
   27472          49 :   __pyx_v_c1200 = __Pyx_c_quot_double(__Pyx_c_sum_double(__pyx_v_df21, __Pyx_c_prod_double(__pyx_t_double_complex_from_parts(3, 0), __pyx_v_c0300)), __pyx_t_double_complex_from_parts(3, 0));
   27473             : 
   27474             :   /* "scipy/interpolate/_interpnd.pyx":696
   27475             :  *     c0300 = f2
   27476             :  *     c1200 = (df21 + 3*c0300)/3
   27477             :  *     c0210 = (df23 + 3*c0300)/3             # <<<<<<<<<<<<<<
   27478             :  *     c0030 = f3
   27479             :  *     c1020 = (df31 + 3*c0030)/3
   27480             :  */
   27481          49 :   __pyx_v_c0210 = __Pyx_c_quot_double(__Pyx_c_sum_double(__pyx_v_df23, __Pyx_c_prod_double(__pyx_t_double_complex_from_parts(3, 0), __pyx_v_c0300)), __pyx_t_double_complex_from_parts(3, 0));
   27482             : 
   27483             :   /* "scipy/interpolate/_interpnd.pyx":697
   27484             :  *     c1200 = (df21 + 3*c0300)/3
   27485             :  *     c0210 = (df23 + 3*c0300)/3
   27486             :  *     c0030 = f3             # <<<<<<<<<<<<<<
   27487             :  *     c1020 = (df31 + 3*c0030)/3
   27488             :  *     c0120 = (df32 + 3*c0030)/3
   27489             :  */
   27490          49 :   __pyx_v_c0030 = __pyx_v_f3;
   27491             : 
   27492             :   /* "scipy/interpolate/_interpnd.pyx":698
   27493             :  *     c0210 = (df23 + 3*c0300)/3
   27494             :  *     c0030 = f3
   27495             :  *     c1020 = (df31 + 3*c0030)/3             # <<<<<<<<<<<<<<
   27496             :  *     c0120 = (df32 + 3*c0030)/3
   27497             :  * 
   27498             :  */
   27499          49 :   __pyx_v_c1020 = __Pyx_c_quot_double(__Pyx_c_sum_double(__pyx_v_df31, __Pyx_c_prod_double(__pyx_t_double_complex_from_parts(3, 0), __pyx_v_c0030)), __pyx_t_double_complex_from_parts(3, 0));
   27500             : 
   27501             :   /* "scipy/interpolate/_interpnd.pyx":699
   27502             :  *     c0030 = f3
   27503             :  *     c1020 = (df31 + 3*c0030)/3
   27504             :  *     c0120 = (df32 + 3*c0030)/3             # <<<<<<<<<<<<<<
   27505             :  * 
   27506             :  *     c2001 = (c2100 + c2010 + c3000)/3
   27507             :  */
   27508          49 :   __pyx_v_c0120 = __Pyx_c_quot_double(__Pyx_c_sum_double(__pyx_v_df32, __Pyx_c_prod_double(__pyx_t_double_complex_from_parts(3, 0), __pyx_v_c0030)), __pyx_t_double_complex_from_parts(3, 0));
   27509             : 
   27510             :   /* "scipy/interpolate/_interpnd.pyx":701
   27511             :  *     c0120 = (df32 + 3*c0030)/3
   27512             :  * 
   27513             :  *     c2001 = (c2100 + c2010 + c3000)/3             # <<<<<<<<<<<<<<
   27514             :  *     c0201 = (c1200 + c0300 + c0210)/3
   27515             :  *     c0021 = (c1020 + c0120 + c0030)/3
   27516             :  */
   27517          49 :   __pyx_v_c2001 = __Pyx_c_quot_double(__Pyx_c_sum_double(__Pyx_c_sum_double(__pyx_v_c2100, __pyx_v_c2010), __pyx_v_c3000), __pyx_t_double_complex_from_parts(3, 0));
   27518             : 
   27519             :   /* "scipy/interpolate/_interpnd.pyx":702
   27520             :  * 
   27521             :  *     c2001 = (c2100 + c2010 + c3000)/3
   27522             :  *     c0201 = (c1200 + c0300 + c0210)/3             # <<<<<<<<<<<<<<
   27523             :  *     c0021 = (c1020 + c0120 + c0030)/3
   27524             :  * 
   27525             :  */
   27526          49 :   __pyx_v_c0201 = __Pyx_c_quot_double(__Pyx_c_sum_double(__Pyx_c_sum_double(__pyx_v_c1200, __pyx_v_c0300), __pyx_v_c0210), __pyx_t_double_complex_from_parts(3, 0));
   27527             : 
   27528             :   /* "scipy/interpolate/_interpnd.pyx":703
   27529             :  *     c2001 = (c2100 + c2010 + c3000)/3
   27530             :  *     c0201 = (c1200 + c0300 + c0210)/3
   27531             :  *     c0021 = (c1020 + c0120 + c0030)/3             # <<<<<<<<<<<<<<
   27532             :  * 
   27533             :  *     #
   27534             :  */
   27535          49 :   __pyx_v_c0021 = __Pyx_c_quot_double(__Pyx_c_sum_double(__Pyx_c_sum_double(__pyx_v_c1020, __pyx_v_c0120), __pyx_v_c0030), __pyx_t_double_complex_from_parts(3, 0));
   27536             : 
   27537             :   /* "scipy/interpolate/_interpnd.pyx":753
   27538             :  *     #
   27539             :  * 
   27540             :  *     for k in range(3):             # <<<<<<<<<<<<<<
   27541             :  *         itri = d.neighbors[3*isimplex + k]
   27542             :  * 
   27543             :  */
   27544         196 :   for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
   27545         147 :     __pyx_v_k = __pyx_t_1;
   27546             : 
   27547             :     /* "scipy/interpolate/_interpnd.pyx":754
   27548             :  * 
   27549             :  *     for k in range(3):
   27550             :  *         itri = d.neighbors[3*isimplex + k]             # <<<<<<<<<<<<<<
   27551             :  * 
   27552             :  *         if itri == -1:
   27553             :  */
   27554         147 :     __pyx_v_itri = (__pyx_v_d->neighbors[((3 * __pyx_v_isimplex) + __pyx_v_k)]);
   27555             : 
   27556             :     /* "scipy/interpolate/_interpnd.pyx":756
   27557             :  *         itri = d.neighbors[3*isimplex + k]
   27558             :  * 
   27559             :  *         if itri == -1:             # <<<<<<<<<<<<<<
   27560             :  *             # No neighbour.
   27561             :  *             # Compute derivative to the centroid direction (e_12 + e_13)/2.
   27562             :  */
   27563         147 :     __pyx_t_2 = (__pyx_v_itri == -1L);
   27564         147 :     if (__pyx_t_2) {
   27565             : 
   27566             :       /* "scipy/interpolate/_interpnd.pyx":759
   27567             :  *             # No neighbour.
   27568             :  *             # Compute derivative to the centroid direction (e_12 + e_13)/2.
   27569             :  *             g[k] = -1./2             # <<<<<<<<<<<<<<
   27570             :  *             continue
   27571             :  * 
   27572             :  */
   27573          74 :       (__pyx_v_g[__pyx_v_k]) = (-1. / 2.0);
   27574             : 
   27575             :       /* "scipy/interpolate/_interpnd.pyx":760
   27576             :  *             # Compute derivative to the centroid direction (e_12 + e_13)/2.
   27577             :  *             g[k] = -1./2
   27578             :  *             continue             # <<<<<<<<<<<<<<
   27579             :  * 
   27580             :  *         # Centroid of the neighbour, in our local barycentric coordinates
   27581             :  */
   27582          74 :       goto __pyx_L3_continue;
   27583             : 
   27584             :       /* "scipy/interpolate/_interpnd.pyx":756
   27585             :  *         itri = d.neighbors[3*isimplex + k]
   27586             :  * 
   27587             :  *         if itri == -1:             # <<<<<<<<<<<<<<
   27588             :  *             # No neighbour.
   27589             :  *             # Compute derivative to the centroid direction (e_12 + e_13)/2.
   27590             :  */
   27591             :     }
   27592             : 
   27593             :     /* "scipy/interpolate/_interpnd.pyx":764
   27594             :  *         # Centroid of the neighbour, in our local barycentric coordinates
   27595             :  * 
   27596             :  *         y[0] = (+ d.points[0 + 2*d.simplices[3*itri + 0]]             # <<<<<<<<<<<<<<
   27597             :  *                 + d.points[0 + 2*d.simplices[3*itri + 1]]
   27598             :  *                 + d.points[0 + 2*d.simplices[3*itri + 2]]) / 3
   27599             :  */
   27600          73 :     (__pyx_v_y[0]) = ((((__pyx_v_d->points[(0 + (2 * (__pyx_v_d->simplices[((3 * __pyx_v_itri) + 0)])))]) + (__pyx_v_d->points[(0 + (2 * (__pyx_v_d->simplices[((3 * __pyx_v_itri) + 1)])))])) + (__pyx_v_d->points[(0 + (2 * (__pyx_v_d->simplices[((3 * __pyx_v_itri) + 2)])))])) / 3.0);
   27601             : 
   27602             :     /* "scipy/interpolate/_interpnd.pyx":768
   27603             :  *                 + d.points[0 + 2*d.simplices[3*itri + 2]]) / 3
   27604             :  * 
   27605             :  *         y[1] = (+ d.points[1 + 2*d.simplices[3*itri + 0]]             # <<<<<<<<<<<<<<
   27606             :  *                 + d.points[1 + 2*d.simplices[3*itri + 1]]
   27607             :  *                 + d.points[1 + 2*d.simplices[3*itri + 2]]) / 3
   27608             :  */
   27609          73 :     (__pyx_v_y[1]) = ((((__pyx_v_d->points[(1 + (2 * (__pyx_v_d->simplices[((3 * __pyx_v_itri) + 0)])))]) + (__pyx_v_d->points[(1 + (2 * (__pyx_v_d->simplices[((3 * __pyx_v_itri) + 1)])))])) + (__pyx_v_d->points[(1 + (2 * (__pyx_v_d->simplices[((3 * __pyx_v_itri) + 2)])))])) / 3.0);
   27610             : 
   27611             :     /* "scipy/interpolate/_interpnd.pyx":772
   27612             :  *                 + d.points[1 + 2*d.simplices[3*itri + 2]]) / 3
   27613             :  * 
   27614             :  *         qhull._barycentric_coordinates(2, d.transform + isimplex*2*3, y, c)             # <<<<<<<<<<<<<<
   27615             :  * 
   27616             :  *         # Rewrite V_4'-V_4 = const*[(V_4-V_2) + g_i*(V_3 - V_2)]
   27617             :  */
   27618          73 :     __pyx_f_5scipy_7spatial_6_qhull__barycentric_coordinates(2, (__pyx_v_d->transform + ((__pyx_v_isimplex * 2) * 3)), __pyx_v_y, __pyx_v_c);
   27619             : 
   27620             :     /* "scipy/interpolate/_interpnd.pyx":781
   27621             :  *         # conclude that the choice below is affine-invariant.
   27622             :  * 
   27623             :  *         if k == 0:             # <<<<<<<<<<<<<<
   27624             :  *             g[k] = (2*c[2] + c[1] - 1) / (2 - 3*c[2] - 3*c[1])
   27625             :  *         elif k == 1:
   27626             :  */
   27627          73 :     switch (__pyx_v_k) {
   27628          22 :       case 0:
   27629             : 
   27630             :       /* "scipy/interpolate/_interpnd.pyx":782
   27631             :  * 
   27632             :  *         if k == 0:
   27633             :  *             g[k] = (2*c[2] + c[1] - 1) / (2 - 3*c[2] - 3*c[1])             # <<<<<<<<<<<<<<
   27634             :  *         elif k == 1:
   27635             :  *             g[k] = (2*c[0] + c[2] - 1) / (2 - 3*c[0] - 3*c[2])
   27636             :  */
   27637          22 :       (__pyx_v_g[__pyx_v_k]) = ((((2.0 * (__pyx_v_c[2])) + (__pyx_v_c[1])) - 1.0) / ((2.0 - (3.0 * (__pyx_v_c[2]))) - (3.0 * (__pyx_v_c[1]))));
   27638             : 
   27639             :       /* "scipy/interpolate/_interpnd.pyx":781
   27640             :  *         # conclude that the choice below is affine-invariant.
   27641             :  * 
   27642             :  *         if k == 0:             # <<<<<<<<<<<<<<
   27643             :  *             g[k] = (2*c[2] + c[1] - 1) / (2 - 3*c[2] - 3*c[1])
   27644             :  *         elif k == 1:
   27645             :  */
   27646          22 :       break;
   27647           2 :       case 1:
   27648             : 
   27649             :       /* "scipy/interpolate/_interpnd.pyx":784
   27650             :  *             g[k] = (2*c[2] + c[1] - 1) / (2 - 3*c[2] - 3*c[1])
   27651             :  *         elif k == 1:
   27652             :  *             g[k] = (2*c[0] + c[2] - 1) / (2 - 3*c[0] - 3*c[2])             # <<<<<<<<<<<<<<
   27653             :  *         elif k == 2:
   27654             :  *             g[k] = (2*c[1] + c[0] - 1) / (2 - 3*c[1] - 3*c[0])
   27655             :  */
   27656           2 :       (__pyx_v_g[__pyx_v_k]) = ((((2.0 * (__pyx_v_c[0])) + (__pyx_v_c[2])) - 1.0) / ((2.0 - (3.0 * (__pyx_v_c[0]))) - (3.0 * (__pyx_v_c[2]))));
   27657             : 
   27658             :       /* "scipy/interpolate/_interpnd.pyx":783
   27659             :  *         if k == 0:
   27660             :  *             g[k] = (2*c[2] + c[1] - 1) / (2 - 3*c[2] - 3*c[1])
   27661             :  *         elif k == 1:             # <<<<<<<<<<<<<<
   27662             :  *             g[k] = (2*c[0] + c[2] - 1) / (2 - 3*c[0] - 3*c[2])
   27663             :  *         elif k == 2:
   27664             :  */
   27665           2 :       break;
   27666          49 :       case 2:
   27667             : 
   27668             :       /* "scipy/interpolate/_interpnd.pyx":786
   27669             :  *             g[k] = (2*c[0] + c[2] - 1) / (2 - 3*c[0] - 3*c[2])
   27670             :  *         elif k == 2:
   27671             :  *             g[k] = (2*c[1] + c[0] - 1) / (2 - 3*c[1] - 3*c[0])             # <<<<<<<<<<<<<<
   27672             :  * 
   27673             :  *     c0111 = (g[0]*(-c0300 + 3*c0210 - 3*c0120 + c0030)
   27674             :  */
   27675          49 :       (__pyx_v_g[__pyx_v_k]) = ((((2.0 * (__pyx_v_c[1])) + (__pyx_v_c[0])) - 1.0) / ((2.0 - (3.0 * (__pyx_v_c[1]))) - (3.0 * (__pyx_v_c[0]))));
   27676             : 
   27677             :       /* "scipy/interpolate/_interpnd.pyx":785
   27678             :  *         elif k == 1:
   27679             :  *             g[k] = (2*c[0] + c[2] - 1) / (2 - 3*c[0] - 3*c[2])
   27680             :  *         elif k == 2:             # <<<<<<<<<<<<<<
   27681             :  *             g[k] = (2*c[1] + c[0] - 1) / (2 - 3*c[1] - 3*c[0])
   27682             :  * 
   27683             :  */
   27684          49 :       break;
   27685             :       default: break;
   27686             :     }
   27687         147 :     __pyx_L3_continue:;
   27688             :   }
   27689             : 
   27690             :   /* "scipy/interpolate/_interpnd.pyx":789
   27691             :  * 
   27692             :  *     c0111 = (g[0]*(-c0300 + 3*c0210 - 3*c0120 + c0030)
   27693             :  *              + (-c0300 + 2*c0210 - c0120 + c0021 + c0201))/2             # <<<<<<<<<<<<<<
   27694             :  *     c1011 = (g[1]*(-c0030 + 3*c1020 - 3*c2010 + c3000)
   27695             :  *              + (-c0030 + 2*c1020 - c2010 + c2001 + c0021))/2
   27696             :  */
   27697          49 :   __pyx_v_c0111 = __Pyx_c_quot_double(__Pyx_c_sum_double(__Pyx_c_prod_double(__pyx_t_double_complex_from_parts((__pyx_v_g[0]), 0), __Pyx_c_sum_double(__Pyx_c_diff_double(__Pyx_c_sum_double(__Pyx_c_neg_double(__pyx_v_c0300), __Pyx_c_prod_double(__pyx_t_double_complex_from_parts(3, 0), __pyx_v_c0210)), __Pyx_c_prod_double(__pyx_t_double_complex_from_parts(3, 0), __pyx_v_c0120)), __pyx_v_c0030)), __Pyx_c_sum_double(__Pyx_c_sum_double(__Pyx_c_diff_double(__Pyx_c_sum_double(__Pyx_c_neg_double(__pyx_v_c0300), __Pyx_c_prod_double(__pyx_t_double_complex_from_parts(2, 0), __pyx_v_c0210)), __pyx_v_c0120), __pyx_v_c0021), __pyx_v_c0201)), __pyx_t_double_complex_from_parts(2, 0));
   27698             : 
   27699             :   /* "scipy/interpolate/_interpnd.pyx":791
   27700             :  *              + (-c0300 + 2*c0210 - c0120 + c0021 + c0201))/2
   27701             :  *     c1011 = (g[1]*(-c0030 + 3*c1020 - 3*c2010 + c3000)
   27702             :  *              + (-c0030 + 2*c1020 - c2010 + c2001 + c0021))/2             # <<<<<<<<<<<<<<
   27703             :  *     c1101 = (g[2]*(-c3000 + 3*c2100 - 3*c1200 + c0300)
   27704             :  *              + (-c3000 + 2*c2100 - c1200 + c2001 + c0201))/2
   27705             :  */
   27706          49 :   __pyx_v_c1011 = __Pyx_c_quot_double(__Pyx_c_sum_double(__Pyx_c_prod_double(__pyx_t_double_complex_from_parts((__pyx_v_g[1]), 0), __Pyx_c_sum_double(__Pyx_c_diff_double(__Pyx_c_sum_double(__Pyx_c_neg_double(__pyx_v_c0030), __Pyx_c_prod_double(__pyx_t_double_complex_from_parts(3, 0), __pyx_v_c1020)), __Pyx_c_prod_double(__pyx_t_double_complex_from_parts(3, 0), __pyx_v_c2010)), __pyx_v_c3000)), __Pyx_c_sum_double(__Pyx_c_sum_double(__Pyx_c_diff_double(__Pyx_c_sum_double(__Pyx_c_neg_double(__pyx_v_c0030), __Pyx_c_prod_double(__pyx_t_double_complex_from_parts(2, 0), __pyx_v_c1020)), __pyx_v_c2010), __pyx_v_c2001), __pyx_v_c0021)), __pyx_t_double_complex_from_parts(2, 0));
   27707             : 
   27708             :   /* "scipy/interpolate/_interpnd.pyx":793
   27709             :  *              + (-c0030 + 2*c1020 - c2010 + c2001 + c0021))/2
   27710             :  *     c1101 = (g[2]*(-c3000 + 3*c2100 - 3*c1200 + c0300)
   27711             :  *              + (-c3000 + 2*c2100 - c1200 + c2001 + c0201))/2             # <<<<<<<<<<<<<<
   27712             :  * 
   27713             :  *     c1002 = (c1101 + c1011 + c2001)/3
   27714             :  */
   27715          49 :   __pyx_v_c1101 = __Pyx_c_quot_double(__Pyx_c_sum_double(__Pyx_c_prod_double(__pyx_t_double_complex_from_parts((__pyx_v_g[2]), 0), __Pyx_c_sum_double(__Pyx_c_diff_double(__Pyx_c_sum_double(__Pyx_c_neg_double(__pyx_v_c3000), __Pyx_c_prod_double(__pyx_t_double_complex_from_parts(3, 0), __pyx_v_c2100)), __Pyx_c_prod_double(__pyx_t_double_complex_from_parts(3, 0), __pyx_v_c1200)), __pyx_v_c0300)), __Pyx_c_sum_double(__Pyx_c_sum_double(__Pyx_c_diff_double(__Pyx_c_sum_double(__Pyx_c_neg_double(__pyx_v_c3000), __Pyx_c_prod_double(__pyx_t_double_complex_from_parts(2, 0), __pyx_v_c2100)), __pyx_v_c1200), __pyx_v_c2001), __pyx_v_c0201)), __pyx_t_double_complex_from_parts(2, 0));
   27716             : 
   27717             :   /* "scipy/interpolate/_interpnd.pyx":795
   27718             :  *              + (-c3000 + 2*c2100 - c1200 + c2001 + c0201))/2
   27719             :  * 
   27720             :  *     c1002 = (c1101 + c1011 + c2001)/3             # <<<<<<<<<<<<<<
   27721             :  *     c0102 = (c1101 + c0111 + c0201)/3
   27722             :  *     c0012 = (c1011 + c0111 + c0021)/3
   27723             :  */
   27724          49 :   __pyx_v_c1002 = __Pyx_c_quot_double(__Pyx_c_sum_double(__Pyx_c_sum_double(__pyx_v_c1101, __pyx_v_c1011), __pyx_v_c2001), __pyx_t_double_complex_from_parts(3, 0));
   27725             : 
   27726             :   /* "scipy/interpolate/_interpnd.pyx":796
   27727             :  * 
   27728             :  *     c1002 = (c1101 + c1011 + c2001)/3
   27729             :  *     c0102 = (c1101 + c0111 + c0201)/3             # <<<<<<<<<<<<<<
   27730             :  *     c0012 = (c1011 + c0111 + c0021)/3
   27731             :  * 
   27732             :  */
   27733          49 :   __pyx_v_c0102 = __Pyx_c_quot_double(__Pyx_c_sum_double(__Pyx_c_sum_double(__pyx_v_c1101, __pyx_v_c0111), __pyx_v_c0201), __pyx_t_double_complex_from_parts(3, 0));
   27734             : 
   27735             :   /* "scipy/interpolate/_interpnd.pyx":797
   27736             :  *     c1002 = (c1101 + c1011 + c2001)/3
   27737             :  *     c0102 = (c1101 + c0111 + c0201)/3
   27738             :  *     c0012 = (c1011 + c0111 + c0021)/3             # <<<<<<<<<<<<<<
   27739             :  * 
   27740             :  *     c0003 = (c1002 + c0102 + c0012)/3
   27741             :  */
   27742          49 :   __pyx_v_c0012 = __Pyx_c_quot_double(__Pyx_c_sum_double(__Pyx_c_sum_double(__pyx_v_c1011, __pyx_v_c0111), __pyx_v_c0021), __pyx_t_double_complex_from_parts(3, 0));
   27743             : 
   27744             :   /* "scipy/interpolate/_interpnd.pyx":799
   27745             :  *     c0012 = (c1011 + c0111 + c0021)/3
   27746             :  * 
   27747             :  *     c0003 = (c1002 + c0102 + c0012)/3             # <<<<<<<<<<<<<<
   27748             :  * 
   27749             :  *     # extended barycentric coordinates
   27750             :  */
   27751          49 :   __pyx_v_c0003 = __Pyx_c_quot_double(__Pyx_c_sum_double(__Pyx_c_sum_double(__pyx_v_c1002, __pyx_v_c0102), __pyx_v_c0012), __pyx_t_double_complex_from_parts(3, 0));
   27752             : 
   27753             :   /* "scipy/interpolate/_interpnd.pyx":802
   27754             :  * 
   27755             :  *     # extended barycentric coordinates
   27756             :  *     minval = b[0]             # <<<<<<<<<<<<<<
   27757             :  *     for k in range(3):
   27758             :  *         if b[k] < minval:
   27759             :  */
   27760          49 :   __pyx_v_minval = (__pyx_v_b[0]);
   27761             : 
   27762             :   /* "scipy/interpolate/_interpnd.pyx":803
   27763             :  *     # extended barycentric coordinates
   27764             :  *     minval = b[0]
   27765             :  *     for k in range(3):             # <<<<<<<<<<<<<<
   27766             :  *         if b[k] < minval:
   27767             :  *             minval = b[k]
   27768             :  */
   27769         196 :   for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
   27770         147 :     __pyx_v_k = __pyx_t_1;
   27771             : 
   27772             :     /* "scipy/interpolate/_interpnd.pyx":804
   27773             :  *     minval = b[0]
   27774             :  *     for k in range(3):
   27775             :  *         if b[k] < minval:             # <<<<<<<<<<<<<<
   27776             :  *             minval = b[k]
   27777             :  * 
   27778             :  */
   27779         147 :     __pyx_t_2 = ((__pyx_v_b[__pyx_v_k]) < __pyx_v_minval);
   27780         147 :     if (__pyx_t_2) {
   27781             : 
   27782             :       /* "scipy/interpolate/_interpnd.pyx":805
   27783             :  *     for k in range(3):
   27784             :  *         if b[k] < minval:
   27785             :  *             minval = b[k]             # <<<<<<<<<<<<<<
   27786             :  * 
   27787             :  *     b1 = b[0] - minval
   27788             :  */
   27789          11 :       __pyx_v_minval = (__pyx_v_b[__pyx_v_k]);
   27790             : 
   27791             :       /* "scipy/interpolate/_interpnd.pyx":804
   27792             :  *     minval = b[0]
   27793             :  *     for k in range(3):
   27794             :  *         if b[k] < minval:             # <<<<<<<<<<<<<<
   27795             :  *             minval = b[k]
   27796             :  * 
   27797             :  */
   27798             :     }
   27799             :   }
   27800             : 
   27801             :   /* "scipy/interpolate/_interpnd.pyx":807
   27802             :  *             minval = b[k]
   27803             :  * 
   27804             :  *     b1 = b[0] - minval             # <<<<<<<<<<<<<<
   27805             :  *     b2 = b[1] - minval
   27806             :  *     b3 = b[2] - minval
   27807             :  */
   27808          49 :   __pyx_v_b1 = ((__pyx_v_b[0]) - __pyx_v_minval);
   27809             : 
   27810             :   /* "scipy/interpolate/_interpnd.pyx":808
   27811             :  * 
   27812             :  *     b1 = b[0] - minval
   27813             :  *     b2 = b[1] - minval             # <<<<<<<<<<<<<<
   27814             :  *     b3 = b[2] - minval
   27815             :  *     b4 = 3*minval
   27816             :  */
   27817          49 :   __pyx_v_b2 = ((__pyx_v_b[1]) - __pyx_v_minval);
   27818             : 
   27819             :   /* "scipy/interpolate/_interpnd.pyx":809
   27820             :  *     b1 = b[0] - minval
   27821             :  *     b2 = b[1] - minval
   27822             :  *     b3 = b[2] - minval             # <<<<<<<<<<<<<<
   27823             :  *     b4 = 3*minval
   27824             :  * 
   27825             :  */
   27826          49 :   __pyx_v_b3 = ((__pyx_v_b[2]) - __pyx_v_minval);
   27827             : 
   27828             :   /* "scipy/interpolate/_interpnd.pyx":810
   27829             :  *     b2 = b[1] - minval
   27830             :  *     b3 = b[2] - minval
   27831             :  *     b4 = 3*minval             # <<<<<<<<<<<<<<
   27832             :  * 
   27833             :  *     # evaluate the polynomial -- the stupid and ugly way to do it,
   27834             :  */
   27835          49 :   __pyx_v_b4 = (3.0 * __pyx_v_minval);
   27836             : 
   27837             :   /* "scipy/interpolate/_interpnd.pyx":820
   27838             :  *          3*b2**2*b4*c0201 + 3*b2*b3**2*c0120 + 6*b2*b3*b4*c0111 +
   27839             :  *          3*b2*b4**2*c0102 + b3**3*c0030 + 3*b3**2*b4*c0021 +
   27840             :  *          3*b3*b4**2*c0012 + b4**3*c0003)             # <<<<<<<<<<<<<<
   27841             :  * 
   27842             :  *     return w
   27843             :  */
   27844          49 :   __pyx_v_w = __Pyx_c_sum_double(__Pyx_c_sum_double(__Pyx_c_sum_double(__Pyx_c_sum_double(__Pyx_c_sum_double(__Pyx_c_sum_double(__Pyx_c_sum_double(__Pyx_c_sum_double(__Pyx_c_sum_double(__Pyx_c_sum_double(__Pyx_c_sum_double(__Pyx_c_sum_double(__Pyx_c_sum_double(__Pyx_c_sum_double(__Pyx_c_sum_double(__Pyx_c_sum_double(__Pyx_c_sum_double(__Pyx_c_sum_double(__Pyx_c_prod_double(__pyx_t_double_complex_from_parts(pow(__pyx_v_b1, 3.0), 0), __pyx_v_c3000), __Pyx_c_prod_double(__pyx_t_double_complex_from_parts(((3.0 * pow(__pyx_v_b1, 2.0)) * __pyx_v_b2), 0), __pyx_v_c2100)), __Pyx_c_prod_double(__pyx_t_double_complex_from_parts(((3.0 * pow(__pyx_v_b1, 2.0)) * __pyx_v_b3), 0), __pyx_v_c2010)), __Pyx_c_prod_double(__pyx_t_double_complex_from_parts(((3.0 * pow(__pyx_v_b1, 2.0)) * __pyx_v_b4), 0), __pyx_v_c2001)), __Pyx_c_prod_double(__pyx_t_double_complex_from_parts(((3.0 * __pyx_v_b1) * pow(__pyx_v_b2, 2.0)), 0), __pyx_v_c1200)), __Pyx_c_prod_double(__pyx_t_double_complex_from_parts((((6.0 * __pyx_v_b1) * __pyx_v_b2) * __pyx_v_b4), 0), __pyx_v_c1101)), __Pyx_c_prod_double(__pyx_t_double_complex_from_parts(((3.0 * __pyx_v_b1) * pow(__pyx_v_b3, 2.0)), 0), __pyx_v_c1020)), __Pyx_c_prod_double(__pyx_t_double_complex_from_parts((((6.0 * __pyx_v_b1) * __pyx_v_b3) * __pyx_v_b4), 0), __pyx_v_c1011)), __Pyx_c_prod_double(__pyx_t_double_complex_from_parts(((3.0 * __pyx_v_b1) * pow(__pyx_v_b4, 2.0)), 0), __pyx_v_c1002)), __Pyx_c_prod_double(__pyx_t_double_complex_from_parts(pow(__pyx_v_b2, 3.0), 0), __pyx_v_c0300)), __Pyx_c_prod_double(__pyx_t_double_complex_from_parts(((3.0 * pow(__pyx_v_b2, 2.0)) * __pyx_v_b3), 0), __pyx_v_c0210)), __Pyx_c_prod_double(__pyx_t_double_complex_from_parts(((3.0 * pow(__pyx_v_b2, 2.0)) * __pyx_v_b4), 0), __pyx_v_c0201)), __Pyx_c_prod_double(__pyx_t_double_complex_from_parts(((3.0 * __pyx_v_b2) * pow(__pyx_v_b3, 2.0)), 0), __pyx_v_c0120)), __Pyx_c_prod_double(__pyx_t_double_complex_from_parts((((6.0 * __pyx_v_b2) * __pyx_v_b3) * __pyx_v_b4), 0), __pyx_v_c0111)), __Pyx_c_prod_double(__pyx_t_double_complex_from_parts(((3.0 * __pyx_v_b2) * pow(__pyx_v_b4, 2.0)), 0), __pyx_v_c0102)), __Pyx_c_prod_double(__pyx_t_double_complex_from_parts(pow(__pyx_v_b3, 3.0), 0), __pyx_v_c0030)), __Pyx_c_prod_double(__pyx_t_double_complex_from_parts(((3.0 * pow(__pyx_v_b3, 2.0)) * __pyx_v_b4), 0), __pyx_v_c0021)), __Pyx_c_prod_double(__pyx_t_double_complex_from_parts(((3.0 * __pyx_v_b3) * pow(__pyx_v_b4, 2.0)), 0), __pyx_v_c0012)), __Pyx_c_prod_double(__pyx_t_double_complex_from_parts(pow(__pyx_v_b4, 3.0), 0), __pyx_v_c0003));
   27845             : 
   27846             :   /* "scipy/interpolate/_interpnd.pyx":822
   27847             :  *          3*b3*b4**2*c0012 + b4**3*c0003)
   27848             :  * 
   27849             :  *     return w             # <<<<<<<<<<<<<<
   27850             :  * 
   27851             :  * class CloughTocher2DInterpolator(NDInterpolatorBase):
   27852             :  */
   27853          49 :   __pyx_r = __pyx_v_w;
   27854          49 :   goto __pyx_L0;
   27855             : 
   27856             :   /* "scipy/interpolate/_interpnd.pyx":610
   27857             :  * 
   27858             :  * @cython.cdivision(True)
   27859             :  * cdef double_or_complex _clough_tocher_2d_single(const qhull.DelaunayInfo_t *d,             # <<<<<<<<<<<<<<
   27860             :  *                                                 int isimplex,
   27861             :  *                                                 double *b,
   27862             :  */
   27863             : 
   27864             :   /* function exit code */
   27865          49 :   __pyx_L0:;
   27866          49 :   return __pyx_r;
   27867             : }
   27868             : 
   27869             : /* "scipy/interpolate/_interpnd.pyx":930
   27870             :  *     """
   27871             :  * 
   27872             :  *     def __init__(self, points, values, fill_value=np.nan,             # <<<<<<<<<<<<<<
   27873             :  *                  tol=1e-6, maxiter=400, rescale=False):
   27874             :  *         self._tol = tol
   27875             :  */
   27876             : 
   27877           0 : static PyObject *__pyx_pf_5scipy_11interpolate_9_interpnd_10__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
   27878           0 :   PyObject *__pyx_r = NULL;
   27879             :   __Pyx_RefNannyDeclarations
   27880           0 :   PyObject *__pyx_t_1 = NULL;
   27881           0 :   PyObject *__pyx_t_2 = NULL;
   27882           0 :   int __pyx_lineno = 0;
   27883           0 :   const char *__pyx_filename = NULL;
   27884           0 :   int __pyx_clineno = 0;
   27885           0 :   __Pyx_RefNannySetupContext("__defaults__", 1);
   27886           0 :   __Pyx_XDECREF(__pyx_r);
   27887             : 
   27888             :   /* "scipy/interpolate/_interpnd.pyx":931
   27889             :  * 
   27890             :  *     def __init__(self, points, values, fill_value=np.nan,
   27891             :  *                  tol=1e-6, maxiter=400, rescale=False):             # <<<<<<<<<<<<<<
   27892             :  *         self._tol = tol
   27893             :  *         self._maxiter = maxiter
   27894             :  */
   27895           0 :   __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 930, __pyx_L1_error)
   27896           0 :   __Pyx_GOTREF(__pyx_t_1);
   27897           0 :   __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults4, __pyx_self)->__pyx_arg_fill_value);
   27898           0 :   __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults4, __pyx_self)->__pyx_arg_fill_value);
   27899           0 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults4, __pyx_self)->__pyx_arg_fill_value)) __PYX_ERR(0, 930, __pyx_L1_error);
   27900           0 :   __Pyx_INCREF(((PyObject*)__pyx_float_1eneg_6));
   27901           0 :   __Pyx_GIVEREF(((PyObject*)__pyx_float_1eneg_6));
   27902           0 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject*)__pyx_float_1eneg_6))) __PYX_ERR(0, 930, __pyx_L1_error);
   27903           0 :   __Pyx_INCREF(((PyObject *)__pyx_int_400));
   27904           0 :   __Pyx_GIVEREF(((PyObject *)__pyx_int_400));
   27905           0 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_int_400))) __PYX_ERR(0, 930, __pyx_L1_error);
   27906           0 :   __Pyx_INCREF(((PyObject *)Py_False));
   27907           0 :   __Pyx_GIVEREF(((PyObject *)Py_False));
   27908           0 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 3, ((PyObject *)Py_False))) __PYX_ERR(0, 930, __pyx_L1_error);
   27909             : 
   27910             :   /* "scipy/interpolate/_interpnd.pyx":930
   27911             :  *     """
   27912             :  * 
   27913             :  *     def __init__(self, points, values, fill_value=np.nan,             # <<<<<<<<<<<<<<
   27914             :  *                  tol=1e-6, maxiter=400, rescale=False):
   27915             :  *         self._tol = tol
   27916             :  */
   27917           0 :   __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 930, __pyx_L1_error)
   27918           0 :   __Pyx_GOTREF(__pyx_t_2);
   27919           0 :   __Pyx_GIVEREF(__pyx_t_1);
   27920           0 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(0, 930, __pyx_L1_error);
   27921           0 :   __Pyx_INCREF(Py_None);
   27922           0 :   __Pyx_GIVEREF(Py_None);
   27923           0 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None)) __PYX_ERR(0, 930, __pyx_L1_error);
   27924           0 :   __pyx_t_1 = 0;
   27925           0 :   __pyx_r = __pyx_t_2;
   27926           0 :   __pyx_t_2 = 0;
   27927           0 :   goto __pyx_L0;
   27928             : 
   27929             :   /* function exit code */
   27930           0 :   __pyx_L1_error:;
   27931           0 :   __Pyx_XDECREF(__pyx_t_1);
   27932           0 :   __Pyx_XDECREF(__pyx_t_2);
   27933           0 :   __Pyx_AddTraceback("scipy.interpolate._interpnd.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   27934           0 :   __pyx_r = NULL;
   27935           0 :   __pyx_L0:;
   27936           0 :   __Pyx_XGIVEREF(__pyx_r);
   27937           0 :   __Pyx_RefNannyFinishContext();
   27938           0 :   return __pyx_r;
   27939             : }
   27940             : 
   27941             : /* Python wrapper */
   27942             : static PyObject *__pyx_pw_5scipy_11interpolate_9_interpnd_26CloughTocher2DInterpolator_1__init__(PyObject *__pyx_self, 
   27943             : #if CYTHON_METH_FASTCALL
   27944             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   27945             : #else
   27946             : PyObject *__pyx_args, PyObject *__pyx_kwds
   27947             : #endif
   27948             : ); /*proto*/
   27949             : static PyMethodDef __pyx_mdef_5scipy_11interpolate_9_interpnd_26CloughTocher2DInterpolator_1__init__ = {"__init__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5scipy_11interpolate_9_interpnd_26CloughTocher2DInterpolator_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
   27950          58 : static PyObject *__pyx_pw_5scipy_11interpolate_9_interpnd_26CloughTocher2DInterpolator_1__init__(PyObject *__pyx_self, 
   27951             : #if CYTHON_METH_FASTCALL
   27952             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   27953             : #else
   27954             : PyObject *__pyx_args, PyObject *__pyx_kwds
   27955             : #endif
   27956             : ) {
   27957          58 :   PyObject *__pyx_v_self = 0;
   27958          58 :   PyObject *__pyx_v_points = 0;
   27959          58 :   PyObject *__pyx_v_values = 0;
   27960          58 :   PyObject *__pyx_v_fill_value = 0;
   27961          58 :   PyObject *__pyx_v_tol = 0;
   27962          58 :   PyObject *__pyx_v_maxiter = 0;
   27963          58 :   PyObject *__pyx_v_rescale = 0;
   27964             :   #if !CYTHON_METH_FASTCALL
   27965             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
   27966             :   #endif
   27967          58 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   27968          58 :   PyObject* values[7] = {0,0,0,0,0,0,0};
   27969          58 :   int __pyx_lineno = 0;
   27970          58 :   const char *__pyx_filename = NULL;
   27971          58 :   int __pyx_clineno = 0;
   27972          58 :   PyObject *__pyx_r = 0;
   27973             :   __Pyx_RefNannyDeclarations
   27974          58 :   __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
   27975             :   #if !CYTHON_METH_FASTCALL
   27976             :   #if CYTHON_ASSUME_SAFE_MACROS
   27977             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
   27978             :   #else
   27979             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
   27980             :   #endif
   27981             :   #endif
   27982          58 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
   27983             :   {
   27984          58 :     PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_points,&__pyx_n_s_values,&__pyx_n_s_fill_value,&__pyx_n_s_tol,&__pyx_n_s_maxiter,&__pyx_n_s_rescale,0};
   27985          58 :     __pyx_defaults4 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults4, __pyx_self);
   27986          58 :     values[3] = __Pyx_Arg_NewRef_FASTCALL(__pyx_dynamic_args->__pyx_arg_fill_value);
   27987          58 :     values[4] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject*)__pyx_float_1eneg_6)));
   27988          58 :     values[5] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)__pyx_int_400)));
   27989          58 :     values[6] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_False)));
   27990          58 :     if (__pyx_kwds) {
   27991          50 :       Py_ssize_t kw_args;
   27992          50 :       switch (__pyx_nargs) {
   27993           0 :         case  7: values[6] = __Pyx_Arg_FASTCALL(__pyx_args, 6);
   27994           0 :         CYTHON_FALLTHROUGH;
   27995           0 :         case  6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
   27996           0 :         CYTHON_FALLTHROUGH;
   27997           0 :         case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
   27998           0 :         CYTHON_FALLTHROUGH;
   27999           0 :         case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
   28000          50 :         CYTHON_FALLTHROUGH;
   28001          50 :         case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
   28002          50 :         CYTHON_FALLTHROUGH;
   28003          50 :         case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
   28004          50 :         CYTHON_FALLTHROUGH;
   28005          50 :         case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
   28006          50 :         CYTHON_FALLTHROUGH;
   28007          50 :         case  0: break;
   28008           0 :         default: goto __pyx_L5_argtuple_error;
   28009             :       }
   28010          50 :       kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
   28011          50 :       switch (__pyx_nargs) {
   28012           0 :         case  0:
   28013           0 :         if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
   28014           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
   28015           0 :           kw_args--;
   28016             :         }
   28017           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 930, __pyx_L3_error)
   28018           0 :         else goto __pyx_L5_argtuple_error;
   28019           0 :         CYTHON_FALLTHROUGH;
   28020             :         case  1:
   28021           0 :         if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_points)) != 0)) {
   28022           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
   28023           0 :           kw_args--;
   28024             :         }
   28025           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 930, __pyx_L3_error)
   28026             :         else {
   28027           0 :           __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 7, 1); __PYX_ERR(0, 930, __pyx_L3_error)
   28028             :         }
   28029           0 :         CYTHON_FALLTHROUGH;
   28030             :         case  2:
   28031           0 :         if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_values)) != 0)) {
   28032           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
   28033           0 :           kw_args--;
   28034             :         }
   28035           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 930, __pyx_L3_error)
   28036             :         else {
   28037           0 :           __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 7, 2); __PYX_ERR(0, 930, __pyx_L3_error)
   28038             :         }
   28039          50 :         CYTHON_FALLTHROUGH;
   28040             :         case  3:
   28041          50 :         if (kw_args > 0) {
   28042          50 :           PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fill_value);
   28043          50 :           if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
   28044          36 :           else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 930, __pyx_L3_error)
   28045             :         }
   28046          50 :         CYTHON_FALLTHROUGH;
   28047             :         case  4:
   28048          50 :         if (kw_args > 0) {
   28049          50 :           PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_tol);
   28050          50 :           if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
   28051          16 :           else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 930, __pyx_L3_error)
   28052             :         }
   28053          50 :         CYTHON_FALLTHROUGH;
   28054             :         case  5:
   28055          50 :         if (kw_args > 0) {
   28056          50 :           PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_maxiter);
   28057          50 :           if (value) { values[5] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
   28058          50 :           else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 930, __pyx_L3_error)
   28059             :         }
   28060          50 :         CYTHON_FALLTHROUGH;
   28061             :         case  6:
   28062          50 :         if (kw_args > 0) {
   28063          50 :           PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_rescale);
   28064          50 :           if (value) { values[6] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
   28065           0 :           else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 930, __pyx_L3_error)
   28066             :         }
   28067             :       }
   28068          50 :       if (unlikely(kw_args > 0)) {
   28069           0 :         const Py_ssize_t kwd_pos_args = __pyx_nargs;
   28070           0 :         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 930, __pyx_L3_error)
   28071             :       }
   28072             :     } else {
   28073           8 :       switch (__pyx_nargs) {
   28074           0 :         case  7: values[6] = __Pyx_Arg_FASTCALL(__pyx_args, 6);
   28075           0 :         CYTHON_FALLTHROUGH;
   28076           0 :         case  6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
   28077           0 :         CYTHON_FALLTHROUGH;
   28078           0 :         case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
   28079           0 :         CYTHON_FALLTHROUGH;
   28080           0 :         case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
   28081           8 :         CYTHON_FALLTHROUGH;
   28082           8 :         case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
   28083           8 :         values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
   28084           8 :         values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
   28085           8 :         break;
   28086           0 :         default: goto __pyx_L5_argtuple_error;
   28087             :       }
   28088             :     }
   28089          58 :     __pyx_v_self = values[0];
   28090          58 :     __pyx_v_points = values[1];
   28091          58 :     __pyx_v_values = values[2];
   28092          58 :     __pyx_v_fill_value = values[3];
   28093          58 :     __pyx_v_tol = values[4];
   28094          58 :     __pyx_v_maxiter = values[5];
   28095          58 :     __pyx_v_rescale = values[6];
   28096             :   }
   28097          58 :   goto __pyx_L6_skip;
   28098           0 :   __pyx_L5_argtuple_error:;
   28099           0 :   __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 7, __pyx_nargs); __PYX_ERR(0, 930, __pyx_L3_error)
   28100          58 :   __pyx_L6_skip:;
   28101          58 :   goto __pyx_L4_argument_unpacking_done;
   28102           0 :   __pyx_L3_error:;
   28103             :   {
   28104           0 :     Py_ssize_t __pyx_temp;
   28105           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   28106             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
   28107             :     }
   28108             :   }
   28109           0 :   __Pyx_AddTraceback("scipy.interpolate._interpnd.CloughTocher2DInterpolator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   28110           0 :   __Pyx_RefNannyFinishContext();
   28111           0 :   return NULL;
   28112          58 :   __pyx_L4_argument_unpacking_done:;
   28113          58 :   __pyx_r = __pyx_pf_5scipy_11interpolate_9_interpnd_26CloughTocher2DInterpolator___init__(__pyx_self, __pyx_v_self, __pyx_v_points, __pyx_v_values, __pyx_v_fill_value, __pyx_v_tol, __pyx_v_maxiter, __pyx_v_rescale);
   28114             : 
   28115             :   /* function exit code */
   28116             :   {
   28117          58 :     Py_ssize_t __pyx_temp;
   28118          58 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   28119             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
   28120             :     }
   28121             :   }
   28122             :   __Pyx_RefNannyFinishContext();
   28123             :   return __pyx_r;
   28124             : }
   28125             : 
   28126          58 : static PyObject *__pyx_pf_5scipy_11interpolate_9_interpnd_26CloughTocher2DInterpolator___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_points, PyObject *__pyx_v_values, PyObject *__pyx_v_fill_value, PyObject *__pyx_v_tol, PyObject *__pyx_v_maxiter, PyObject *__pyx_v_rescale) {
   28127          58 :   PyObject *__pyx_r = NULL;
   28128             :   __Pyx_RefNannyDeclarations
   28129          58 :   PyObject *__pyx_t_1 = NULL;
   28130          58 :   PyObject *__pyx_t_2 = NULL;
   28131          58 :   PyObject *__pyx_t_3 = NULL;
   28132          58 :   PyObject *__pyx_t_4 = NULL;
   28133          58 :   int __pyx_lineno = 0;
   28134          58 :   const char *__pyx_filename = NULL;
   28135          58 :   int __pyx_clineno = 0;
   28136          58 :   __Pyx_RefNannySetupContext("__init__", 1);
   28137             : 
   28138             :   /* "scipy/interpolate/_interpnd.pyx":932
   28139             :  *     def __init__(self, points, values, fill_value=np.nan,
   28140             :  *                  tol=1e-6, maxiter=400, rescale=False):
   28141             :  *         self._tol = tol             # <<<<<<<<<<<<<<
   28142             :  *         self._maxiter = maxiter
   28143             :  *         NDInterpolatorBase.__init__(self, points, values, ndim=2,
   28144             :  */
   28145          58 :   if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_tol_2, __pyx_v_tol) < 0) __PYX_ERR(0, 932, __pyx_L1_error)
   28146             : 
   28147             :   /* "scipy/interpolate/_interpnd.pyx":933
   28148             :  *                  tol=1e-6, maxiter=400, rescale=False):
   28149             :  *         self._tol = tol
   28150             :  *         self._maxiter = maxiter             # <<<<<<<<<<<<<<
   28151             :  *         NDInterpolatorBase.__init__(self, points, values, ndim=2,
   28152             :  *                                     fill_value=fill_value, rescale=rescale,
   28153             :  */
   28154          58 :   if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_maxiter_2, __pyx_v_maxiter) < 0) __PYX_ERR(0, 933, __pyx_L1_error)
   28155             : 
   28156             :   /* "scipy/interpolate/_interpnd.pyx":934
   28157             :  *         self._tol = tol
   28158             :  *         self._maxiter = maxiter
   28159             :  *         NDInterpolatorBase.__init__(self, points, values, ndim=2,             # <<<<<<<<<<<<<<
   28160             :  *                                     fill_value=fill_value, rescale=rescale,
   28161             :  *                                     need_values=False)
   28162             :  */
   28163          58 :   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_NDInterpolatorBase); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 934, __pyx_L1_error)
   28164          58 :   __Pyx_GOTREF(__pyx_t_1);
   28165          58 :   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 934, __pyx_L1_error)
   28166          58 :   __Pyx_GOTREF(__pyx_t_2);
   28167          58 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   28168          58 :   __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 934, __pyx_L1_error)
   28169          58 :   __Pyx_GOTREF(__pyx_t_1);
   28170          58 :   __Pyx_INCREF(__pyx_v_self);
   28171          58 :   __Pyx_GIVEREF(__pyx_v_self);
   28172          58 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self)) __PYX_ERR(0, 934, __pyx_L1_error);
   28173          58 :   __Pyx_INCREF(__pyx_v_points);
   28174          58 :   __Pyx_GIVEREF(__pyx_v_points);
   28175          58 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_points)) __PYX_ERR(0, 934, __pyx_L1_error);
   28176          58 :   __Pyx_INCREF(__pyx_v_values);
   28177          58 :   __Pyx_GIVEREF(__pyx_v_values);
   28178          58 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_values)) __PYX_ERR(0, 934, __pyx_L1_error);
   28179          58 :   __pyx_t_3 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 934, __pyx_L1_error)
   28180          58 :   __Pyx_GOTREF(__pyx_t_3);
   28181          58 :   if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_ndim, __pyx_int_2) < 0) __PYX_ERR(0, 934, __pyx_L1_error)
   28182             : 
   28183             :   /* "scipy/interpolate/_interpnd.pyx":935
   28184             :  *         self._maxiter = maxiter
   28185             :  *         NDInterpolatorBase.__init__(self, points, values, ndim=2,
   28186             :  *                                     fill_value=fill_value, rescale=rescale,             # <<<<<<<<<<<<<<
   28187             :  *                                     need_values=False)
   28188             :  * 
   28189             :  */
   28190          58 :   if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_fill_value, __pyx_v_fill_value) < 0) __PYX_ERR(0, 934, __pyx_L1_error)
   28191          58 :   if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_rescale, __pyx_v_rescale) < 0) __PYX_ERR(0, 934, __pyx_L1_error)
   28192             : 
   28193             :   /* "scipy/interpolate/_interpnd.pyx":936
   28194             :  *         NDInterpolatorBase.__init__(self, points, values, ndim=2,
   28195             :  *                                     fill_value=fill_value, rescale=rescale,
   28196             :  *                                     need_values=False)             # <<<<<<<<<<<<<<
   28197             :  * 
   28198             :  *     def _set_values(self, values, fill_value=np.nan, need_contiguous=True, ndim=None):
   28199             :  */
   28200          58 :   if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_need_values, Py_False) < 0) __PYX_ERR(0, 934, __pyx_L1_error)
   28201             : 
   28202             :   /* "scipy/interpolate/_interpnd.pyx":934
   28203             :  *         self._tol = tol
   28204             :  *         self._maxiter = maxiter
   28205             :  *         NDInterpolatorBase.__init__(self, points, values, ndim=2,             # <<<<<<<<<<<<<<
   28206             :  *                                     fill_value=fill_value, rescale=rescale,
   28207             :  *                                     need_values=False)
   28208             :  */
   28209          58 :   __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 934, __pyx_L1_error)
   28210          56 :   __Pyx_GOTREF(__pyx_t_4);
   28211          56 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   28212          56 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   28213          56 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   28214          56 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   28215             : 
   28216             :   /* "scipy/interpolate/_interpnd.pyx":930
   28217             :  *     """
   28218             :  * 
   28219             :  *     def __init__(self, points, values, fill_value=np.nan,             # <<<<<<<<<<<<<<
   28220             :  *                  tol=1e-6, maxiter=400, rescale=False):
   28221             :  *         self._tol = tol
   28222             :  */
   28223             : 
   28224             :   /* function exit code */
   28225          56 :   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   28226          56 :   goto __pyx_L0;
   28227           2 :   __pyx_L1_error:;
   28228           2 :   __Pyx_XDECREF(__pyx_t_1);
   28229           2 :   __Pyx_XDECREF(__pyx_t_2);
   28230           2 :   __Pyx_XDECREF(__pyx_t_3);
   28231           2 :   __Pyx_XDECREF(__pyx_t_4);
   28232           2 :   __Pyx_AddTraceback("scipy.interpolate._interpnd.CloughTocher2DInterpolator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   28233           2 :   __pyx_r = NULL;
   28234          58 :   __pyx_L0:;
   28235          58 :   __Pyx_XGIVEREF(__pyx_r);
   28236          58 :   __Pyx_RefNannyFinishContext();
   28237          58 :   return __pyx_r;
   28238             : }
   28239             : 
   28240             : /* "scipy/interpolate/_interpnd.pyx":938
   28241             :  *                                     need_values=False)
   28242             :  * 
   28243             :  *     def _set_values(self, values, fill_value=np.nan, need_contiguous=True, ndim=None):             # <<<<<<<<<<<<<<
   28244             :  *         """
   28245             :  *         Sets the values of the interpolation points.
   28246             :  */
   28247             : 
   28248           0 : static PyObject *__pyx_pf_5scipy_11interpolate_9_interpnd_12__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
   28249           0 :   PyObject *__pyx_r = NULL;
   28250             :   __Pyx_RefNannyDeclarations
   28251           0 :   PyObject *__pyx_t_1 = NULL;
   28252           0 :   PyObject *__pyx_t_2 = NULL;
   28253           0 :   int __pyx_lineno = 0;
   28254           0 :   const char *__pyx_filename = NULL;
   28255           0 :   int __pyx_clineno = 0;
   28256           0 :   __Pyx_RefNannySetupContext("__defaults__", 1);
   28257           0 :   __Pyx_XDECREF(__pyx_r);
   28258           0 :   __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 938, __pyx_L1_error)
   28259           0 :   __Pyx_GOTREF(__pyx_t_1);
   28260           0 :   __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults5, __pyx_self)->__pyx_arg_fill_value);
   28261           0 :   __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults5, __pyx_self)->__pyx_arg_fill_value);
   28262           0 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults5, __pyx_self)->__pyx_arg_fill_value)) __PYX_ERR(0, 938, __pyx_L1_error);
   28263           0 :   __Pyx_INCREF(((PyObject *)Py_True));
   28264           0 :   __Pyx_GIVEREF(((PyObject *)Py_True));
   28265           0 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)Py_True))) __PYX_ERR(0, 938, __pyx_L1_error);
   28266           0 :   __Pyx_INCREF(Py_None);
   28267           0 :   __Pyx_GIVEREF(Py_None);
   28268           0 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None)) __PYX_ERR(0, 938, __pyx_L1_error);
   28269           0 :   __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 938, __pyx_L1_error)
   28270           0 :   __Pyx_GOTREF(__pyx_t_2);
   28271           0 :   __Pyx_GIVEREF(__pyx_t_1);
   28272           0 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(0, 938, __pyx_L1_error);
   28273           0 :   __Pyx_INCREF(Py_None);
   28274           0 :   __Pyx_GIVEREF(Py_None);
   28275           0 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None)) __PYX_ERR(0, 938, __pyx_L1_error);
   28276           0 :   __pyx_t_1 = 0;
   28277           0 :   __pyx_r = __pyx_t_2;
   28278           0 :   __pyx_t_2 = 0;
   28279           0 :   goto __pyx_L0;
   28280             : 
   28281             :   /* function exit code */
   28282           0 :   __pyx_L1_error:;
   28283           0 :   __Pyx_XDECREF(__pyx_t_1);
   28284           0 :   __Pyx_XDECREF(__pyx_t_2);
   28285           0 :   __Pyx_AddTraceback("scipy.interpolate._interpnd.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   28286           0 :   __pyx_r = NULL;
   28287           0 :   __pyx_L0:;
   28288           0 :   __Pyx_XGIVEREF(__pyx_r);
   28289           0 :   __Pyx_RefNannyFinishContext();
   28290           0 :   return __pyx_r;
   28291             : }
   28292             : 
   28293             : /* Python wrapper */
   28294             : static PyObject *__pyx_pw_5scipy_11interpolate_9_interpnd_26CloughTocher2DInterpolator_3_set_values(PyObject *__pyx_self, 
   28295             : #if CYTHON_METH_FASTCALL
   28296             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   28297             : #else
   28298             : PyObject *__pyx_args, PyObject *__pyx_kwds
   28299             : #endif
   28300             : ); /*proto*/
   28301             : PyDoc_STRVAR(__pyx_doc_5scipy_11interpolate_9_interpnd_26CloughTocher2DInterpolator_2_set_values, "\n        Sets the values of the interpolation points.\n\n        Parameters\n        ----------\n        values : ndarray of float or complex, shape (npoints, ...)\n            Data values.\n        ");
   28302             : static PyMethodDef __pyx_mdef_5scipy_11interpolate_9_interpnd_26CloughTocher2DInterpolator_3_set_values = {"_set_values", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5scipy_11interpolate_9_interpnd_26CloughTocher2DInterpolator_3_set_values, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5scipy_11interpolate_9_interpnd_26CloughTocher2DInterpolator_2_set_values};
   28303          57 : static PyObject *__pyx_pw_5scipy_11interpolate_9_interpnd_26CloughTocher2DInterpolator_3_set_values(PyObject *__pyx_self, 
   28304             : #if CYTHON_METH_FASTCALL
   28305             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   28306             : #else
   28307             : PyObject *__pyx_args, PyObject *__pyx_kwds
   28308             : #endif
   28309             : ) {
   28310          57 :   PyObject *__pyx_v_self = 0;
   28311          57 :   PyObject *__pyx_v_values = 0;
   28312          57 :   PyObject *__pyx_v_fill_value = 0;
   28313          57 :   PyObject *__pyx_v_need_contiguous = 0;
   28314          57 :   PyObject *__pyx_v_ndim = 0;
   28315             :   #if !CYTHON_METH_FASTCALL
   28316             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
   28317             :   #endif
   28318          57 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   28319          57 :   PyObject* values[5] = {0,0,0,0,0};
   28320          57 :   int __pyx_lineno = 0;
   28321          57 :   const char *__pyx_filename = NULL;
   28322          57 :   int __pyx_clineno = 0;
   28323          57 :   PyObject *__pyx_r = 0;
   28324             :   __Pyx_RefNannyDeclarations
   28325          57 :   __Pyx_RefNannySetupContext("_set_values (wrapper)", 0);
   28326             :   #if !CYTHON_METH_FASTCALL
   28327             :   #if CYTHON_ASSUME_SAFE_MACROS
   28328             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
   28329             :   #else
   28330             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
   28331             :   #endif
   28332             :   #endif
   28333          57 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
   28334             :   {
   28335          57 :     PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_values,&__pyx_n_s_fill_value,&__pyx_n_s_need_contiguous,&__pyx_n_s_ndim,0};
   28336          57 :     __pyx_defaults5 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults5, __pyx_self);
   28337          57 :     values[2] = __Pyx_Arg_NewRef_FASTCALL(__pyx_dynamic_args->__pyx_arg_fill_value);
   28338          57 :     values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_True)));
   28339          57 :     values[4] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
   28340          57 :     if (__pyx_kwds) {
   28341           0 :       Py_ssize_t kw_args;
   28342           0 :       switch (__pyx_nargs) {
   28343           0 :         case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
   28344           0 :         CYTHON_FALLTHROUGH;
   28345           0 :         case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
   28346           0 :         CYTHON_FALLTHROUGH;
   28347           0 :         case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
   28348           0 :         CYTHON_FALLTHROUGH;
   28349           0 :         case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
   28350           0 :         CYTHON_FALLTHROUGH;
   28351           0 :         case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
   28352           0 :         CYTHON_FALLTHROUGH;
   28353           0 :         case  0: break;
   28354           0 :         default: goto __pyx_L5_argtuple_error;
   28355             :       }
   28356           0 :       kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
   28357           0 :       switch (__pyx_nargs) {
   28358           0 :         case  0:
   28359           0 :         if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
   28360           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
   28361           0 :           kw_args--;
   28362             :         }
   28363           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 938, __pyx_L3_error)
   28364           0 :         else goto __pyx_L5_argtuple_error;
   28365           0 :         CYTHON_FALLTHROUGH;
   28366             :         case  1:
   28367           0 :         if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_values)) != 0)) {
   28368           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
   28369           0 :           kw_args--;
   28370             :         }
   28371           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 938, __pyx_L3_error)
   28372             :         else {
   28373           0 :           __Pyx_RaiseArgtupleInvalid("_set_values", 0, 2, 5, 1); __PYX_ERR(0, 938, __pyx_L3_error)
   28374             :         }
   28375           0 :         CYTHON_FALLTHROUGH;
   28376             :         case  2:
   28377           0 :         if (kw_args > 0) {
   28378           0 :           PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fill_value);
   28379           0 :           if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
   28380           0 :           else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 938, __pyx_L3_error)
   28381             :         }
   28382           0 :         CYTHON_FALLTHROUGH;
   28383             :         case  3:
   28384           0 :         if (kw_args > 0) {
   28385           0 :           PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_need_contiguous);
   28386           0 :           if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
   28387           0 :           else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 938, __pyx_L3_error)
   28388             :         }
   28389           0 :         CYTHON_FALLTHROUGH;
   28390             :         case  4:
   28391           0 :         if (kw_args > 0) {
   28392           0 :           PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ndim);
   28393           0 :           if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
   28394           0 :           else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 938, __pyx_L3_error)
   28395             :         }
   28396             :       }
   28397           0 :       if (unlikely(kw_args > 0)) {
   28398           0 :         const Py_ssize_t kwd_pos_args = __pyx_nargs;
   28399           0 :         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_set_values") < 0)) __PYX_ERR(0, 938, __pyx_L3_error)
   28400             :       }
   28401             :     } else {
   28402          57 :       switch (__pyx_nargs) {
   28403          57 :         case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
   28404          57 :         CYTHON_FALLTHROUGH;
   28405          57 :         case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
   28406          57 :         CYTHON_FALLTHROUGH;
   28407          57 :         case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
   28408          57 :         CYTHON_FALLTHROUGH;
   28409          57 :         case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
   28410          57 :         values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
   28411          57 :         break;
   28412           0 :         default: goto __pyx_L5_argtuple_error;
   28413             :       }
   28414             :     }
   28415          57 :     __pyx_v_self = values[0];
   28416          57 :     __pyx_v_values = values[1];
   28417          57 :     __pyx_v_fill_value = values[2];
   28418          57 :     __pyx_v_need_contiguous = values[3];
   28419          57 :     __pyx_v_ndim = values[4];
   28420             :   }
   28421          57 :   goto __pyx_L6_skip;
   28422           0 :   __pyx_L5_argtuple_error:;
   28423           0 :   __Pyx_RaiseArgtupleInvalid("_set_values", 0, 2, 5, __pyx_nargs); __PYX_ERR(0, 938, __pyx_L3_error)
   28424          57 :   __pyx_L6_skip:;
   28425          57 :   goto __pyx_L4_argument_unpacking_done;
   28426           0 :   __pyx_L3_error:;
   28427             :   {
   28428           0 :     Py_ssize_t __pyx_temp;
   28429           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   28430             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
   28431             :     }
   28432             :   }
   28433           0 :   __Pyx_AddTraceback("scipy.interpolate._interpnd.CloughTocher2DInterpolator._set_values", __pyx_clineno, __pyx_lineno, __pyx_filename);
   28434           0 :   __Pyx_RefNannyFinishContext();
   28435           0 :   return NULL;
   28436          57 :   __pyx_L4_argument_unpacking_done:;
   28437          57 :   __pyx_r = __pyx_pf_5scipy_11interpolate_9_interpnd_26CloughTocher2DInterpolator_2_set_values(__pyx_self, __pyx_v_self, __pyx_v_values, __pyx_v_fill_value, __pyx_v_need_contiguous, __pyx_v_ndim);
   28438             : 
   28439             :   /* function exit code */
   28440             :   {
   28441          57 :     Py_ssize_t __pyx_temp;
   28442          57 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   28443             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
   28444             :     }
   28445             :   }
   28446             :   __Pyx_RefNannyFinishContext();
   28447             :   return __pyx_r;
   28448             : }
   28449             : 
   28450          57 : static PyObject *__pyx_pf_5scipy_11interpolate_9_interpnd_26CloughTocher2DInterpolator_2_set_values(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_values, PyObject *__pyx_v_fill_value, PyObject *__pyx_v_need_contiguous, PyObject *__pyx_v_ndim) {
   28451          57 :   PyObject *__pyx_r = NULL;
   28452             :   __Pyx_RefNannyDeclarations
   28453          57 :   PyObject *__pyx_t_1 = NULL;
   28454          57 :   PyObject *__pyx_t_2 = NULL;
   28455          57 :   PyObject *__pyx_t_3 = NULL;
   28456          57 :   PyObject *__pyx_t_4 = NULL;
   28457          57 :   int __pyx_t_5;
   28458          57 :   int __pyx_t_6;
   28459          57 :   double __pyx_t_7;
   28460          57 :   struct __pyx_opt_args_5scipy_11interpolate_9_interpnd_estimate_gradients_2d_global __pyx_t_8;
   28461          57 :   int __pyx_lineno = 0;
   28462          57 :   const char *__pyx_filename = NULL;
   28463          57 :   int __pyx_clineno = 0;
   28464          57 :   __Pyx_RefNannySetupContext("_set_values", 1);
   28465             : 
   28466             :   /* "scipy/interpolate/_interpnd.pyx":947
   28467             :  *             Data values.
   28468             :  *         """
   28469             :  *         NDInterpolatorBase._set_values(self, values, fill_value=fill_value, need_contiguous=need_contiguous, ndim=ndim)             # <<<<<<<<<<<<<<
   28470             :  *         if self.values is not None:
   28471             :  *             self.grad = estimate_gradients_2d_global(self.tri, self.values,
   28472             :  */
   28473          57 :   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_NDInterpolatorBase); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 947, __pyx_L1_error)
   28474          57 :   __Pyx_GOTREF(__pyx_t_1);
   28475          57 :   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_set_values); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 947, __pyx_L1_error)
   28476          57 :   __Pyx_GOTREF(__pyx_t_2);
   28477          57 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   28478          57 :   __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 947, __pyx_L1_error)
   28479          57 :   __Pyx_GOTREF(__pyx_t_1);
   28480          57 :   __Pyx_INCREF(__pyx_v_self);
   28481          57 :   __Pyx_GIVEREF(__pyx_v_self);
   28482          57 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self)) __PYX_ERR(0, 947, __pyx_L1_error);
   28483          57 :   __Pyx_INCREF(__pyx_v_values);
   28484          57 :   __Pyx_GIVEREF(__pyx_v_values);
   28485          57 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_values)) __PYX_ERR(0, 947, __pyx_L1_error);
   28486          57 :   __pyx_t_3 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 947, __pyx_L1_error)
   28487          57 :   __Pyx_GOTREF(__pyx_t_3);
   28488          57 :   if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_fill_value, __pyx_v_fill_value) < 0) __PYX_ERR(0, 947, __pyx_L1_error)
   28489          57 :   if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_need_contiguous, __pyx_v_need_contiguous) < 0) __PYX_ERR(0, 947, __pyx_L1_error)
   28490          57 :   if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_ndim, __pyx_v_ndim) < 0) __PYX_ERR(0, 947, __pyx_L1_error)
   28491          57 :   __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 947, __pyx_L1_error)
   28492          56 :   __Pyx_GOTREF(__pyx_t_4);
   28493          56 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   28494          56 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   28495          56 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   28496          56 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   28497             : 
   28498             :   /* "scipy/interpolate/_interpnd.pyx":948
   28499             :  *         """
   28500             :  *         NDInterpolatorBase._set_values(self, values, fill_value=fill_value, need_contiguous=need_contiguous, ndim=ndim)
   28501             :  *         if self.values is not None:             # <<<<<<<<<<<<<<
   28502             :  *             self.grad = estimate_gradients_2d_global(self.tri, self.values,
   28503             :  *                                                     tol=self._tol, maxiter=self._maxiter)
   28504             :  */
   28505          56 :   __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_values); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 948, __pyx_L1_error)
   28506          56 :   __Pyx_GOTREF(__pyx_t_4);
   28507          56 :   __pyx_t_5 = (__pyx_t_4 != Py_None);
   28508          56 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   28509          56 :   if (__pyx_t_5) {
   28510             : 
   28511             :     /* "scipy/interpolate/_interpnd.pyx":949
   28512             :  *         NDInterpolatorBase._set_values(self, values, fill_value=fill_value, need_contiguous=need_contiguous, ndim=ndim)
   28513             :  *         if self.values is not None:
   28514             :  *             self.grad = estimate_gradients_2d_global(self.tri, self.values,             # <<<<<<<<<<<<<<
   28515             :  *                                                     tol=self._tol, maxiter=self._maxiter)
   28516             :  * 
   28517             :  */
   28518          56 :     __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tri); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 949, __pyx_L1_error)
   28519          56 :     __Pyx_GOTREF(__pyx_t_4);
   28520          56 :     __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_values); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 949, __pyx_L1_error)
   28521          56 :     __Pyx_GOTREF(__pyx_t_3);
   28522             : 
   28523             :     /* "scipy/interpolate/_interpnd.pyx":950
   28524             :  *         if self.values is not None:
   28525             :  *             self.grad = estimate_gradients_2d_global(self.tri, self.values,
   28526             :  *                                                     tol=self._tol, maxiter=self._maxiter)             # <<<<<<<<<<<<<<
   28527             :  * 
   28528             :  *     def _calculate_triangulation(self, points):
   28529             :  */
   28530          56 :     __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_maxiter_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 950, __pyx_L1_error)
   28531          56 :     __Pyx_GOTREF(__pyx_t_1);
   28532          56 :     __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 950, __pyx_L1_error)
   28533          56 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   28534          56 :     __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tol_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 950, __pyx_L1_error)
   28535          56 :     __Pyx_GOTREF(__pyx_t_1);
   28536          56 :     __pyx_t_7 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_7 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 950, __pyx_L1_error)
   28537          56 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   28538             : 
   28539             :     /* "scipy/interpolate/_interpnd.pyx":949
   28540             :  *         NDInterpolatorBase._set_values(self, values, fill_value=fill_value, need_contiguous=need_contiguous, ndim=ndim)
   28541             :  *         if self.values is not None:
   28542             :  *             self.grad = estimate_gradients_2d_global(self.tri, self.values,             # <<<<<<<<<<<<<<
   28543             :  *                                                     tol=self._tol, maxiter=self._maxiter)
   28544             :  * 
   28545             :  */
   28546          56 :     __pyx_t_8.__pyx_n = 2;
   28547          56 :     __pyx_t_8.maxiter = __pyx_t_6;
   28548          56 :     __pyx_t_8.tol = __pyx_t_7;
   28549          56 :     __pyx_t_1 = __pyx_f_5scipy_11interpolate_9_interpnd_estimate_gradients_2d_global(__pyx_t_4, __pyx_t_3, 0, &__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 949, __pyx_L1_error)
   28550          56 :     __Pyx_GOTREF(__pyx_t_1);
   28551          56 :     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   28552          56 :     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   28553          56 :     if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_grad, __pyx_t_1) < 0) __PYX_ERR(0, 949, __pyx_L1_error)
   28554          56 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   28555             : 
   28556             :     /* "scipy/interpolate/_interpnd.pyx":948
   28557             :  *         """
   28558             :  *         NDInterpolatorBase._set_values(self, values, fill_value=fill_value, need_contiguous=need_contiguous, ndim=ndim)
   28559             :  *         if self.values is not None:             # <<<<<<<<<<<<<<
   28560             :  *             self.grad = estimate_gradients_2d_global(self.tri, self.values,
   28561             :  *                                                     tol=self._tol, maxiter=self._maxiter)
   28562             :  */
   28563             :   }
   28564             : 
   28565             :   /* "scipy/interpolate/_interpnd.pyx":938
   28566             :  *                                     need_values=False)
   28567             :  * 
   28568             :  *     def _set_values(self, values, fill_value=np.nan, need_contiguous=True, ndim=None):             # <<<<<<<<<<<<<<
   28569             :  *         """
   28570             :  *         Sets the values of the interpolation points.
   28571             :  */
   28572             : 
   28573             :   /* function exit code */
   28574          56 :   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   28575          56 :   goto __pyx_L0;
   28576           1 :   __pyx_L1_error:;
   28577           1 :   __Pyx_XDECREF(__pyx_t_1);
   28578           1 :   __Pyx_XDECREF(__pyx_t_2);
   28579           1 :   __Pyx_XDECREF(__pyx_t_3);
   28580           1 :   __Pyx_XDECREF(__pyx_t_4);
   28581           1 :   __Pyx_AddTraceback("scipy.interpolate._interpnd.CloughTocher2DInterpolator._set_values", __pyx_clineno, __pyx_lineno, __pyx_filename);
   28582           1 :   __pyx_r = NULL;
   28583          57 :   __pyx_L0:;
   28584          57 :   __Pyx_XGIVEREF(__pyx_r);
   28585          57 :   __Pyx_RefNannyFinishContext();
   28586          57 :   return __pyx_r;
   28587             : }
   28588             : 
   28589             : /* "scipy/interpolate/_interpnd.pyx":952
   28590             :  *                                                     tol=self._tol, maxiter=self._maxiter)
   28591             :  * 
   28592             :  *     def _calculate_triangulation(self, points):             # <<<<<<<<<<<<<<
   28593             :  *         self.tri = qhull.Delaunay(points)
   28594             :  * 
   28595             :  */
   28596             : 
   28597             : /* Python wrapper */
   28598             : static PyObject *__pyx_pw_5scipy_11interpolate_9_interpnd_26CloughTocher2DInterpolator_5_calculate_triangulation(PyObject *__pyx_self, 
   28599             : #if CYTHON_METH_FASTCALL
   28600             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   28601             : #else
   28602             : PyObject *__pyx_args, PyObject *__pyx_kwds
   28603             : #endif
   28604             : ); /*proto*/
   28605             : static PyMethodDef __pyx_mdef_5scipy_11interpolate_9_interpnd_26CloughTocher2DInterpolator_5_calculate_triangulation = {"_calculate_triangulation", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5scipy_11interpolate_9_interpnd_26CloughTocher2DInterpolator_5_calculate_triangulation, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
   28606          56 : static PyObject *__pyx_pw_5scipy_11interpolate_9_interpnd_26CloughTocher2DInterpolator_5_calculate_triangulation(PyObject *__pyx_self, 
   28607             : #if CYTHON_METH_FASTCALL
   28608             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   28609             : #else
   28610             : PyObject *__pyx_args, PyObject *__pyx_kwds
   28611             : #endif
   28612             : ) {
   28613          56 :   PyObject *__pyx_v_self = 0;
   28614          56 :   PyObject *__pyx_v_points = 0;
   28615             :   #if !CYTHON_METH_FASTCALL
   28616             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
   28617             :   #endif
   28618          56 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   28619          56 :   PyObject* values[2] = {0,0};
   28620          56 :   int __pyx_lineno = 0;
   28621          56 :   const char *__pyx_filename = NULL;
   28622          56 :   int __pyx_clineno = 0;
   28623          56 :   PyObject *__pyx_r = 0;
   28624             :   __Pyx_RefNannyDeclarations
   28625          56 :   __Pyx_RefNannySetupContext("_calculate_triangulation (wrapper)", 0);
   28626             :   #if !CYTHON_METH_FASTCALL
   28627             :   #if CYTHON_ASSUME_SAFE_MACROS
   28628             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
   28629             :   #else
   28630             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
   28631             :   #endif
   28632             :   #endif
   28633          56 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
   28634             :   {
   28635          56 :     PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_points,0};
   28636          56 :     if (__pyx_kwds) {
   28637           0 :       Py_ssize_t kw_args;
   28638           0 :       switch (__pyx_nargs) {
   28639           0 :         case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
   28640           0 :         CYTHON_FALLTHROUGH;
   28641           0 :         case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
   28642           0 :         CYTHON_FALLTHROUGH;
   28643           0 :         case  0: break;
   28644           0 :         default: goto __pyx_L5_argtuple_error;
   28645             :       }
   28646           0 :       kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
   28647           0 :       switch (__pyx_nargs) {
   28648             :         case  0:
   28649           0 :         if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
   28650           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
   28651           0 :           kw_args--;
   28652             :         }
   28653           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 952, __pyx_L3_error)
   28654           0 :         else goto __pyx_L5_argtuple_error;
   28655           0 :         CYTHON_FALLTHROUGH;
   28656             :         case  1:
   28657           0 :         if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_points)) != 0)) {
   28658           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
   28659           0 :           kw_args--;
   28660             :         }
   28661           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 952, __pyx_L3_error)
   28662             :         else {
   28663           0 :           __Pyx_RaiseArgtupleInvalid("_calculate_triangulation", 1, 2, 2, 1); __PYX_ERR(0, 952, __pyx_L3_error)
   28664             :         }
   28665             :       }
   28666           0 :       if (unlikely(kw_args > 0)) {
   28667           0 :         const Py_ssize_t kwd_pos_args = __pyx_nargs;
   28668           0 :         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_calculate_triangulation") < 0)) __PYX_ERR(0, 952, __pyx_L3_error)
   28669             :       }
   28670          56 :     } else if (unlikely(__pyx_nargs != 2)) {
   28671           0 :       goto __pyx_L5_argtuple_error;
   28672             :     } else {
   28673          56 :       values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
   28674          56 :       values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
   28675             :     }
   28676          56 :     __pyx_v_self = values[0];
   28677          56 :     __pyx_v_points = values[1];
   28678             :   }
   28679          56 :   goto __pyx_L6_skip;
   28680           0 :   __pyx_L5_argtuple_error:;
   28681           0 :   __Pyx_RaiseArgtupleInvalid("_calculate_triangulation", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 952, __pyx_L3_error)
   28682          56 :   __pyx_L6_skip:;
   28683          56 :   goto __pyx_L4_argument_unpacking_done;
   28684           0 :   __pyx_L3_error:;
   28685             :   {
   28686           0 :     Py_ssize_t __pyx_temp;
   28687           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   28688             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
   28689             :     }
   28690             :   }
   28691           0 :   __Pyx_AddTraceback("scipy.interpolate._interpnd.CloughTocher2DInterpolator._calculate_triangulation", __pyx_clineno, __pyx_lineno, __pyx_filename);
   28692           0 :   __Pyx_RefNannyFinishContext();
   28693           0 :   return NULL;
   28694          56 :   __pyx_L4_argument_unpacking_done:;
   28695          56 :   __pyx_r = __pyx_pf_5scipy_11interpolate_9_interpnd_26CloughTocher2DInterpolator_4_calculate_triangulation(__pyx_self, __pyx_v_self, __pyx_v_points);
   28696             : 
   28697             :   /* function exit code */
   28698             :   {
   28699          56 :     Py_ssize_t __pyx_temp;
   28700          56 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   28701             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
   28702             :     }
   28703             :   }
   28704             :   __Pyx_RefNannyFinishContext();
   28705             :   return __pyx_r;
   28706             : }
   28707             : 
   28708          56 : static PyObject *__pyx_pf_5scipy_11interpolate_9_interpnd_26CloughTocher2DInterpolator_4_calculate_triangulation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_points) {
   28709          56 :   PyObject *__pyx_r = NULL;
   28710             :   __Pyx_RefNannyDeclarations
   28711          56 :   PyObject *__pyx_t_1 = NULL;
   28712          56 :   PyObject *__pyx_t_2 = NULL;
   28713          56 :   PyObject *__pyx_t_3 = NULL;
   28714          56 :   unsigned int __pyx_t_4;
   28715          56 :   int __pyx_lineno = 0;
   28716          56 :   const char *__pyx_filename = NULL;
   28717          56 :   int __pyx_clineno = 0;
   28718          56 :   __Pyx_RefNannySetupContext("_calculate_triangulation", 1);
   28719             : 
   28720             :   /* "scipy/interpolate/_interpnd.pyx":953
   28721             :  * 
   28722             :  *     def _calculate_triangulation(self, points):
   28723             :  *         self.tri = qhull.Delaunay(points)             # <<<<<<<<<<<<<<
   28724             :  * 
   28725             :  *     def _evaluate_double(self, xi):
   28726             :  */
   28727          56 :   __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_qhull); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 953, __pyx_L1_error)
   28728          56 :   __Pyx_GOTREF(__pyx_t_2);
   28729          56 :   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Delaunay); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 953, __pyx_L1_error)
   28730          56 :   __Pyx_GOTREF(__pyx_t_3);
   28731          56 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   28732          56 :   __pyx_t_2 = NULL;
   28733          56 :   __pyx_t_4 = 0;
   28734             :   #if CYTHON_UNPACK_METHODS
   28735          56 :   if (unlikely(PyMethod_Check(__pyx_t_3))) {
   28736           0 :     __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
   28737           0 :     if (likely(__pyx_t_2)) {
   28738           0 :       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
   28739           0 :       __Pyx_INCREF(__pyx_t_2);
   28740           0 :       __Pyx_INCREF(function);
   28741           0 :       __Pyx_DECREF_SET(__pyx_t_3, function);
   28742             :       __pyx_t_4 = 1;
   28743             :     }
   28744             :   }
   28745             :   #endif
   28746             :   {
   28747          56 :     PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_points};
   28748          56 :     __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
   28749          56 :     __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
   28750          56 :     if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 953, __pyx_L1_error)
   28751          56 :     __Pyx_GOTREF(__pyx_t_1);
   28752          56 :     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   28753             :   }
   28754          56 :   if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_tri, __pyx_t_1) < 0) __PYX_ERR(0, 953, __pyx_L1_error)
   28755          56 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   28756             : 
   28757             :   /* "scipy/interpolate/_interpnd.pyx":952
   28758             :  *                                                     tol=self._tol, maxiter=self._maxiter)
   28759             :  * 
   28760             :  *     def _calculate_triangulation(self, points):             # <<<<<<<<<<<<<<
   28761             :  *         self.tri = qhull.Delaunay(points)
   28762             :  * 
   28763             :  */
   28764             : 
   28765             :   /* function exit code */
   28766          56 :   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   28767          56 :   goto __pyx_L0;
   28768           0 :   __pyx_L1_error:;
   28769           0 :   __Pyx_XDECREF(__pyx_t_1);
   28770           0 :   __Pyx_XDECREF(__pyx_t_2);
   28771           0 :   __Pyx_XDECREF(__pyx_t_3);
   28772           0 :   __Pyx_AddTraceback("scipy.interpolate._interpnd.CloughTocher2DInterpolator._calculate_triangulation", __pyx_clineno, __pyx_lineno, __pyx_filename);
   28773           0 :   __pyx_r = NULL;
   28774          56 :   __pyx_L0:;
   28775          56 :   __Pyx_XGIVEREF(__pyx_r);
   28776          56 :   __Pyx_RefNannyFinishContext();
   28777          56 :   return __pyx_r;
   28778             : }
   28779             : 
   28780             : /* "scipy/interpolate/_interpnd.pyx":955
   28781             :  *         self.tri = qhull.Delaunay(points)
   28782             :  * 
   28783             :  *     def _evaluate_double(self, xi):             # <<<<<<<<<<<<<<
   28784             :  *         return self._do_evaluate(xi, 1.0)
   28785             :  * 
   28786             :  */
   28787             : 
   28788             : /* Python wrapper */
   28789             : static PyObject *__pyx_pw_5scipy_11interpolate_9_interpnd_26CloughTocher2DInterpolator_7_evaluate_double(PyObject *__pyx_self, 
   28790             : #if CYTHON_METH_FASTCALL
   28791             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   28792             : #else
   28793             : PyObject *__pyx_args, PyObject *__pyx_kwds
   28794             : #endif
   28795             : ); /*proto*/
   28796             : static PyMethodDef __pyx_mdef_5scipy_11interpolate_9_interpnd_26CloughTocher2DInterpolator_7_evaluate_double = {"_evaluate_double", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5scipy_11interpolate_9_interpnd_26CloughTocher2DInterpolator_7_evaluate_double, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
   28797          52 : static PyObject *__pyx_pw_5scipy_11interpolate_9_interpnd_26CloughTocher2DInterpolator_7_evaluate_double(PyObject *__pyx_self, 
   28798             : #if CYTHON_METH_FASTCALL
   28799             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   28800             : #else
   28801             : PyObject *__pyx_args, PyObject *__pyx_kwds
   28802             : #endif
   28803             : ) {
   28804          52 :   PyObject *__pyx_v_self = 0;
   28805          52 :   PyObject *__pyx_v_xi = 0;
   28806             :   #if !CYTHON_METH_FASTCALL
   28807             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
   28808             :   #endif
   28809          52 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   28810          52 :   PyObject* values[2] = {0,0};
   28811          52 :   int __pyx_lineno = 0;
   28812          52 :   const char *__pyx_filename = NULL;
   28813          52 :   int __pyx_clineno = 0;
   28814          52 :   PyObject *__pyx_r = 0;
   28815             :   __Pyx_RefNannyDeclarations
   28816          52 :   __Pyx_RefNannySetupContext("_evaluate_double (wrapper)", 0);
   28817             :   #if !CYTHON_METH_FASTCALL
   28818             :   #if CYTHON_ASSUME_SAFE_MACROS
   28819             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
   28820             :   #else
   28821             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
   28822             :   #endif
   28823             :   #endif
   28824          52 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
   28825             :   {
   28826          52 :     PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_xi,0};
   28827          52 :     if (__pyx_kwds) {
   28828           0 :       Py_ssize_t kw_args;
   28829           0 :       switch (__pyx_nargs) {
   28830           0 :         case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
   28831           0 :         CYTHON_FALLTHROUGH;
   28832           0 :         case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
   28833           0 :         CYTHON_FALLTHROUGH;
   28834           0 :         case  0: break;
   28835           0 :         default: goto __pyx_L5_argtuple_error;
   28836             :       }
   28837           0 :       kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
   28838           0 :       switch (__pyx_nargs) {
   28839             :         case  0:
   28840           0 :         if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
   28841           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
   28842           0 :           kw_args--;
   28843             :         }
   28844           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 955, __pyx_L3_error)
   28845           0 :         else goto __pyx_L5_argtuple_error;
   28846           0 :         CYTHON_FALLTHROUGH;
   28847             :         case  1:
   28848           0 :         if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_xi)) != 0)) {
   28849           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
   28850           0 :           kw_args--;
   28851             :         }
   28852           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 955, __pyx_L3_error)
   28853             :         else {
   28854           0 :           __Pyx_RaiseArgtupleInvalid("_evaluate_double", 1, 2, 2, 1); __PYX_ERR(0, 955, __pyx_L3_error)
   28855             :         }
   28856             :       }
   28857           0 :       if (unlikely(kw_args > 0)) {
   28858           0 :         const Py_ssize_t kwd_pos_args = __pyx_nargs;
   28859           0 :         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_evaluate_double") < 0)) __PYX_ERR(0, 955, __pyx_L3_error)
   28860             :       }
   28861          52 :     } else if (unlikely(__pyx_nargs != 2)) {
   28862           0 :       goto __pyx_L5_argtuple_error;
   28863             :     } else {
   28864          52 :       values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
   28865          52 :       values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
   28866             :     }
   28867          52 :     __pyx_v_self = values[0];
   28868          52 :     __pyx_v_xi = values[1];
   28869             :   }
   28870          52 :   goto __pyx_L6_skip;
   28871           0 :   __pyx_L5_argtuple_error:;
   28872           0 :   __Pyx_RaiseArgtupleInvalid("_evaluate_double", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 955, __pyx_L3_error)
   28873          52 :   __pyx_L6_skip:;
   28874          52 :   goto __pyx_L4_argument_unpacking_done;
   28875           0 :   __pyx_L3_error:;
   28876             :   {
   28877           0 :     Py_ssize_t __pyx_temp;
   28878           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   28879             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
   28880             :     }
   28881             :   }
   28882           0 :   __Pyx_AddTraceback("scipy.interpolate._interpnd.CloughTocher2DInterpolator._evaluate_double", __pyx_clineno, __pyx_lineno, __pyx_filename);
   28883           0 :   __Pyx_RefNannyFinishContext();
   28884           0 :   return NULL;
   28885          52 :   __pyx_L4_argument_unpacking_done:;
   28886          52 :   __pyx_r = __pyx_pf_5scipy_11interpolate_9_interpnd_26CloughTocher2DInterpolator_6_evaluate_double(__pyx_self, __pyx_v_self, __pyx_v_xi);
   28887             : 
   28888             :   /* function exit code */
   28889             :   {
   28890          52 :     Py_ssize_t __pyx_temp;
   28891          52 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   28892             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
   28893             :     }
   28894             :   }
   28895             :   __Pyx_RefNannyFinishContext();
   28896             :   return __pyx_r;
   28897             : }
   28898             : 
   28899          52 : static PyObject *__pyx_pf_5scipy_11interpolate_9_interpnd_26CloughTocher2DInterpolator_6_evaluate_double(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_xi) {
   28900          52 :   PyObject *__pyx_r = NULL;
   28901             :   __Pyx_RefNannyDeclarations
   28902          52 :   PyObject *__pyx_t_1 = NULL;
   28903          52 :   PyObject *__pyx_t_2 = NULL;
   28904          52 :   PyObject *__pyx_t_3 = NULL;
   28905          52 :   unsigned int __pyx_t_4;
   28906          52 :   int __pyx_lineno = 0;
   28907          52 :   const char *__pyx_filename = NULL;
   28908          52 :   int __pyx_clineno = 0;
   28909          52 :   __Pyx_RefNannySetupContext("_evaluate_double", 1);
   28910             : 
   28911             :   /* "scipy/interpolate/_interpnd.pyx":956
   28912             :  * 
   28913             :  *     def _evaluate_double(self, xi):
   28914             :  *         return self._do_evaluate(xi, 1.0)             # <<<<<<<<<<<<<<
   28915             :  * 
   28916             :  *     def _evaluate_complex(self, xi):
   28917             :  */
   28918          52 :   __Pyx_XDECREF(__pyx_r);
   28919          52 :   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_do_evaluate); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 956, __pyx_L1_error)
   28920          52 :   __Pyx_GOTREF(__pyx_t_2);
   28921          52 :   __pyx_t_3 = NULL;
   28922          52 :   __pyx_t_4 = 0;
   28923             :   #if CYTHON_UNPACK_METHODS
   28924          52 :   if (likely(PyMethod_Check(__pyx_t_2))) {
   28925           0 :     __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
   28926           0 :     if (likely(__pyx_t_3)) {
   28927           0 :       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
   28928           0 :       __Pyx_INCREF(__pyx_t_3);
   28929           0 :       __Pyx_INCREF(function);
   28930           0 :       __Pyx_DECREF_SET(__pyx_t_2, function);
   28931             :       __pyx_t_4 = 1;
   28932             :     }
   28933             :   }
   28934             :   #endif
   28935             :   {
   28936          52 :     PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_xi, __pyx_float_1_0};
   28937          52 :     __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
   28938          52 :     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
   28939          52 :     if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 956, __pyx_L1_error)
   28940          52 :     __Pyx_GOTREF(__pyx_t_1);
   28941          52 :     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   28942             :   }
   28943          52 :   __pyx_r = __pyx_t_1;
   28944          52 :   __pyx_t_1 = 0;
   28945          52 :   goto __pyx_L0;
   28946             : 
   28947             :   /* "scipy/interpolate/_interpnd.pyx":955
   28948             :  *         self.tri = qhull.Delaunay(points)
   28949             :  * 
   28950             :  *     def _evaluate_double(self, xi):             # <<<<<<<<<<<<<<
   28951             :  *         return self._do_evaluate(xi, 1.0)
   28952             :  * 
   28953             :  */
   28954             : 
   28955             :   /* function exit code */
   28956           0 :   __pyx_L1_error:;
   28957           0 :   __Pyx_XDECREF(__pyx_t_1);
   28958           0 :   __Pyx_XDECREF(__pyx_t_2);
   28959           0 :   __Pyx_XDECREF(__pyx_t_3);
   28960           0 :   __Pyx_AddTraceback("scipy.interpolate._interpnd.CloughTocher2DInterpolator._evaluate_double", __pyx_clineno, __pyx_lineno, __pyx_filename);
   28961           0 :   __pyx_r = NULL;
   28962          52 :   __pyx_L0:;
   28963          52 :   __Pyx_XGIVEREF(__pyx_r);
   28964          52 :   __Pyx_RefNannyFinishContext();
   28965          52 :   return __pyx_r;
   28966             : }
   28967             : 
   28968             : /* "scipy/interpolate/_interpnd.pyx":958
   28969             :  *         return self._do_evaluate(xi, 1.0)
   28970             :  * 
   28971             :  *     def _evaluate_complex(self, xi):             # <<<<<<<<<<<<<<
   28972             :  *         return self._do_evaluate(xi, 1.0j)
   28973             :  * 
   28974             :  */
   28975             : 
   28976             : /* Python wrapper */
   28977             : static PyObject *__pyx_pw_5scipy_11interpolate_9_interpnd_26CloughTocher2DInterpolator_9_evaluate_complex(PyObject *__pyx_self, 
   28978             : #if CYTHON_METH_FASTCALL
   28979             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   28980             : #else
   28981             : PyObject *__pyx_args, PyObject *__pyx_kwds
   28982             : #endif
   28983             : ); /*proto*/
   28984             : static PyMethodDef __pyx_mdef_5scipy_11interpolate_9_interpnd_26CloughTocher2DInterpolator_9_evaluate_complex = {"_evaluate_complex", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5scipy_11interpolate_9_interpnd_26CloughTocher2DInterpolator_9_evaluate_complex, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
   28985           9 : static PyObject *__pyx_pw_5scipy_11interpolate_9_interpnd_26CloughTocher2DInterpolator_9_evaluate_complex(PyObject *__pyx_self, 
   28986             : #if CYTHON_METH_FASTCALL
   28987             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   28988             : #else
   28989             : PyObject *__pyx_args, PyObject *__pyx_kwds
   28990             : #endif
   28991             : ) {
   28992           9 :   PyObject *__pyx_v_self = 0;
   28993           9 :   PyObject *__pyx_v_xi = 0;
   28994             :   #if !CYTHON_METH_FASTCALL
   28995             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
   28996             :   #endif
   28997           9 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   28998           9 :   PyObject* values[2] = {0,0};
   28999           9 :   int __pyx_lineno = 0;
   29000           9 :   const char *__pyx_filename = NULL;
   29001           9 :   int __pyx_clineno = 0;
   29002           9 :   PyObject *__pyx_r = 0;
   29003             :   __Pyx_RefNannyDeclarations
   29004           9 :   __Pyx_RefNannySetupContext("_evaluate_complex (wrapper)", 0);
   29005             :   #if !CYTHON_METH_FASTCALL
   29006             :   #if CYTHON_ASSUME_SAFE_MACROS
   29007             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
   29008             :   #else
   29009             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
   29010             :   #endif
   29011             :   #endif
   29012           9 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
   29013             :   {
   29014           9 :     PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_xi,0};
   29015           9 :     if (__pyx_kwds) {
   29016           0 :       Py_ssize_t kw_args;
   29017           0 :       switch (__pyx_nargs) {
   29018           0 :         case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
   29019           0 :         CYTHON_FALLTHROUGH;
   29020           0 :         case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
   29021           0 :         CYTHON_FALLTHROUGH;
   29022           0 :         case  0: break;
   29023           0 :         default: goto __pyx_L5_argtuple_error;
   29024             :       }
   29025           0 :       kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
   29026           0 :       switch (__pyx_nargs) {
   29027             :         case  0:
   29028           0 :         if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
   29029           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
   29030           0 :           kw_args--;
   29031             :         }
   29032           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 958, __pyx_L3_error)
   29033           0 :         else goto __pyx_L5_argtuple_error;
   29034           0 :         CYTHON_FALLTHROUGH;
   29035             :         case  1:
   29036           0 :         if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_xi)) != 0)) {
   29037           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
   29038           0 :           kw_args--;
   29039             :         }
   29040           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 958, __pyx_L3_error)
   29041             :         else {
   29042           0 :           __Pyx_RaiseArgtupleInvalid("_evaluate_complex", 1, 2, 2, 1); __PYX_ERR(0, 958, __pyx_L3_error)
   29043             :         }
   29044             :       }
   29045           0 :       if (unlikely(kw_args > 0)) {
   29046           0 :         const Py_ssize_t kwd_pos_args = __pyx_nargs;
   29047           0 :         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_evaluate_complex") < 0)) __PYX_ERR(0, 958, __pyx_L3_error)
   29048             :       }
   29049           9 :     } else if (unlikely(__pyx_nargs != 2)) {
   29050           0 :       goto __pyx_L5_argtuple_error;
   29051             :     } else {
   29052           9 :       values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
   29053           9 :       values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
   29054             :     }
   29055           9 :     __pyx_v_self = values[0];
   29056           9 :     __pyx_v_xi = values[1];
   29057             :   }
   29058           9 :   goto __pyx_L6_skip;
   29059           0 :   __pyx_L5_argtuple_error:;
   29060           0 :   __Pyx_RaiseArgtupleInvalid("_evaluate_complex", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 958, __pyx_L3_error)
   29061           9 :   __pyx_L6_skip:;
   29062           9 :   goto __pyx_L4_argument_unpacking_done;
   29063           0 :   __pyx_L3_error:;
   29064             :   {
   29065           0 :     Py_ssize_t __pyx_temp;
   29066           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   29067             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
   29068             :     }
   29069             :   }
   29070           0 :   __Pyx_AddTraceback("scipy.interpolate._interpnd.CloughTocher2DInterpolator._evaluate_complex", __pyx_clineno, __pyx_lineno, __pyx_filename);
   29071           0 :   __Pyx_RefNannyFinishContext();
   29072           0 :   return NULL;
   29073           9 :   __pyx_L4_argument_unpacking_done:;
   29074           9 :   __pyx_r = __pyx_pf_5scipy_11interpolate_9_interpnd_26CloughTocher2DInterpolator_8_evaluate_complex(__pyx_self, __pyx_v_self, __pyx_v_xi);
   29075             : 
   29076             :   /* function exit code */
   29077             :   {
   29078           9 :     Py_ssize_t __pyx_temp;
   29079           9 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   29080             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
   29081             :     }
   29082             :   }
   29083             :   __Pyx_RefNannyFinishContext();
   29084             :   return __pyx_r;
   29085             : }
   29086             : 
   29087           9 : static PyObject *__pyx_pf_5scipy_11interpolate_9_interpnd_26CloughTocher2DInterpolator_8_evaluate_complex(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_xi) {
   29088           9 :   PyObject *__pyx_r = NULL;
   29089             :   __Pyx_RefNannyDeclarations
   29090           9 :   PyObject *__pyx_t_1 = NULL;
   29091           9 :   PyObject *__pyx_t_2 = NULL;
   29092           9 :   PyObject *__pyx_t_3 = NULL;
   29093           9 :   PyObject *__pyx_t_4 = NULL;
   29094           9 :   unsigned int __pyx_t_5;
   29095           9 :   int __pyx_lineno = 0;
   29096           9 :   const char *__pyx_filename = NULL;
   29097           9 :   int __pyx_clineno = 0;
   29098           9 :   __Pyx_RefNannySetupContext("_evaluate_complex", 1);
   29099             : 
   29100             :   /* "scipy/interpolate/_interpnd.pyx":959
   29101             :  * 
   29102             :  *     def _evaluate_complex(self, xi):
   29103             :  *         return self._do_evaluate(xi, 1.0j)             # <<<<<<<<<<<<<<
   29104             :  * 
   29105             :  *     @cython.boundscheck(False)
   29106             :  */
   29107           9 :   __Pyx_XDECREF(__pyx_r);
   29108           9 :   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_do_evaluate); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 959, __pyx_L1_error)
   29109           9 :   __Pyx_GOTREF(__pyx_t_2);
   29110           9 :   __pyx_t_3 = PyComplex_FromDoubles(0.0, 1.0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 959, __pyx_L1_error)
   29111           9 :   __Pyx_GOTREF(__pyx_t_3);
   29112           9 :   __pyx_t_4 = NULL;
   29113           9 :   __pyx_t_5 = 0;
   29114             :   #if CYTHON_UNPACK_METHODS
   29115           9 :   if (likely(PyMethod_Check(__pyx_t_2))) {
   29116           0 :     __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
   29117           0 :     if (likely(__pyx_t_4)) {
   29118           0 :       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
   29119           0 :       __Pyx_INCREF(__pyx_t_4);
   29120           0 :       __Pyx_INCREF(function);
   29121           0 :       __Pyx_DECREF_SET(__pyx_t_2, function);
   29122             :       __pyx_t_5 = 1;
   29123             :     }
   29124             :   }
   29125             :   #endif
   29126             :   {
   29127           9 :     PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_v_xi, __pyx_t_3};
   29128           9 :     __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
   29129           9 :     __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
   29130           9 :     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   29131           9 :     if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 959, __pyx_L1_error)
   29132           9 :     __Pyx_GOTREF(__pyx_t_1);
   29133           9 :     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   29134             :   }
   29135           9 :   __pyx_r = __pyx_t_1;
   29136           9 :   __pyx_t_1 = 0;
   29137           9 :   goto __pyx_L0;
   29138             : 
   29139             :   /* "scipy/interpolate/_interpnd.pyx":958
   29140             :  *         return self._do_evaluate(xi, 1.0)
   29141             :  * 
   29142             :  *     def _evaluate_complex(self, xi):             # <<<<<<<<<<<<<<
   29143             :  *         return self._do_evaluate(xi, 1.0j)
   29144             :  * 
   29145             :  */
   29146             : 
   29147             :   /* function exit code */
   29148           0 :   __pyx_L1_error:;
   29149           0 :   __Pyx_XDECREF(__pyx_t_1);
   29150           0 :   __Pyx_XDECREF(__pyx_t_2);
   29151           0 :   __Pyx_XDECREF(__pyx_t_3);
   29152           0 :   __Pyx_XDECREF(__pyx_t_4);
   29153           0 :   __Pyx_AddTraceback("scipy.interpolate._interpnd.CloughTocher2DInterpolator._evaluate_complex", __pyx_clineno, __pyx_lineno, __pyx_filename);
   29154           0 :   __pyx_r = NULL;
   29155           9 :   __pyx_L0:;
   29156           9 :   __Pyx_XGIVEREF(__pyx_r);
   29157           9 :   __Pyx_RefNannyFinishContext();
   29158           9 :   return __pyx_r;
   29159             : }
   29160             : 
   29161             : /* "scipy/interpolate/_interpnd.pyx":961
   29162             :  *         return self._do_evaluate(xi, 1.0j)
   29163             :  * 
   29164             :  *     @cython.boundscheck(False)             # <<<<<<<<<<<<<<
   29165             :  *     @cython.wraparound(False)
   29166             :  *     def _do_evaluate(self, const double[:,::1] xi, const double_or_complex dummy):
   29167             :  */
   29168             : 
   29169             : /* Python wrapper */
   29170             : static PyObject *__pyx_pw_5scipy_11interpolate_9_interpnd_26CloughTocher2DInterpolator_11_do_evaluate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
   29171             : static PyMethodDef __pyx_mdef_5scipy_11interpolate_9_interpnd_26CloughTocher2DInterpolator_11_do_evaluate = {"_do_evaluate", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5scipy_11interpolate_9_interpnd_26CloughTocher2DInterpolator_11_do_evaluate, METH_VARARGS|METH_KEYWORDS, 0};
   29172          61 : static PyObject *__pyx_pw_5scipy_11interpolate_9_interpnd_26CloughTocher2DInterpolator_11_do_evaluate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   29173          61 :   PyObject *__pyx_v_signatures = 0;
   29174          61 :   PyObject *__pyx_v_args = 0;
   29175          61 :   PyObject *__pyx_v_kwargs = 0;
   29176          61 :   CYTHON_UNUSED PyObject *__pyx_v_defaults = 0;
   29177          61 :   PyObject *__pyx_v__fused_sigindex = 0;
   29178          61 :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
   29179          61 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   29180          61 :   PyObject* values[5] = {0,0,0,0,0};
   29181          61 :   int __pyx_lineno = 0;
   29182          61 :   const char *__pyx_filename = NULL;
   29183          61 :   int __pyx_clineno = 0;
   29184          61 :   PyObject *__pyx_r = 0;
   29185             :   __Pyx_RefNannyDeclarations
   29186          61 :   __Pyx_RefNannySetupContext("__pyx_fused_cpdef (wrapper)", 0);
   29187             :   #if CYTHON_ASSUME_SAFE_MACROS
   29188          61 :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
   29189             :   #else
   29190             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
   29191             :   #endif
   29192          61 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
   29193             :   {
   29194          61 :     PyObject **__pyx_pyargnames[] = {&__pyx_n_s_signatures,&__pyx_n_s_args,&__pyx_n_s_kwargs,&__pyx_n_s_defaults,&__pyx_n_s_fused_sigindex,0};
   29195          61 :     __pyx_defaults6 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults6, __pyx_self);
   29196          61 :     values[4] = __Pyx_Arg_NewRef_VARARGS(__pyx_dynamic_args->__pyx_arg__fused_sigindex);
   29197          61 :     if (__pyx_kwds) {
   29198           0 :       Py_ssize_t kw_args;
   29199           0 :       switch (__pyx_nargs) {
   29200           0 :         case  5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
   29201           0 :         CYTHON_FALLTHROUGH;
   29202           0 :         case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
   29203           0 :         CYTHON_FALLTHROUGH;
   29204           0 :         case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
   29205           0 :         CYTHON_FALLTHROUGH;
   29206           0 :         case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
   29207           0 :         CYTHON_FALLTHROUGH;
   29208           0 :         case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
   29209           0 :         CYTHON_FALLTHROUGH;
   29210           0 :         case  0: break;
   29211           0 :         default: goto __pyx_L5_argtuple_error;
   29212             :       }
   29213           0 :       kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
   29214           0 :       switch (__pyx_nargs) {
   29215           0 :         case  0:
   29216           0 :         if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_signatures)) != 0)) {
   29217           0 :           (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
   29218           0 :           kw_args--;
   29219             :         }
   29220           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 961, __pyx_L3_error)
   29221           0 :         else goto __pyx_L5_argtuple_error;
   29222           0 :         CYTHON_FALLTHROUGH;
   29223             :         case  1:
   29224           0 :         if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_args)) != 0)) {
   29225           0 :           (void)__Pyx_Arg_NewRef_VARARGS(values[1]);
   29226           0 :           kw_args--;
   29227             :         }
   29228           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 961, __pyx_L3_error)
   29229             :         else {
   29230           0 :           __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 1); __PYX_ERR(0, 961, __pyx_L3_error)
   29231             :         }
   29232           0 :         CYTHON_FALLTHROUGH;
   29233             :         case  2:
   29234           0 :         if (likely((values[2] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_kwargs)) != 0)) {
   29235           0 :           (void)__Pyx_Arg_NewRef_VARARGS(values[2]);
   29236           0 :           kw_args--;
   29237             :         }
   29238           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 961, __pyx_L3_error)
   29239             :         else {
   29240           0 :           __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 2); __PYX_ERR(0, 961, __pyx_L3_error)
   29241             :         }
   29242           0 :         CYTHON_FALLTHROUGH;
   29243             :         case  3:
   29244           0 :         if (likely((values[3] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_defaults)) != 0)) {
   29245           0 :           (void)__Pyx_Arg_NewRef_VARARGS(values[3]);
   29246           0 :           kw_args--;
   29247             :         }
   29248           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 961, __pyx_L3_error)
   29249             :         else {
   29250           0 :           __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, 3); __PYX_ERR(0, 961, __pyx_L3_error)
   29251             :         }
   29252           0 :         CYTHON_FALLTHROUGH;
   29253             :         case  4:
   29254           0 :         if (kw_args > 0) {
   29255           0 :           PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fused_sigindex);
   29256           0 :           if (value) { values[4] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
   29257           0 :           else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 961, __pyx_L3_error)
   29258             :         }
   29259             :       }
   29260           0 :       if (unlikely(kw_args > 0)) {
   29261           0 :         const Py_ssize_t kwd_pos_args = __pyx_nargs;
   29262           0 :         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_fused_cpdef") < 0)) __PYX_ERR(0, 961, __pyx_L3_error)
   29263             :       }
   29264             :     } else {
   29265          61 :       switch (__pyx_nargs) {
   29266           0 :         case  5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
   29267          61 :         CYTHON_FALLTHROUGH;
   29268          61 :         case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
   29269          61 :         values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
   29270          61 :         values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
   29271          61 :         values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
   29272          61 :         break;
   29273           0 :         default: goto __pyx_L5_argtuple_error;
   29274             :       }
   29275             :     }
   29276          61 :     __pyx_v_signatures = values[0];
   29277          61 :     __pyx_v_args = values[1];
   29278          61 :     __pyx_v_kwargs = values[2];
   29279          61 :     __pyx_v_defaults = values[3];
   29280          61 :     __pyx_v__fused_sigindex = values[4];
   29281             :   }
   29282          61 :   goto __pyx_L6_skip;
   29283           0 :   __pyx_L5_argtuple_error:;
   29284           0 :   __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 961, __pyx_L3_error)
   29285          61 :   __pyx_L6_skip:;
   29286          61 :   goto __pyx_L4_argument_unpacking_done;
   29287           0 :   __pyx_L3_error:;
   29288             :   {
   29289           0 :     Py_ssize_t __pyx_temp;
   29290           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   29291             :       __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
   29292             :     }
   29293             :   }
   29294           0 :   __Pyx_AddTraceback("scipy.interpolate._interpnd.CloughTocher2DInterpolator.__pyx_fused_cpdef", __pyx_clineno, __pyx_lineno, __pyx_filename);
   29295           0 :   __Pyx_RefNannyFinishContext();
   29296           0 :   return NULL;
   29297          61 :   __pyx_L4_argument_unpacking_done:;
   29298          61 :   __pyx_r = __pyx_pf_5scipy_11interpolate_9_interpnd_26CloughTocher2DInterpolator_10_do_evaluate(__pyx_self, __pyx_v_signatures, __pyx_v_args, __pyx_v_kwargs, __pyx_v_defaults, __pyx_v__fused_sigindex);
   29299             : 
   29300             :   /* function exit code */
   29301             :   {
   29302          61 :     Py_ssize_t __pyx_temp;
   29303          61 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   29304             :       __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
   29305             :     }
   29306             :   }
   29307             :   __Pyx_RefNannyFinishContext();
   29308             :   return __pyx_r;
   29309             : }
   29310             : 
   29311          61 : static PyObject *__pyx_pf_5scipy_11interpolate_9_interpnd_26CloughTocher2DInterpolator_10_do_evaluate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_signatures, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs, CYTHON_UNUSED PyObject *__pyx_v_defaults, PyObject *__pyx_v__fused_sigindex) {
   29312          61 :   PyObject *__pyx_v_search_list = 0;
   29313          61 :   PyObject *__pyx_v_sigindex_node = 0;
   29314          61 :   PyObject *__pyx_v_dest_sig = NULL;
   29315          61 :   PyObject *__pyx_v_arg = NULL;
   29316          61 :   PyObject *__pyx_v_sig = NULL;
   29317          61 :   PyObject *__pyx_v_sig_series = NULL;
   29318          61 :   PyObject *__pyx_v_last_type = NULL;
   29319          61 :   PyObject *__pyx_v_sig_type = NULL;
   29320          61 :   PyObject *__pyx_v_sigindex_matches = NULL;
   29321          61 :   PyObject *__pyx_v_sigindex_candidates = NULL;
   29322          61 :   PyObject *__pyx_v_dst_type = NULL;
   29323          61 :   PyObject *__pyx_v_found_matches = NULL;
   29324          61 :   PyObject *__pyx_v_found_candidates = NULL;
   29325          61 :   PyObject *__pyx_v_sn = NULL;
   29326          61 :   PyObject *__pyx_v_type_match = NULL;
   29327          61 :   PyObject *__pyx_v_candidates = NULL;
   29328          61 :   PyObject *__pyx_r = NULL;
   29329             :   __Pyx_RefNannyDeclarations
   29330          61 :   PyObject *__pyx_t_1 = NULL;
   29331          61 :   int __pyx_t_2;
   29332          61 :   int __pyx_t_3;
   29333          61 :   int __pyx_t_4;
   29334          61 :   Py_ssize_t __pyx_t_5;
   29335          61 :   PyObject *__pyx_t_6 = NULL;
   29336          61 :   Py_ssize_t __pyx_t_7;
   29337          61 :   int __pyx_t_8;
   29338          61 :   int __pyx_t_9;
   29339          61 :   PyObject *__pyx_t_10 = NULL;
   29340          61 :   PyObject *__pyx_t_11 = NULL;
   29341          61 :   PyObject *__pyx_t_12 = NULL;
   29342          61 :   unsigned int __pyx_t_13;
   29343          61 :   Py_ssize_t __pyx_t_14;
   29344          61 :   int __pyx_t_15;
   29345          61 :   int __pyx_lineno = 0;
   29346          61 :   const char *__pyx_filename = NULL;
   29347          61 :   int __pyx_clineno = 0;
   29348          61 :   __Pyx_RefNannySetupContext("_do_evaluate", 0);
   29349          61 :   __Pyx_INCREF(__pyx_v_kwargs);
   29350          61 :   __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 961, __pyx_L1_error)
   29351          61 :   __Pyx_GOTREF(__pyx_t_1);
   29352          61 :   __Pyx_INCREF(Py_None);
   29353          61 :   __Pyx_GIVEREF(Py_None);
   29354          61 :   if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, Py_None)) __PYX_ERR(0, 961, __pyx_L1_error);
   29355          61 :   __pyx_v_dest_sig = ((PyObject*)__pyx_t_1);
   29356          61 :   __pyx_t_1 = 0;
   29357          61 :   __pyx_t_3 = (__pyx_v_kwargs != Py_None);
   29358          61 :   if (__pyx_t_3) {
   29359           0 :   } else {
   29360          61 :     __pyx_t_2 = __pyx_t_3;
   29361          61 :     goto __pyx_L4_bool_binop_done;
   29362             :   }
   29363           0 :   __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_kwargs); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 961, __pyx_L1_error)
   29364           0 :   __pyx_t_4 = (!__pyx_t_3);
   29365           0 :   __pyx_t_2 = __pyx_t_4;
   29366          61 :   __pyx_L4_bool_binop_done:;
   29367          61 :   if (__pyx_t_2) {
   29368           0 :     __Pyx_INCREF(Py_None);
   29369           0 :     __Pyx_DECREF_SET(__pyx_v_kwargs, Py_None);
   29370             :   }
   29371          61 :   if (unlikely(__pyx_v_args == Py_None)) {
   29372           0 :     PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
   29373           0 :     __PYX_ERR(0, 961, __pyx_L1_error)
   29374             :   }
   29375          61 :   __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 961, __pyx_L1_error)
   29376          61 :   __pyx_t_2 = (2 < __pyx_t_5);
   29377          61 :   if (__pyx_t_2) {
   29378          61 :     if (unlikely(__pyx_v_args == Py_None)) {
   29379             :       PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
   29380             :       __PYX_ERR(0, 961, __pyx_L1_error)
   29381             :     }
   29382          61 :     __pyx_t_1 = PyTuple_GET_ITEM(((PyObject*)__pyx_v_args), 2);
   29383          61 :     __Pyx_INCREF(__pyx_t_1);
   29384          61 :     __pyx_v_arg = __pyx_t_1;
   29385          61 :     __pyx_t_1 = 0;
   29386          61 :     goto __pyx_L6;
   29387             :   }
   29388           0 :   __pyx_t_4 = (__pyx_v_kwargs != Py_None);
   29389           0 :   if (__pyx_t_4) {
   29390           0 :   } else {
   29391           0 :     __pyx_t_2 = __pyx_t_4;
   29392           0 :     goto __pyx_L7_bool_binop_done;
   29393             :   }
   29394           0 :   if (unlikely(__pyx_v_kwargs == Py_None)) {
   29395             :     PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
   29396             :     __PYX_ERR(0, 961, __pyx_L1_error)
   29397             :   }
   29398           0 :   __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_dummy, ((PyObject*)__pyx_v_kwargs), Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 961, __pyx_L1_error)
   29399             :   __pyx_t_2 = __pyx_t_4;
   29400           0 :   __pyx_L7_bool_binop_done:;
   29401           0 :   if (likely(__pyx_t_2)) {
   29402           0 :     if (unlikely(__pyx_v_kwargs == Py_None)) {
   29403           0 :       PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
   29404           0 :       __PYX_ERR(0, 961, __pyx_L1_error)
   29405             :     }
   29406           0 :     __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_kwargs), __pyx_n_s_dummy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 961, __pyx_L1_error)
   29407           0 :     __Pyx_GOTREF(__pyx_t_1);
   29408           0 :     __pyx_v_arg = __pyx_t_1;
   29409           0 :     __pyx_t_1 = 0;
   29410           0 :     goto __pyx_L6;
   29411             :   }
   29412             :   /*else*/ {
   29413           0 :     if (unlikely(__pyx_v_args == Py_None)) {
   29414             :       PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
   29415             :       __PYX_ERR(0, 961, __pyx_L1_error)
   29416             :     }
   29417           0 :     __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 961, __pyx_L1_error)
   29418           0 :     __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 961, __pyx_L1_error)
   29419           0 :     __Pyx_GOTREF(__pyx_t_1);
   29420           0 :     __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 961, __pyx_L1_error)
   29421           0 :     __Pyx_GOTREF(__pyx_t_6);
   29422           0 :     __Pyx_INCREF(__pyx_int_3);
   29423           0 :     __Pyx_GIVEREF(__pyx_int_3);
   29424           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_int_3)) __PYX_ERR(0, 961, __pyx_L1_error);
   29425           0 :     __Pyx_INCREF(__pyx_n_s_s);
   29426           0 :     __Pyx_GIVEREF(__pyx_n_s_s);
   29427           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_s)) __PYX_ERR(0, 961, __pyx_L1_error);
   29428           0 :     __Pyx_GIVEREF(__pyx_t_1);
   29429           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_1)) __PYX_ERR(0, 961, __pyx_L1_error);
   29430           0 :     __pyx_t_1 = 0;
   29431           0 :     __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Expected_at_least_d_argument_s_g, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 961, __pyx_L1_error)
   29432           0 :     __Pyx_GOTREF(__pyx_t_1);
   29433           0 :     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
   29434           0 :     __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 961, __pyx_L1_error)
   29435           0 :     __Pyx_GOTREF(__pyx_t_6);
   29436           0 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   29437           0 :     __Pyx_Raise(__pyx_t_6, 0, 0, 0);
   29438           0 :     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
   29439           0 :     __PYX_ERR(0, 961, __pyx_L1_error)
   29440             :   }
   29441          61 :   __pyx_L6:;
   29442          61 :   while (1) {
   29443          61 :     __pyx_t_2 = PyFloat_Check(__pyx_v_arg); 
   29444          61 :     if (__pyx_t_2) {
   29445          52 :       if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_double, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 961, __pyx_L1_error)
   29446          52 :       goto __pyx_L10_break;
   29447             :     }
   29448           9 :     __pyx_t_2 = PyComplex_Check(__pyx_v_arg); 
   29449           9 :     if (__pyx_t_2) {
   29450           9 :       if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_kp_s_double_complex, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 961, __pyx_L1_error)
   29451           9 :       goto __pyx_L10_break;
   29452             :     }
   29453           0 :     if (unlikely((__Pyx_SetItemInt(__pyx_v_dest_sig, 0, Py_None, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0))) __PYX_ERR(0, 961, __pyx_L1_error)
   29454           0 :     goto __pyx_L10_break;
   29455             :   }
   29456          61 :   __pyx_L10_break:;
   29457          61 :   __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v__fused_sigindex); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 961, __pyx_L1_error)
   29458          61 :   __pyx_t_4 = (!__pyx_t_2);
   29459          61 :   if (__pyx_t_4) {
   29460           1 :     __pyx_t_5 = 0;
   29461           1 :     if (unlikely(__pyx_v_signatures == Py_None)) {
   29462           0 :       PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
   29463           0 :       __PYX_ERR(0, 961, __pyx_L1_error)
   29464             :     }
   29465           2 :     __pyx_t_1 = __Pyx_dict_iterator(((PyObject*)__pyx_v_signatures), 1, ((PyObject *)NULL), (&__pyx_t_7), (&__pyx_t_8)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 961, __pyx_L1_error)
   29466           1 :     __Pyx_GOTREF(__pyx_t_1);
   29467           1 :     __Pyx_XDECREF(__pyx_t_6);
   29468           1 :     __pyx_t_6 = __pyx_t_1;
   29469           1 :     __pyx_t_1 = 0;
   29470           3 :     while (1) {
   29471           3 :       __pyx_t_9 = __Pyx_dict_iter_next(__pyx_t_6, __pyx_t_7, &__pyx_t_5, &__pyx_t_1, NULL, NULL, __pyx_t_8);
   29472           3 :       if (unlikely(__pyx_t_9 == 0)) break;
   29473           2 :       if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 961, __pyx_L1_error)
   29474           2 :       __Pyx_GOTREF(__pyx_t_1);
   29475           2 :       __Pyx_XDECREF_SET(__pyx_v_sig, __pyx_t_1);
   29476           2 :       __pyx_t_1 = 0;
   29477           2 :       __pyx_t_1 = __pyx_v__fused_sigindex;
   29478           2 :       __Pyx_INCREF(__pyx_t_1);
   29479           2 :       __Pyx_XDECREF_SET(__pyx_v_sigindex_node, ((PyObject*)__pyx_t_1));
   29480           2 :       __pyx_t_1 = 0;
   29481           2 :       __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_sig, __pyx_n_s_strip); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 961, __pyx_L1_error)
   29482           2 :       __Pyx_GOTREF(__pyx_t_11);
   29483           2 :       __pyx_t_12 = NULL;
   29484           2 :       __pyx_t_13 = 0;
   29485             :       #if CYTHON_UNPACK_METHODS
   29486           2 :       if (likely(PyMethod_Check(__pyx_t_11))) {
   29487           0 :         __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_11);
   29488           0 :         if (likely(__pyx_t_12)) {
   29489           0 :           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
   29490           0 :           __Pyx_INCREF(__pyx_t_12);
   29491           0 :           __Pyx_INCREF(function);
   29492           0 :           __Pyx_DECREF_SET(__pyx_t_11, function);
   29493             :           __pyx_t_13 = 1;
   29494             :         }
   29495             :       }
   29496             :       #endif
   29497             :       {
   29498           2 :         PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_kp_s__19};
   29499           2 :         __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_13, 1+__pyx_t_13);
   29500           2 :         __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
   29501           2 :         if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 961, __pyx_L1_error)
   29502           2 :         __Pyx_GOTREF(__pyx_t_10);
   29503           2 :         __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
   29504             :       }
   29505           2 :       __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_split); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 961, __pyx_L1_error)
   29506           2 :       __Pyx_GOTREF(__pyx_t_11);
   29507           2 :       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
   29508           2 :       __pyx_t_10 = NULL;
   29509           2 :       __pyx_t_13 = 0;
   29510             :       #if CYTHON_UNPACK_METHODS
   29511           2 :       if (likely(PyMethod_Check(__pyx_t_11))) {
   29512           0 :         __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11);
   29513           0 :         if (likely(__pyx_t_10)) {
   29514           0 :           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
   29515           0 :           __Pyx_INCREF(__pyx_t_10);
   29516           0 :           __Pyx_INCREF(function);
   29517           0 :           __Pyx_DECREF_SET(__pyx_t_11, function);
   29518             :           __pyx_t_13 = 1;
   29519             :         }
   29520             :       }
   29521             :       #endif
   29522             :       {
   29523           2 :         PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_kp_s__20};
   29524           2 :         __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_13, 1+__pyx_t_13);
   29525           2 :         __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
   29526           2 :         if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 961, __pyx_L1_error)
   29527           2 :         __Pyx_GOTREF(__pyx_t_1);
   29528           2 :         __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
   29529             :       }
   29530           4 :       __pyx_t_11 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 961, __pyx_L1_error)
   29531           2 :       __Pyx_GOTREF(__pyx_t_11);
   29532           2 :       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   29533           2 :       __pyx_t_14 = PyList_GET_SIZE(__pyx_t_11);
   29534           2 :       if (unlikely(__pyx_t_14 < 1)) {
   29535           0 :         __Pyx_RaiseNeedMoreValuesError(0+__pyx_t_14); __PYX_ERR(0, 961, __pyx_L1_error)
   29536             :       }
   29537             :       #if CYTHON_COMPILING_IN_CPYTHON
   29538           2 :       __pyx_t_10 = PyList_GET_ITEM(__pyx_t_11, __pyx_t_14-1); 
   29539           2 :       ((PyVarObject*)__pyx_t_11)->ob_size--;
   29540             :       #else
   29541             :       __pyx_t_10 = PySequence_ITEM(__pyx_t_11, __pyx_t_14-1); 
   29542             :       #endif
   29543           2 :       __Pyx_GOTREF(__pyx_t_10);
   29544             :       #if !CYTHON_COMPILING_IN_CPYTHON
   29545             :       __pyx_t_12 = PySequence_GetSlice(__pyx_t_11, 0, __pyx_t_14-1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 961, __pyx_L1_error)
   29546             :       __Pyx_GOTREF(__pyx_t_12);
   29547             :       __Pyx_DECREF(__pyx_t_11);
   29548             :       __pyx_t_11 = __pyx_t_12; __pyx_t_12 = NULL;
   29549             :       #else
   29550           2 :       CYTHON_UNUSED_VAR(__pyx_t_12);
   29551             :       #endif
   29552           2 :       __Pyx_XDECREF_SET(__pyx_v_sig_series, ((PyObject*)__pyx_t_11));
   29553           2 :       __pyx_t_11 = 0;
   29554           2 :       __Pyx_XDECREF_SET(__pyx_v_last_type, __pyx_t_10);
   29555           2 :       __pyx_t_10 = 0;
   29556           2 :       __pyx_t_1 = __pyx_v_sig_series; __Pyx_INCREF(__pyx_t_1);
   29557             :       __pyx_t_14 = 0;
   29558           2 :       for (;;) {
   29559             :         {
   29560           2 :           Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
   29561             :           #if !CYTHON_ASSUME_SAFE_MACROS
   29562             :           if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 961, __pyx_L1_error)
   29563             :           #endif
   29564           2 :           if (__pyx_t_14 >= __pyx_temp) break;
   29565             :         }
   29566             :         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
   29567           0 :         __pyx_t_10 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_14); __Pyx_INCREF(__pyx_t_10); __pyx_t_14++; if (unlikely((0 < 0))) __PYX_ERR(0, 961, __pyx_L1_error)
   29568             :         #else
   29569             :         __pyx_t_10 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 961, __pyx_L1_error)
   29570             :         __Pyx_GOTREF(__pyx_t_10);
   29571             :         #endif
   29572           0 :         __Pyx_XDECREF_SET(__pyx_v_sig_type, __pyx_t_10);
   29573           0 :         __pyx_t_10 = 0;
   29574           0 :         if (unlikely(__pyx_v_sigindex_node == Py_None)) {
   29575           0 :           PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
   29576           0 :           __PYX_ERR(0, 961, __pyx_L1_error)
   29577             :         }
   29578           0 :         __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_v_sig_type, __pyx_v_sigindex_node, Py_NE)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 961, __pyx_L1_error)
   29579           0 :         if (__pyx_t_4) {
   29580           0 :           __pyx_t_10 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 961, __pyx_L1_error)
   29581           0 :           __Pyx_GOTREF(__pyx_t_10);
   29582           0 :           if (unlikely(__pyx_v_sigindex_node == Py_None)) {
   29583             :             PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
   29584             :             __PYX_ERR(0, 961, __pyx_L1_error)
   29585             :           }
   29586           0 :           if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_sig_type, __pyx_t_10) < 0))) __PYX_ERR(0, 961, __pyx_L1_error)
   29587           0 :           __Pyx_INCREF(__pyx_t_10);
   29588           0 :           __Pyx_DECREF_SET(__pyx_v_sigindex_node, __pyx_t_10);
   29589           0 :           __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
   29590           0 :           goto __pyx_L18;
   29591             :         }
   29592             :         /*else*/ {
   29593           0 :           if (unlikely(__pyx_v_sigindex_node == Py_None)) {
   29594             :             PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
   29595             :             __PYX_ERR(0, 961, __pyx_L1_error)
   29596             :           }
   29597           0 :           __pyx_t_10 = __Pyx_PyDict_GetItem(__pyx_v_sigindex_node, __pyx_v_sig_type); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 961, __pyx_L1_error)
   29598           0 :           __Pyx_GOTREF(__pyx_t_10);
   29599           0 :           __pyx_t_11 = __pyx_t_10;
   29600           0 :           __Pyx_INCREF(__pyx_t_11);
   29601           0 :           __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
   29602           2 :           __Pyx_DECREF_SET(__pyx_v_sigindex_node, ((PyObject*)__pyx_t_11));
   29603             :           __pyx_t_11 = 0;
   29604             :         }
   29605             :         __pyx_L18:;
   29606             :       }
   29607           2 :       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   29608           2 :       if (unlikely(__pyx_v_sigindex_node == Py_None)) {
   29609           0 :         PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
   29610           0 :         __PYX_ERR(0, 961, __pyx_L1_error)
   29611             :       }
   29612           2 :       if (unlikely((PyDict_SetItem(__pyx_v_sigindex_node, __pyx_v_last_type, __pyx_v_sig) < 0))) __PYX_ERR(0, 961, __pyx_L1_error)
   29613             :     }
   29614           1 :     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
   29615             :   }
   29616          61 :   __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 961, __pyx_L1_error)
   29617          61 :   __Pyx_GOTREF(__pyx_t_6);
   29618          61 :   __pyx_v_sigindex_matches = ((PyObject*)__pyx_t_6);
   29619          61 :   __pyx_t_6 = 0;
   29620          61 :   __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 961, __pyx_L1_error)
   29621          61 :   __Pyx_GOTREF(__pyx_t_6);
   29622          61 :   __Pyx_INCREF(__pyx_v__fused_sigindex);
   29623          61 :   __Pyx_GIVEREF(__pyx_v__fused_sigindex);
   29624          61 :   if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 0, __pyx_v__fused_sigindex)) __PYX_ERR(0, 961, __pyx_L1_error);
   29625          61 :   __pyx_v_sigindex_candidates = ((PyObject*)__pyx_t_6);
   29626          61 :   __pyx_t_6 = 0;
   29627          61 :   __pyx_t_6 = __pyx_v_dest_sig; __Pyx_INCREF(__pyx_t_6);
   29628             :   __pyx_t_7 = 0;
   29629         122 :   for (;;) {
   29630             :     {
   29631         122 :       Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_6);
   29632             :       #if !CYTHON_ASSUME_SAFE_MACROS
   29633             :       if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 961, __pyx_L1_error)
   29634             :       #endif
   29635         122 :       if (__pyx_t_7 >= __pyx_temp) break;
   29636             :     }
   29637             :     #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
   29638          61 :     __pyx_t_1 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 961, __pyx_L1_error)
   29639             :     #else
   29640             :     __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 961, __pyx_L1_error)
   29641             :     __Pyx_GOTREF(__pyx_t_1);
   29642             :     #endif
   29643          61 :     __Pyx_XDECREF_SET(__pyx_v_dst_type, __pyx_t_1);
   29644          61 :     __pyx_t_1 = 0;
   29645          61 :     __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 961, __pyx_L1_error)
   29646          61 :     __Pyx_GOTREF(__pyx_t_1);
   29647          61 :     __Pyx_XDECREF_SET(__pyx_v_found_matches, ((PyObject*)__pyx_t_1));
   29648          61 :     __pyx_t_1 = 0;
   29649          61 :     __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 961, __pyx_L1_error)
   29650          61 :     __Pyx_GOTREF(__pyx_t_1);
   29651          61 :     __Pyx_XDECREF_SET(__pyx_v_found_candidates, ((PyObject*)__pyx_t_1));
   29652          61 :     __pyx_t_1 = 0;
   29653          61 :     __pyx_t_4 = (__pyx_v_dst_type == Py_None);
   29654          61 :     if (__pyx_t_4) {
   29655           0 :       __pyx_t_1 = __pyx_v_sigindex_matches; __Pyx_INCREF(__pyx_t_1);
   29656           0 :       __pyx_t_5 = 0;
   29657           0 :       for (;;) {
   29658             :         {
   29659           0 :           Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
   29660             :           #if !CYTHON_ASSUME_SAFE_MACROS
   29661             :           if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 961, __pyx_L1_error)
   29662             :           #endif
   29663           0 :           if (__pyx_t_5 >= __pyx_temp) break;
   29664             :         }
   29665             :         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
   29666           0 :         __pyx_t_11 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_11); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 961, __pyx_L1_error)
   29667             :         #else
   29668             :         __pyx_t_11 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 961, __pyx_L1_error)
   29669             :         __Pyx_GOTREF(__pyx_t_11);
   29670             :         #endif
   29671           0 :         __Pyx_XDECREF_SET(__pyx_v_sn, __pyx_t_11);
   29672           0 :         __pyx_t_11 = 0;
   29673           0 :         if (unlikely(__pyx_v_sn == Py_None)) {
   29674           0 :           PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values");
   29675           0 :           __PYX_ERR(0, 961, __pyx_L1_error)
   29676             :         }
   29677           0 :         __pyx_t_11 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 961, __pyx_L1_error)
   29678           0 :         __Pyx_GOTREF(__pyx_t_11);
   29679           0 :         __pyx_t_15 = __Pyx_PyList_Extend(__pyx_v_found_matches, __pyx_t_11); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 961, __pyx_L1_error)
   29680           0 :         __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
   29681             :       }
   29682           0 :       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   29683           0 :       __pyx_t_1 = __pyx_v_sigindex_candidates; __Pyx_INCREF(__pyx_t_1);
   29684           0 :       __pyx_t_5 = 0;
   29685           0 :       for (;;) {
   29686             :         {
   29687           0 :           Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
   29688             :           #if !CYTHON_ASSUME_SAFE_MACROS
   29689             :           if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 961, __pyx_L1_error)
   29690             :           #endif
   29691           0 :           if (__pyx_t_5 >= __pyx_temp) break;
   29692             :         }
   29693             :         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
   29694           0 :         __pyx_t_11 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_11); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 961, __pyx_L1_error)
   29695             :         #else
   29696             :         __pyx_t_11 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 961, __pyx_L1_error)
   29697             :         __Pyx_GOTREF(__pyx_t_11);
   29698             :         #endif
   29699           0 :         __Pyx_XDECREF_SET(__pyx_v_sn, __pyx_t_11);
   29700           0 :         __pyx_t_11 = 0;
   29701           0 :         if (unlikely(__pyx_v_sn == Py_None)) {
   29702           0 :           PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values");
   29703           0 :           __PYX_ERR(0, 961, __pyx_L1_error)
   29704             :         }
   29705           0 :         __pyx_t_11 = __Pyx_PyDict_Values(((PyObject*)__pyx_v_sn)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 961, __pyx_L1_error)
   29706           0 :         __Pyx_GOTREF(__pyx_t_11);
   29707           0 :         __pyx_t_15 = __Pyx_PyList_Extend(__pyx_v_found_candidates, __pyx_t_11); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 961, __pyx_L1_error)
   29708           0 :         __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
   29709             :       }
   29710           0 :       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   29711           0 :       goto __pyx_L22;
   29712             :     }
   29713             :     /*else*/ {
   29714          61 :       __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 961, __pyx_L1_error)
   29715          61 :       __Pyx_GOTREF(__pyx_t_1);
   29716          61 :       __Pyx_INCREF(__pyx_v_sigindex_matches);
   29717          61 :       __Pyx_GIVEREF(__pyx_v_sigindex_matches);
   29718          61 :       if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_sigindex_matches)) __PYX_ERR(0, 961, __pyx_L1_error);
   29719          61 :       __Pyx_INCREF(__pyx_v_sigindex_candidates);
   29720          61 :       __Pyx_GIVEREF(__pyx_v_sigindex_candidates);
   29721          61 :       if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_sigindex_candidates)) __PYX_ERR(0, 961, __pyx_L1_error);
   29722          61 :       __pyx_t_11 = __pyx_t_1; __Pyx_INCREF(__pyx_t_11);
   29723          61 :       __pyx_t_5 = 0;
   29724         122 :       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   29725         305 :       for (;;) {
   29726         183 :         if (__pyx_t_5 >= 2) break;
   29727             :         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
   29728         122 :         __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_11, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 961, __pyx_L1_error)
   29729             :         #else
   29730             :         __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_11, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 961, __pyx_L1_error)
   29731             :         __Pyx_GOTREF(__pyx_t_1);
   29732             :         #endif
   29733         122 :         __Pyx_XDECREF_SET(__pyx_v_search_list, ((PyObject*)__pyx_t_1));
   29734         122 :         __pyx_t_1 = 0;
   29735         122 :         if (unlikely(__pyx_v_search_list == Py_None)) {
   29736           0 :           PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
   29737           0 :           __PYX_ERR(0, 961, __pyx_L1_error)
   29738             :         }
   29739         122 :         __pyx_t_1 = __pyx_v_search_list; __Pyx_INCREF(__pyx_t_1);
   29740             :         __pyx_t_14 = 0;
   29741         183 :         for (;;) {
   29742             :           {
   29743         183 :             Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
   29744             :             #if !CYTHON_ASSUME_SAFE_MACROS
   29745             :             if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 961, __pyx_L1_error)
   29746             :             #endif
   29747         183 :             if (__pyx_t_14 >= __pyx_temp) break;
   29748             :           }
   29749             :           #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
   29750          61 :           __pyx_t_10 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_14); __Pyx_INCREF(__pyx_t_10); __pyx_t_14++; if (unlikely((0 < 0))) __PYX_ERR(0, 961, __pyx_L1_error)
   29751             :           #else
   29752             :           __pyx_t_10 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 961, __pyx_L1_error)
   29753             :           __Pyx_GOTREF(__pyx_t_10);
   29754             :           #endif
   29755          61 :           __Pyx_XDECREF_SET(__pyx_v_sn, __pyx_t_10);
   29756          61 :           __pyx_t_10 = 0;
   29757          61 :           if (unlikely(__pyx_v_sn == Py_None)) {
   29758           0 :             PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
   29759           0 :             __PYX_ERR(0, 961, __pyx_L1_error)
   29760             :           }
   29761          61 :           __pyx_t_10 = __Pyx_PyDict_GetItemDefault(((PyObject*)__pyx_v_sn), __pyx_v_dst_type, Py_None); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 961, __pyx_L1_error)
   29762          61 :           __Pyx_GOTREF(__pyx_t_10);
   29763          61 :           __Pyx_XDECREF_SET(__pyx_v_type_match, __pyx_t_10);
   29764          61 :           __pyx_t_10 = 0;
   29765          61 :           __pyx_t_4 = (__pyx_v_type_match != Py_None);
   29766          61 :           if (__pyx_t_4) {
   29767          61 :             __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_found_matches, __pyx_v_type_match); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 961, __pyx_L1_error)
   29768             :           }
   29769             :         }
   29770         244 :         __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   29771             :       }
   29772          61 :       __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
   29773             :     }
   29774          61 :     __pyx_L22:;
   29775          61 :     __Pyx_INCREF(__pyx_v_found_matches);
   29776          61 :     __Pyx_DECREF_SET(__pyx_v_sigindex_matches, __pyx_v_found_matches);
   29777          61 :     __Pyx_INCREF(__pyx_v_found_candidates);
   29778          61 :     __Pyx_DECREF_SET(__pyx_v_sigindex_candidates, __pyx_v_found_candidates);
   29779          61 :     __pyx_t_2 = (PyList_GET_SIZE(__pyx_v_found_matches) != 0);
   29780          61 :     if (!__pyx_t_2) {
   29781           0 :     } else {
   29782          61 :       __pyx_t_4 = __pyx_t_2;
   29783          61 :       goto __pyx_L37_bool_binop_done;
   29784             :     }
   29785           0 :     __pyx_t_2 = (PyList_GET_SIZE(__pyx_v_found_candidates) != 0);
   29786           0 :     __pyx_t_4 = __pyx_t_2;
   29787          61 :     __pyx_L37_bool_binop_done:;
   29788          61 :     __pyx_t_2 = (!__pyx_t_4);
   29789          61 :     if (__pyx_t_2) {
   29790           0 :       goto __pyx_L21_break;
   29791             :     }
   29792             :   }
   29793          61 :   __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
   29794          61 :   goto __pyx_L39_for_end;
   29795           0 :   __pyx_L21_break:;
   29796           0 :   __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
   29797           0 :   goto __pyx_L39_for_end;
   29798          61 :   __pyx_L39_for_end:;
   29799          61 :   __Pyx_INCREF(__pyx_v_sigindex_matches);
   29800          61 :   __pyx_v_candidates = __pyx_v_sigindex_matches;
   29801          61 :   __pyx_t_2 = (PyList_GET_SIZE(__pyx_v_candidates) != 0);
   29802          61 :   __pyx_t_4 = (!__pyx_t_2);
   29803          61 :   if (unlikely(__pyx_t_4)) {
   29804           0 :     __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 961, __pyx_L1_error)
   29805           0 :     __Pyx_GOTREF(__pyx_t_6);
   29806           0 :     __Pyx_Raise(__pyx_t_6, 0, 0, 0);
   29807           0 :     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
   29808           0 :     __PYX_ERR(0, 961, __pyx_L1_error)
   29809             :   }
   29810          61 :   __pyx_t_7 = __Pyx_PyList_GET_SIZE(__pyx_v_candidates); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 961, __pyx_L1_error)
   29811          61 :   __pyx_t_4 = (__pyx_t_7 > 1);
   29812          61 :   if (unlikely(__pyx_t_4)) {
   29813           0 :     __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 961, __pyx_L1_error)
   29814           0 :     __Pyx_GOTREF(__pyx_t_6);
   29815           0 :     __Pyx_Raise(__pyx_t_6, 0, 0, 0);
   29816           0 :     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
   29817           0 :     __PYX_ERR(0, 961, __pyx_L1_error)
   29818             :   }
   29819             :   /*else*/ {
   29820          61 :     __Pyx_XDECREF(__pyx_r);
   29821          61 :     if (unlikely(__pyx_v_signatures == Py_None)) {
   29822           0 :       PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
   29823           0 :       __PYX_ERR(0, 961, __pyx_L1_error)
   29824             :     }
   29825          61 :     __pyx_t_6 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_signatures), PyList_GET_ITEM(__pyx_v_candidates, 0)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 961, __pyx_L1_error)
   29826          61 :     __Pyx_GOTREF(__pyx_t_6);
   29827          61 :     __pyx_r = __pyx_t_6;
   29828          61 :     __pyx_t_6 = 0;
   29829          61 :     goto __pyx_L0;
   29830             :   }
   29831             : 
   29832             :   /* function exit code */
   29833           0 :   __pyx_L1_error:;
   29834           0 :   __Pyx_XDECREF(__pyx_t_1);
   29835           0 :   __Pyx_XDECREF(__pyx_t_6);
   29836           0 :   __Pyx_XDECREF(__pyx_t_10);
   29837           0 :   __Pyx_XDECREF(__pyx_t_11);
   29838           0 :   __Pyx_XDECREF(__pyx_t_12);
   29839           0 :   __Pyx_AddTraceback("scipy.interpolate._interpnd.CloughTocher2DInterpolator.__pyx_fused_cpdef", __pyx_clineno, __pyx_lineno, __pyx_filename);
   29840           0 :   __pyx_r = NULL;
   29841          61 :   __pyx_L0:;
   29842          61 :   __Pyx_XDECREF(__pyx_v_search_list);
   29843          61 :   __Pyx_XDECREF(__pyx_v_sigindex_node);
   29844          61 :   __Pyx_XDECREF(__pyx_v_dest_sig);
   29845          61 :   __Pyx_XDECREF(__pyx_v_arg);
   29846          61 :   __Pyx_XDECREF(__pyx_v_sig);
   29847          61 :   __Pyx_XDECREF(__pyx_v_sig_series);
   29848          61 :   __Pyx_XDECREF(__pyx_v_last_type);
   29849          61 :   __Pyx_XDECREF(__pyx_v_sig_type);
   29850          61 :   __Pyx_XDECREF(__pyx_v_sigindex_matches);
   29851          61 :   __Pyx_XDECREF(__pyx_v_sigindex_candidates);
   29852          61 :   __Pyx_XDECREF(__pyx_v_dst_type);
   29853          61 :   __Pyx_XDECREF(__pyx_v_found_matches);
   29854          61 :   __Pyx_XDECREF(__pyx_v_found_candidates);
   29855          61 :   __Pyx_XDECREF(__pyx_v_sn);
   29856          61 :   __Pyx_XDECREF(__pyx_v_type_match);
   29857          61 :   __Pyx_XDECREF(__pyx_v_candidates);
   29858          61 :   __Pyx_XDECREF(__pyx_v_kwargs);
   29859          61 :   __Pyx_XGIVEREF(__pyx_r);
   29860          61 :   __Pyx_RefNannyFinishContext();
   29861          61 :   return __pyx_r;
   29862             : }
   29863             : 
   29864             : /* Python wrapper */
   29865             : static PyObject *__pyx_fuse_0__pyx_pw_5scipy_11interpolate_9_interpnd_26CloughTocher2DInterpolator_13_do_evaluate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
   29866             : static PyMethodDef __pyx_fuse_0__pyx_mdef_5scipy_11interpolate_9_interpnd_26CloughTocher2DInterpolator_13_do_evaluate = {"__pyx_fuse_0_do_evaluate", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_fuse_0__pyx_pw_5scipy_11interpolate_9_interpnd_26CloughTocher2DInterpolator_13_do_evaluate, METH_VARARGS|METH_KEYWORDS, 0};
   29867          52 : static PyObject *__pyx_fuse_0__pyx_pw_5scipy_11interpolate_9_interpnd_26CloughTocher2DInterpolator_13_do_evaluate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   29868          52 :   PyObject *__pyx_v_self = 0;
   29869          52 :   __Pyx_memviewslice __pyx_v_xi = { 0, 0, { 0 }, { 0 }, { 0 } };
   29870          52 :   CYTHON_UNUSED double __pyx_v_dummy;
   29871          52 :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
   29872          52 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   29873          52 :   PyObject* values[3] = {0,0,0};
   29874          52 :   int __pyx_lineno = 0;
   29875          52 :   const char *__pyx_filename = NULL;
   29876          52 :   int __pyx_clineno = 0;
   29877          52 :   PyObject *__pyx_r = 0;
   29878             :   __Pyx_RefNannyDeclarations
   29879          52 :   __Pyx_RefNannySetupContext("_do_evaluate (wrapper)", 0);
   29880             :   #if CYTHON_ASSUME_SAFE_MACROS
   29881          52 :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
   29882             :   #else
   29883             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
   29884             :   #endif
   29885          52 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
   29886             :   {
   29887          52 :     PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_xi,&__pyx_n_s_dummy,0};
   29888          52 :     if (__pyx_kwds) {
   29889           0 :       Py_ssize_t kw_args;
   29890           0 :       switch (__pyx_nargs) {
   29891           0 :         case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
   29892           0 :         CYTHON_FALLTHROUGH;
   29893           0 :         case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
   29894           0 :         CYTHON_FALLTHROUGH;
   29895           0 :         case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
   29896           0 :         CYTHON_FALLTHROUGH;
   29897           0 :         case  0: break;
   29898           0 :         default: goto __pyx_L5_argtuple_error;
   29899             :       }
   29900           0 :       kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
   29901           0 :       switch (__pyx_nargs) {
   29902           0 :         case  0:
   29903           0 :         if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
   29904           0 :           (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
   29905           0 :           kw_args--;
   29906             :         }
   29907           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 961, __pyx_L3_error)
   29908           0 :         else goto __pyx_L5_argtuple_error;
   29909           0 :         CYTHON_FALLTHROUGH;
   29910             :         case  1:
   29911           0 :         if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_xi)) != 0)) {
   29912           0 :           (void)__Pyx_Arg_NewRef_VARARGS(values[1]);
   29913           0 :           kw_args--;
   29914             :         }
   29915           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 961, __pyx_L3_error)
   29916             :         else {
   29917           0 :           __Pyx_RaiseArgtupleInvalid("_do_evaluate", 1, 3, 3, 1); __PYX_ERR(0, 961, __pyx_L3_error)
   29918             :         }
   29919           0 :         CYTHON_FALLTHROUGH;
   29920             :         case  2:
   29921           0 :         if (likely((values[2] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_dummy)) != 0)) {
   29922           0 :           (void)__Pyx_Arg_NewRef_VARARGS(values[2]);
   29923           0 :           kw_args--;
   29924             :         }
   29925           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 961, __pyx_L3_error)
   29926             :         else {
   29927           0 :           __Pyx_RaiseArgtupleInvalid("_do_evaluate", 1, 3, 3, 2); __PYX_ERR(0, 961, __pyx_L3_error)
   29928             :         }
   29929             :       }
   29930           0 :       if (unlikely(kw_args > 0)) {
   29931           0 :         const Py_ssize_t kwd_pos_args = __pyx_nargs;
   29932           0 :         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_do_evaluate") < 0)) __PYX_ERR(0, 961, __pyx_L3_error)
   29933             :       }
   29934          52 :     } else if (unlikely(__pyx_nargs != 3)) {
   29935           0 :       goto __pyx_L5_argtuple_error;
   29936             :     } else {
   29937          52 :       values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
   29938          52 :       values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
   29939          52 :       values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
   29940             :     }
   29941          52 :     __pyx_v_self = values[0];
   29942          52 :     __pyx_v_xi = __Pyx_PyObject_to_MemoryviewSlice_d_dc_double__const__(values[1], 0); if (unlikely(!__pyx_v_xi.memview)) __PYX_ERR(0, 963, __pyx_L3_error)
   29943          52 :     __pyx_v_dummy = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_dummy == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 963, __pyx_L3_error)
   29944             :   }
   29945          52 :   goto __pyx_L6_skip;
   29946           0 :   __pyx_L5_argtuple_error:;
   29947           0 :   __Pyx_RaiseArgtupleInvalid("_do_evaluate", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 961, __pyx_L3_error)
   29948          52 :   __pyx_L6_skip:;
   29949          52 :   goto __pyx_L4_argument_unpacking_done;
   29950           0 :   __pyx_L3_error:;
   29951             :   {
   29952           0 :     Py_ssize_t __pyx_temp;
   29953           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   29954             :       __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
   29955             :     }
   29956             :   }
   29957           0 :   __PYX_XCLEAR_MEMVIEW(&__pyx_v_xi, 1);
   29958           0 :   __Pyx_AddTraceback("scipy.interpolate._interpnd.CloughTocher2DInterpolator._do_evaluate", __pyx_clineno, __pyx_lineno, __pyx_filename);
   29959           0 :   __Pyx_RefNannyFinishContext();
   29960           0 :   return NULL;
   29961          52 :   __pyx_L4_argument_unpacking_done:;
   29962          52 :   __pyx_r = __pyx_pf_5scipy_11interpolate_9_interpnd_26CloughTocher2DInterpolator_12_do_evaluate(__pyx_self, __pyx_v_self, __pyx_v_xi, __pyx_v_dummy);
   29963             : 
   29964             :   /* function exit code */
   29965          52 :   __PYX_XCLEAR_MEMVIEW(&__pyx_v_xi, 1);
   29966             :   {
   29967          52 :     Py_ssize_t __pyx_temp;
   29968          52 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   29969             :       __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
   29970             :     }
   29971             :   }
   29972             :   __Pyx_RefNannyFinishContext();
   29973             :   return __pyx_r;
   29974             : }
   29975             : 
   29976          52 : static PyObject *__pyx_pf_5scipy_11interpolate_9_interpnd_26CloughTocher2DInterpolator_12_do_evaluate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, __Pyx_memviewslice __pyx_v_xi, CYTHON_UNUSED double __pyx_v_dummy) {
   29977          52 :   __Pyx_memviewslice __pyx_v_values = { 0, 0, { 0 }, { 0 }, { 0 } };
   29978          52 :   __Pyx_memviewslice __pyx_v_grad = { 0, 0, { 0 }, { 0 }, { 0 } };
   29979          52 :   __Pyx_memviewslice __pyx_v_out = { 0, 0, { 0 }, { 0 }, { 0 } };
   29980          52 :   __Pyx_memviewslice __pyx_v_simplices = { 0, 0, { 0 }, { 0 }, { 0 } };
   29981          52 :   double __pyx_v_c[NPY_MAXDIMS];
   29982          52 :   double __pyx_v_f[(NPY_MAXDIMS + 1)];
   29983          52 :   double __pyx_v_df[((2 * NPY_MAXDIMS) + 2)];
   29984          52 :   double __pyx_v_w;
   29985          52 :   double __pyx_v_fill_value;
   29986          52 :   int __pyx_v_i;
   29987          52 :   int __pyx_v_j;
   29988          52 :   int __pyx_v_k;
   29989          52 :   int __pyx_v_ndim;
   29990          52 :   int __pyx_v_isimplex;
   29991          52 :   int __pyx_v_start;
   29992          52 :   int __pyx_v_nvalues;
   29993          52 :   __pyx_t_5scipy_7spatial_6_qhull_DelaunayInfo_t __pyx_v_info;
   29994          52 :   double __pyx_v_eps;
   29995          52 :   double __pyx_v_eps_broad;
   29996          52 :   PyObject *__pyx_r = NULL;
   29997             :   __Pyx_RefNannyDeclarations
   29998          52 :   PyObject *__pyx_t_1 = NULL;
   29999          52 :   __Pyx_memviewslice __pyx_t_2 = { 0, 0, { 0 }, { 0 }, { 0 } };
   30000          52 :   __Pyx_memviewslice __pyx_t_3 = { 0, 0, { 0 }, { 0 }, { 0 } };
   30001          52 :   PyObject *__pyx_t_4 = NULL;
   30002          52 :   __Pyx_memviewslice __pyx_t_5 = { 0, 0, { 0 }, { 0 }, { 0 } };
   30003          52 :   double __pyx_t_6;
   30004          52 :   int __pyx_t_7;
   30005          52 :   PyObject *__pyx_t_8 = NULL;
   30006          52 :   PyObject *__pyx_t_9 = NULL;
   30007          52 :   PyObject *__pyx_t_10 = NULL;
   30008          52 :   __Pyx_memviewslice __pyx_t_11 = { 0, 0, { 0 }, { 0 }, { 0 } };
   30009          52 :   Py_ssize_t __pyx_t_12;
   30010          52 :   Py_ssize_t __pyx_t_13;
   30011          52 :   Py_ssize_t __pyx_t_14;
   30012          52 :   Py_ssize_t __pyx_t_15;
   30013          52 :   int __pyx_t_16;
   30014          52 :   int __pyx_t_17;
   30015          52 :   int __pyx_t_18;
   30016          52 :   int __pyx_t_19;
   30017          52 :   long __pyx_t_20;
   30018          52 :   long __pyx_t_21;
   30019          52 :   int __pyx_t_22;
   30020          52 :   Py_ssize_t __pyx_t_23;
   30021          52 :   Py_ssize_t __pyx_t_24;
   30022          52 :   Py_ssize_t __pyx_t_25;
   30023          52 :   int __pyx_lineno = 0;
   30024          52 :   const char *__pyx_filename = NULL;
   30025          52 :   int __pyx_clineno = 0;
   30026          52 :   __Pyx_RefNannySetupContext("__pyx_fuse_0_do_evaluate", 1);
   30027             : 
   30028             :   /* "scipy/interpolate/_interpnd.pyx":964
   30029             :  *     @cython.wraparound(False)
   30030             :  *     def _do_evaluate(self, const double[:,::1] xi, const double_or_complex dummy):
   30031             :  *         cdef const double_or_complex[:,::1] values = self.values             # <<<<<<<<<<<<<<
   30032             :  *         cdef const double_or_complex[:,:,:] grad = self.grad
   30033             :  *         cdef double_or_complex[:,::1] out
   30034             :  */
   30035          52 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 964, __pyx_L1_error)
   30036          52 :   __Pyx_GOTREF(__pyx_t_1);
   30037          52 :   __pyx_t_2 = __Pyx_PyObject_to_MemoryviewSlice_d_dc_double__const__(__pyx_t_1, 0); if (unlikely(!__pyx_t_2.memview)) __PYX_ERR(0, 964, __pyx_L1_error)
   30038          52 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   30039          52 :   __pyx_v_values = __pyx_t_2;
   30040          52 :   __pyx_t_2.memview = NULL;
   30041          52 :   __pyx_t_2.data = NULL;
   30042             : 
   30043             :   /* "scipy/interpolate/_interpnd.pyx":965
   30044             :  *     def _do_evaluate(self, const double[:,::1] xi, const double_or_complex dummy):
   30045             :  *         cdef const double_or_complex[:,::1] values = self.values
   30046             :  *         cdef const double_or_complex[:,:,:] grad = self.grad             # <<<<<<<<<<<<<<
   30047             :  *         cdef double_or_complex[:,::1] out
   30048             :  *         cdef const int[:,::1] simplices = self.tri.simplices
   30049             :  */
   30050          52 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_grad); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 965, __pyx_L1_error)
   30051          52 :   __Pyx_GOTREF(__pyx_t_1);
   30052          52 :   __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_dsdsds_double__const__(__pyx_t_1, 0); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 965, __pyx_L1_error)
   30053          52 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   30054          52 :   __pyx_v_grad = __pyx_t_3;
   30055          52 :   __pyx_t_3.memview = NULL;
   30056          52 :   __pyx_t_3.data = NULL;
   30057             : 
   30058             :   /* "scipy/interpolate/_interpnd.pyx":967
   30059             :  *         cdef const double_or_complex[:,:,:] grad = self.grad
   30060             :  *         cdef double_or_complex[:,::1] out
   30061             :  *         cdef const int[:,::1] simplices = self.tri.simplices             # <<<<<<<<<<<<<<
   30062             :  *         cdef double c[NPY_MAXDIMS]
   30063             :  *         cdef double_or_complex f[NPY_MAXDIMS+1]
   30064             :  */
   30065          52 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tri); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 967, __pyx_L1_error)
   30066          52 :   __Pyx_GOTREF(__pyx_t_1);
   30067          52 :   __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_simplices); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 967, __pyx_L1_error)
   30068          52 :   __Pyx_GOTREF(__pyx_t_4);
   30069          52 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   30070          52 :   __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_d_dc_int__const__(__pyx_t_4, 0); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 967, __pyx_L1_error)
   30071          52 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   30072          52 :   __pyx_v_simplices = __pyx_t_5;
   30073          52 :   __pyx_t_5.memview = NULL;
   30074          52 :   __pyx_t_5.data = NULL;
   30075             : 
   30076             :   /* "scipy/interpolate/_interpnd.pyx":977
   30077             :  *         cdef double eps, eps_broad
   30078             :  * 
   30079             :  *         ndim = xi.shape[1]             # <<<<<<<<<<<<<<
   30080             :  *         fill_value = self.fill_value
   30081             :  * 
   30082             :  */
   30083          52 :   __pyx_v_ndim = (__pyx_v_xi.shape[1]);
   30084             : 
   30085             :   /* "scipy/interpolate/_interpnd.pyx":978
   30086             :  * 
   30087             :  *         ndim = xi.shape[1]
   30088             :  *         fill_value = self.fill_value             # <<<<<<<<<<<<<<
   30089             :  * 
   30090             :  *         qhull._get_delaunay_info(&info, self.tri, 1, 1, 0)
   30091             :  */
   30092          52 :   __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fill_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 978, __pyx_L1_error)
   30093          52 :   __Pyx_GOTREF(__pyx_t_4);
   30094          52 :   __pyx_t_6 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_6 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 978, __pyx_L1_error)
   30095          52 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   30096          52 :   __pyx_v_fill_value = __pyx_t_6;
   30097             : 
   30098             :   /* "scipy/interpolate/_interpnd.pyx":980
   30099             :  *         fill_value = self.fill_value
   30100             :  * 
   30101             :  *         qhull._get_delaunay_info(&info, self.tri, 1, 1, 0)             # <<<<<<<<<<<<<<
   30102             :  * 
   30103             :  *         out = np.zeros((xi.shape[0], self.values.shape[1]),
   30104             :  */
   30105          52 :   __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tri); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 980, __pyx_L1_error)
   30106          52 :   __Pyx_GOTREF(__pyx_t_4);
   30107          52 :   __pyx_t_7 = __pyx_f_5scipy_7spatial_6_qhull__get_delaunay_info((&__pyx_v_info), __pyx_t_4, 1, 1, 0); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 980, __pyx_L1_error)
   30108          52 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   30109             : 
   30110             :   /* "scipy/interpolate/_interpnd.pyx":982
   30111             :  *         qhull._get_delaunay_info(&info, self.tri, 1, 1, 0)
   30112             :  * 
   30113             :  *         out = np.zeros((xi.shape[0], self.values.shape[1]),             # <<<<<<<<<<<<<<
   30114             :  *                        dtype=self.values.dtype)
   30115             :  *         nvalues = out.shape[1]
   30116             :  */
   30117          52 :   __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 982, __pyx_L1_error)
   30118          52 :   __Pyx_GOTREF(__pyx_t_4);
   30119          52 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 982, __pyx_L1_error)
   30120          52 :   __Pyx_GOTREF(__pyx_t_1);
   30121          52 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   30122          52 :   __pyx_t_4 = PyInt_FromSsize_t((__pyx_v_xi.shape[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 982, __pyx_L1_error)
   30123          52 :   __Pyx_GOTREF(__pyx_t_4);
   30124          52 :   __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_values); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 982, __pyx_L1_error)
   30125          52 :   __Pyx_GOTREF(__pyx_t_8);
   30126          52 :   __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_shape); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 982, __pyx_L1_error)
   30127          52 :   __Pyx_GOTREF(__pyx_t_9);
   30128          52 :   __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   30129          52 :   __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_9, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 982, __pyx_L1_error)
   30130          52 :   __Pyx_GOTREF(__pyx_t_8);
   30131          52 :   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
   30132          52 :   __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 982, __pyx_L1_error)
   30133          52 :   __Pyx_GOTREF(__pyx_t_9);
   30134          52 :   __Pyx_GIVEREF(__pyx_t_4);
   30135          52 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_4)) __PYX_ERR(0, 982, __pyx_L1_error);
   30136          52 :   __Pyx_GIVEREF(__pyx_t_8);
   30137          52 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_8)) __PYX_ERR(0, 982, __pyx_L1_error);
   30138          52 :   __pyx_t_4 = 0;
   30139          52 :   __pyx_t_8 = 0;
   30140          52 :   __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 982, __pyx_L1_error)
   30141          52 :   __Pyx_GOTREF(__pyx_t_8);
   30142          52 :   __Pyx_GIVEREF(__pyx_t_9);
   30143          52 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9)) __PYX_ERR(0, 982, __pyx_L1_error);
   30144          52 :   __pyx_t_9 = 0;
   30145             : 
   30146             :   /* "scipy/interpolate/_interpnd.pyx":983
   30147             :  * 
   30148             :  *         out = np.zeros((xi.shape[0], self.values.shape[1]),
   30149             :  *                        dtype=self.values.dtype)             # <<<<<<<<<<<<<<
   30150             :  *         nvalues = out.shape[1]
   30151             :  * 
   30152             :  */
   30153          52 :   __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 983, __pyx_L1_error)
   30154          52 :   __Pyx_GOTREF(__pyx_t_9);
   30155          52 :   __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_values); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 983, __pyx_L1_error)
   30156          52 :   __Pyx_GOTREF(__pyx_t_4);
   30157          52 :   __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_dtype); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 983, __pyx_L1_error)
   30158          52 :   __Pyx_GOTREF(__pyx_t_10);
   30159          52 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   30160          52 :   if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_dtype, __pyx_t_10) < 0) __PYX_ERR(0, 983, __pyx_L1_error)
   30161          52 :   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
   30162             : 
   30163             :   /* "scipy/interpolate/_interpnd.pyx":982
   30164             :  *         qhull._get_delaunay_info(&info, self.tri, 1, 1, 0)
   30165             :  * 
   30166             :  *         out = np.zeros((xi.shape[0], self.values.shape[1]),             # <<<<<<<<<<<<<<
   30167             :  *                        dtype=self.values.dtype)
   30168             :  *         nvalues = out.shape[1]
   30169             :  */
   30170          52 :   __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 982, __pyx_L1_error)
   30171          52 :   __Pyx_GOTREF(__pyx_t_10);
   30172          52 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   30173          52 :   __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   30174          52 :   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
   30175          52 :   __pyx_t_11 = __Pyx_PyObject_to_MemoryviewSlice_d_dc_double(__pyx_t_10, PyBUF_WRITABLE); if (unlikely(!__pyx_t_11.memview)) __PYX_ERR(0, 982, __pyx_L1_error)
   30176          52 :   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
   30177          52 :   __pyx_v_out = __pyx_t_11;
   30178          52 :   __pyx_t_11.memview = NULL;
   30179          52 :   __pyx_t_11.data = NULL;
   30180             : 
   30181             :   /* "scipy/interpolate/_interpnd.pyx":984
   30182             :  *         out = np.zeros((xi.shape[0], self.values.shape[1]),
   30183             :  *                        dtype=self.values.dtype)
   30184             :  *         nvalues = out.shape[1]             # <<<<<<<<<<<<<<
   30185             :  * 
   30186             :  *         start = 0
   30187             :  */
   30188          52 :   __pyx_v_nvalues = (__pyx_v_out.shape[1]);
   30189             : 
   30190             :   /* "scipy/interpolate/_interpnd.pyx":986
   30191             :  *         nvalues = out.shape[1]
   30192             :  * 
   30193             :  *         start = 0             # <<<<<<<<<<<<<<
   30194             :  *         eps = 100 * DBL_EPSILON
   30195             :  *         eps_broad = sqrt(eps)
   30196             :  */
   30197          52 :   __pyx_v_start = 0;
   30198             : 
   30199             :   /* "scipy/interpolate/_interpnd.pyx":987
   30200             :  * 
   30201             :  *         start = 0
   30202             :  *         eps = 100 * DBL_EPSILON             # <<<<<<<<<<<<<<
   30203             :  *         eps_broad = sqrt(eps)
   30204             :  * 
   30205             :  */
   30206          52 :   __pyx_v_eps = (100.0 * DBL_EPSILON);
   30207             : 
   30208             :   /* "scipy/interpolate/_interpnd.pyx":988
   30209             :  *         start = 0
   30210             :  *         eps = 100 * DBL_EPSILON
   30211             :  *         eps_broad = sqrt(eps)             # <<<<<<<<<<<<<<
   30212             :  * 
   30213             :  *         with nogil:
   30214             :  */
   30215          52 :   __pyx_v_eps_broad = sqrt(__pyx_v_eps);
   30216             : 
   30217             :   /* "scipy/interpolate/_interpnd.pyx":990
   30218             :  *         eps_broad = sqrt(eps)
   30219             :  * 
   30220             :  *         with nogil:             # <<<<<<<<<<<<<<
   30221             :  *             for i in range(xi.shape[0]):
   30222             :  *                 # 1) Find the simplex
   30223             :  */
   30224             :   {
   30225             :       #ifdef WITH_THREAD
   30226          52 :       PyThreadState *_save;
   30227          52 :       _save = NULL;
   30228          52 :       Py_UNBLOCK_THREADS
   30229          52 :       __Pyx_FastGIL_Remember();
   30230             :       #endif
   30231             :       /*try:*/ {
   30232             : 
   30233             :         /* "scipy/interpolate/_interpnd.pyx":991
   30234             :  * 
   30235             :  *         with nogil:
   30236             :  *             for i in range(xi.shape[0]):             # <<<<<<<<<<<<<<
   30237             :  *                 # 1) Find the simplex
   30238             :  * 
   30239             :  */
   30240          52 :         __pyx_t_12 = (__pyx_v_xi.shape[0]);
   30241          52 :         __pyx_t_13 = __pyx_t_12;
   30242       14800 :         for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_13; __pyx_t_7+=1) {
   30243       14696 :           __pyx_v_i = __pyx_t_7;
   30244             : 
   30245             :           /* "scipy/interpolate/_interpnd.pyx":995
   30246             :  * 
   30247             :  *                 isimplex = qhull._find_simplex(&info, c,
   30248             :  *                                                &xi[i,0],             # <<<<<<<<<<<<<<
   30249             :  *                                                &start, eps, eps_broad)
   30250             :  * 
   30251             :  */
   30252       14696 :           __pyx_t_14 = __pyx_v_i;
   30253       14696 :           __pyx_t_15 = 0;
   30254             : 
   30255             :           /* "scipy/interpolate/_interpnd.pyx":994
   30256             :  *                 # 1) Find the simplex
   30257             :  * 
   30258             :  *                 isimplex = qhull._find_simplex(&info, c,             # <<<<<<<<<<<<<<
   30259             :  *                                                &xi[i,0],
   30260             :  *                                                &start, eps, eps_broad)
   30261             :  */
   30262       14696 :           __pyx_v_isimplex = __pyx_f_5scipy_7spatial_6_qhull__find_simplex((&__pyx_v_info), __pyx_v_c, (&(*((double const  *) ( /* dim=1 */ ((char *) (((double const  *) ( /* dim=0 */ (__pyx_v_xi.data + __pyx_t_14 * __pyx_v_xi.strides[0]) )) + __pyx_t_15)) )))), (&__pyx_v_start), __pyx_v_eps, __pyx_v_eps_broad);
   30263             : 
   30264             :           /* "scipy/interpolate/_interpnd.pyx":1000
   30265             :  *                 # 2) Clough-Tocher interpolation
   30266             :  * 
   30267             :  *                 if isimplex == -1:             # <<<<<<<<<<<<<<
   30268             :  *                     # outside triangulation
   30269             :  *                     for k in range(nvalues):
   30270             :  */
   30271       14696 :           __pyx_t_16 = (__pyx_v_isimplex == -1L);
   30272       14696 :           if (__pyx_t_16) {
   30273             : 
   30274             :             /* "scipy/interpolate/_interpnd.pyx":1002
   30275             :  *                 if isimplex == -1:
   30276             :  *                     # outside triangulation
   30277             :  *                     for k in range(nvalues):             # <<<<<<<<<<<<<<
   30278             :  *                         out[i,k] = fill_value
   30279             :  *                     continue
   30280             :  */
   30281             :             __pyx_t_17 = __pyx_v_nvalues;
   30282             :             __pyx_t_18 = __pyx_t_17;
   30283       15756 :             for (__pyx_t_19 = 0; __pyx_t_19 < __pyx_t_18; __pyx_t_19+=1) {
   30284        7878 :               __pyx_v_k = __pyx_t_19;
   30285             : 
   30286             :               /* "scipy/interpolate/_interpnd.pyx":1003
   30287             :  *                     # outside triangulation
   30288             :  *                     for k in range(nvalues):
   30289             :  *                         out[i,k] = fill_value             # <<<<<<<<<<<<<<
   30290             :  *                     continue
   30291             :  * 
   30292             :  */
   30293        7878 :               __pyx_t_15 = __pyx_v_i;
   30294        7878 :               __pyx_t_14 = __pyx_v_k;
   30295        7878 :               *((double *) ( /* dim=1 */ ((char *) (((double *) ( /* dim=0 */ (__pyx_v_out.data + __pyx_t_15 * __pyx_v_out.strides[0]) )) + __pyx_t_14)) )) = __pyx_v_fill_value;
   30296             :             }
   30297             : 
   30298             :             /* "scipy/interpolate/_interpnd.pyx":1004
   30299             :  *                     for k in range(nvalues):
   30300             :  *                         out[i,k] = fill_value
   30301             :  *                     continue             # <<<<<<<<<<<<<<
   30302             :  * 
   30303             :  *                 for k in range(nvalues):
   30304             :  */
   30305        7878 :             goto __pyx_L6_continue;
   30306             : 
   30307             :             /* "scipy/interpolate/_interpnd.pyx":1000
   30308             :  *                 # 2) Clough-Tocher interpolation
   30309             :  * 
   30310             :  *                 if isimplex == -1:             # <<<<<<<<<<<<<<
   30311             :  *                     # outside triangulation
   30312             :  *                     for k in range(nvalues):
   30313             :  */
   30314             :           }
   30315             : 
   30316             :           /* "scipy/interpolate/_interpnd.pyx":1006
   30317             :  *                     continue
   30318             :  * 
   30319             :  *                 for k in range(nvalues):             # <<<<<<<<<<<<<<
   30320             :  *                     for j in range(ndim+1):
   30321             :  *                         f[j] = values[simplices[isimplex,j],k]
   30322             :  */
   30323             :           __pyx_t_17 = __pyx_v_nvalues;
   30324             :           __pyx_t_18 = __pyx_t_17;
   30325       13656 :           for (__pyx_t_19 = 0; __pyx_t_19 < __pyx_t_18; __pyx_t_19+=1) {
   30326        6838 :             __pyx_v_k = __pyx_t_19;
   30327             : 
   30328             :             /* "scipy/interpolate/_interpnd.pyx":1007
   30329             :  * 
   30330             :  *                 for k in range(nvalues):
   30331             :  *                     for j in range(ndim+1):             # <<<<<<<<<<<<<<
   30332             :  *                         f[j] = values[simplices[isimplex,j],k]
   30333             :  *                         df[2*j] = grad[simplices[isimplex,j],k,0]
   30334             :  */
   30335        6838 :             __pyx_t_20 = (__pyx_v_ndim + 1);
   30336        6838 :             __pyx_t_21 = __pyx_t_20;
   30337       27352 :             for (__pyx_t_22 = 0; __pyx_t_22 < __pyx_t_21; __pyx_t_22+=1) {
   30338       20514 :               __pyx_v_j = __pyx_t_22;
   30339             : 
   30340             :               /* "scipy/interpolate/_interpnd.pyx":1008
   30341             :  *                 for k in range(nvalues):
   30342             :  *                     for j in range(ndim+1):
   30343             :  *                         f[j] = values[simplices[isimplex,j],k]             # <<<<<<<<<<<<<<
   30344             :  *                         df[2*j] = grad[simplices[isimplex,j],k,0]
   30345             :  *                         df[2*j+1] = grad[simplices[isimplex,j],k,1]
   30346             :  */
   30347       20514 :               __pyx_t_14 = __pyx_v_isimplex;
   30348       20514 :               __pyx_t_15 = __pyx_v_j;
   30349       20514 :               __pyx_t_23 = (*((int const  *) ( /* dim=1 */ ((char *) (((int const  *) ( /* dim=0 */ (__pyx_v_simplices.data + __pyx_t_14 * __pyx_v_simplices.strides[0]) )) + __pyx_t_15)) )));
   30350       20514 :               __pyx_t_24 = __pyx_v_k;
   30351       20514 :               (__pyx_v_f[__pyx_v_j]) = (*((double const  *) ( /* dim=1 */ ((char *) (((double const  *) ( /* dim=0 */ (__pyx_v_values.data + __pyx_t_23 * __pyx_v_values.strides[0]) )) + __pyx_t_24)) )));
   30352             : 
   30353             :               /* "scipy/interpolate/_interpnd.pyx":1009
   30354             :  *                     for j in range(ndim+1):
   30355             :  *                         f[j] = values[simplices[isimplex,j],k]
   30356             :  *                         df[2*j] = grad[simplices[isimplex,j],k,0]             # <<<<<<<<<<<<<<
   30357             :  *                         df[2*j+1] = grad[simplices[isimplex,j],k,1]
   30358             :  * 
   30359             :  */
   30360       20514 :               __pyx_t_15 = __pyx_v_isimplex;
   30361       20514 :               __pyx_t_14 = __pyx_v_j;
   30362       20514 :               __pyx_t_24 = (*((int const  *) ( /* dim=1 */ ((char *) (((int const  *) ( /* dim=0 */ (__pyx_v_simplices.data + __pyx_t_15 * __pyx_v_simplices.strides[0]) )) + __pyx_t_14)) )));
   30363       20514 :               __pyx_t_23 = __pyx_v_k;
   30364       20514 :               __pyx_t_25 = 0;
   30365       20514 :               (__pyx_v_df[(2 * __pyx_v_j)]) = (*((double const  *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_grad.data + __pyx_t_24 * __pyx_v_grad.strides[0]) ) + __pyx_t_23 * __pyx_v_grad.strides[1]) ) + __pyx_t_25 * __pyx_v_grad.strides[2]) )));
   30366             : 
   30367             :               /* "scipy/interpolate/_interpnd.pyx":1010
   30368             :  *                         f[j] = values[simplices[isimplex,j],k]
   30369             :  *                         df[2*j] = grad[simplices[isimplex,j],k,0]
   30370             :  *                         df[2*j+1] = grad[simplices[isimplex,j],k,1]             # <<<<<<<<<<<<<<
   30371             :  * 
   30372             :  *                     w = _clough_tocher_2d_single(&info, isimplex, c, f, df)
   30373             :  */
   30374       20514 :               __pyx_t_14 = __pyx_v_isimplex;
   30375       20514 :               __pyx_t_15 = __pyx_v_j;
   30376       20514 :               __pyx_t_25 = (*((int const  *) ( /* dim=1 */ ((char *) (((int const  *) ( /* dim=0 */ (__pyx_v_simplices.data + __pyx_t_14 * __pyx_v_simplices.strides[0]) )) + __pyx_t_15)) )));
   30377       20514 :               __pyx_t_23 = __pyx_v_k;
   30378       20514 :               __pyx_t_24 = 1;
   30379       20514 :               (__pyx_v_df[((2 * __pyx_v_j) + 1)]) = (*((double const  *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_grad.data + __pyx_t_25 * __pyx_v_grad.strides[0]) ) + __pyx_t_23 * __pyx_v_grad.strides[1]) ) + __pyx_t_24 * __pyx_v_grad.strides[2]) )));
   30380             :             }
   30381             : 
   30382             :             /* "scipy/interpolate/_interpnd.pyx":1012
   30383             :  *                         df[2*j+1] = grad[simplices[isimplex,j],k,1]
   30384             :  * 
   30385             :  *                     w = _clough_tocher_2d_single(&info, isimplex, c, f, df)             # <<<<<<<<<<<<<<
   30386             :  *                     out[i,k] = w
   30387             :  * 
   30388             :  */
   30389        6838 :             __pyx_v_w = __pyx_fuse_0__pyx_f_5scipy_11interpolate_9_interpnd__clough_tocher_2d_single((&__pyx_v_info), __pyx_v_isimplex, __pyx_v_c, __pyx_v_f, __pyx_v_df);
   30390             : 
   30391             :             /* "scipy/interpolate/_interpnd.pyx":1013
   30392             :  * 
   30393             :  *                     w = _clough_tocher_2d_single(&info, isimplex, c, f, df)
   30394             :  *                     out[i,k] = w             # <<<<<<<<<<<<<<
   30395             :  * 
   30396             :  *         return out
   30397             :  */
   30398        6838 :             __pyx_t_15 = __pyx_v_i;
   30399        6838 :             __pyx_t_14 = __pyx_v_k;
   30400        6838 :             *((double *) ( /* dim=1 */ ((char *) (((double *) ( /* dim=0 */ (__pyx_v_out.data + __pyx_t_15 * __pyx_v_out.strides[0]) )) + __pyx_t_14)) )) = __pyx_v_w;
   30401             :           }
   30402       14696 :           __pyx_L6_continue:;
   30403             :         }
   30404             :       }
   30405             : 
   30406             :       /* "scipy/interpolate/_interpnd.pyx":990
   30407             :  *         eps_broad = sqrt(eps)
   30408             :  * 
   30409             :  *         with nogil:             # <<<<<<<<<<<<<<
   30410             :  *             for i in range(xi.shape[0]):
   30411             :  *                 # 1) Find the simplex
   30412             :  */
   30413             :       /*finally:*/ {
   30414             :         /*normal exit:*/{
   30415             :           #ifdef WITH_THREAD
   30416          52 :           __Pyx_FastGIL_Forget();
   30417          52 :           Py_BLOCK_THREADS
   30418             :           #endif
   30419          52 :           goto __pyx_L5;
   30420             :         }
   30421          52 :         __pyx_L5:;
   30422             :       }
   30423             :   }
   30424             : 
   30425             :   /* "scipy/interpolate/_interpnd.pyx":1015
   30426             :  *                     out[i,k] = w
   30427             :  * 
   30428             :  *         return out             # <<<<<<<<<<<<<<
   30429             :  */
   30430          52 :   __Pyx_XDECREF(__pyx_r);
   30431          52 :   __pyx_t_10 = __pyx_memoryview_fromslice(__pyx_v_out, 2, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1015, __pyx_L1_error)
   30432          52 :   __Pyx_GOTREF(__pyx_t_10);
   30433          52 :   __pyx_r = __pyx_t_10;
   30434          52 :   __pyx_t_10 = 0;
   30435          52 :   goto __pyx_L0;
   30436             : 
   30437             :   /* "scipy/interpolate/_interpnd.pyx":961
   30438             :  *         return self._do_evaluate(xi, 1.0j)
   30439             :  * 
   30440             :  *     @cython.boundscheck(False)             # <<<<<<<<<<<<<<
   30441             :  *     @cython.wraparound(False)
   30442             :  *     def _do_evaluate(self, const double[:,::1] xi, const double_or_complex dummy):
   30443             :  */
   30444             : 
   30445             :   /* function exit code */
   30446           0 :   __pyx_L1_error:;
   30447           0 :   __Pyx_XDECREF(__pyx_t_1);
   30448           0 :   __PYX_XCLEAR_MEMVIEW(&__pyx_t_2, 1);
   30449           0 :   __PYX_XCLEAR_MEMVIEW(&__pyx_t_3, 1);
   30450           0 :   __Pyx_XDECREF(__pyx_t_4);
   30451           0 :   __PYX_XCLEAR_MEMVIEW(&__pyx_t_5, 1);
   30452           0 :   __Pyx_XDECREF(__pyx_t_8);
   30453           0 :   __Pyx_XDECREF(__pyx_t_9);
   30454           0 :   __Pyx_XDECREF(__pyx_t_10);
   30455           0 :   __PYX_XCLEAR_MEMVIEW(&__pyx_t_11, 1);
   30456           0 :   __Pyx_AddTraceback("scipy.interpolate._interpnd.CloughTocher2DInterpolator._do_evaluate", __pyx_clineno, __pyx_lineno, __pyx_filename);
   30457           0 :   __pyx_r = NULL;
   30458          52 :   __pyx_L0:;
   30459          52 :   __PYX_XCLEAR_MEMVIEW(&__pyx_v_values, 1);
   30460          52 :   __PYX_XCLEAR_MEMVIEW(&__pyx_v_grad, 1);
   30461          52 :   __PYX_XCLEAR_MEMVIEW(&__pyx_v_out, 1);
   30462          52 :   __PYX_XCLEAR_MEMVIEW(&__pyx_v_simplices, 1);
   30463          52 :   __Pyx_XGIVEREF(__pyx_r);
   30464          52 :   __Pyx_RefNannyFinishContext();
   30465          52 :   return __pyx_r;
   30466             : }
   30467             : 
   30468             : /* Python wrapper */
   30469             : static PyObject *__pyx_fuse_1__pyx_pw_5scipy_11interpolate_9_interpnd_26CloughTocher2DInterpolator_15_do_evaluate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
   30470             : static PyMethodDef __pyx_fuse_1__pyx_mdef_5scipy_11interpolate_9_interpnd_26CloughTocher2DInterpolator_15_do_evaluate = {"__pyx_fuse_1_do_evaluate", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_fuse_1__pyx_pw_5scipy_11interpolate_9_interpnd_26CloughTocher2DInterpolator_15_do_evaluate, METH_VARARGS|METH_KEYWORDS, 0};
   30471           9 : static PyObject *__pyx_fuse_1__pyx_pw_5scipy_11interpolate_9_interpnd_26CloughTocher2DInterpolator_15_do_evaluate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   30472           9 :   PyObject *__pyx_v_self = 0;
   30473           9 :   __Pyx_memviewslice __pyx_v_xi = { 0, 0, { 0 }, { 0 }, { 0 } };
   30474           9 :   CYTHON_UNUSED __pyx_t_double_complex __pyx_v_dummy;
   30475           9 :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
   30476           9 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   30477           9 :   PyObject* values[3] = {0,0,0};
   30478           9 :   int __pyx_lineno = 0;
   30479           9 :   const char *__pyx_filename = NULL;
   30480           9 :   int __pyx_clineno = 0;
   30481           9 :   PyObject *__pyx_r = 0;
   30482             :   __Pyx_RefNannyDeclarations
   30483           9 :   __Pyx_RefNannySetupContext("_do_evaluate (wrapper)", 0);
   30484             :   #if CYTHON_ASSUME_SAFE_MACROS
   30485           9 :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
   30486             :   #else
   30487             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
   30488             :   #endif
   30489           9 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
   30490             :   {
   30491           9 :     PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_xi,&__pyx_n_s_dummy,0};
   30492           9 :     if (__pyx_kwds) {
   30493           0 :       Py_ssize_t kw_args;
   30494           0 :       switch (__pyx_nargs) {
   30495           0 :         case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
   30496           0 :         CYTHON_FALLTHROUGH;
   30497           0 :         case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
   30498           0 :         CYTHON_FALLTHROUGH;
   30499           0 :         case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
   30500           0 :         CYTHON_FALLTHROUGH;
   30501           0 :         case  0: break;
   30502           0 :         default: goto __pyx_L5_argtuple_error;
   30503             :       }
   30504           0 :       kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
   30505           0 :       switch (__pyx_nargs) {
   30506           0 :         case  0:
   30507           0 :         if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
   30508           0 :           (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
   30509           0 :           kw_args--;
   30510             :         }
   30511           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 961, __pyx_L3_error)
   30512           0 :         else goto __pyx_L5_argtuple_error;
   30513           0 :         CYTHON_FALLTHROUGH;
   30514             :         case  1:
   30515           0 :         if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_xi)) != 0)) {
   30516           0 :           (void)__Pyx_Arg_NewRef_VARARGS(values[1]);
   30517           0 :           kw_args--;
   30518             :         }
   30519           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 961, __pyx_L3_error)
   30520             :         else {
   30521           0 :           __Pyx_RaiseArgtupleInvalid("_do_evaluate", 1, 3, 3, 1); __PYX_ERR(0, 961, __pyx_L3_error)
   30522             :         }
   30523           0 :         CYTHON_FALLTHROUGH;
   30524             :         case  2:
   30525           0 :         if (likely((values[2] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_dummy)) != 0)) {
   30526           0 :           (void)__Pyx_Arg_NewRef_VARARGS(values[2]);
   30527           0 :           kw_args--;
   30528             :         }
   30529           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 961, __pyx_L3_error)
   30530             :         else {
   30531           0 :           __Pyx_RaiseArgtupleInvalid("_do_evaluate", 1, 3, 3, 2); __PYX_ERR(0, 961, __pyx_L3_error)
   30532             :         }
   30533             :       }
   30534           0 :       if (unlikely(kw_args > 0)) {
   30535           0 :         const Py_ssize_t kwd_pos_args = __pyx_nargs;
   30536           0 :         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_do_evaluate") < 0)) __PYX_ERR(0, 961, __pyx_L3_error)
   30537             :       }
   30538           9 :     } else if (unlikely(__pyx_nargs != 3)) {
   30539           0 :       goto __pyx_L5_argtuple_error;
   30540             :     } else {
   30541           9 :       values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
   30542           9 :       values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
   30543           9 :       values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
   30544             :     }
   30545           9 :     __pyx_v_self = values[0];
   30546           9 :     __pyx_v_xi = __Pyx_PyObject_to_MemoryviewSlice_d_dc_double__const__(values[1], 0); if (unlikely(!__pyx_v_xi.memview)) __PYX_ERR(0, 963, __pyx_L3_error)
   30547           9 :     __pyx_v_dummy = __Pyx_PyComplex_As___pyx_t_double_complex(values[2]); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 963, __pyx_L3_error)
   30548             :   }
   30549           9 :   goto __pyx_L6_skip;
   30550           0 :   __pyx_L5_argtuple_error:;
   30551           0 :   __Pyx_RaiseArgtupleInvalid("_do_evaluate", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 961, __pyx_L3_error)
   30552           9 :   __pyx_L6_skip:;
   30553           9 :   goto __pyx_L4_argument_unpacking_done;
   30554           0 :   __pyx_L3_error:;
   30555             :   {
   30556           0 :     Py_ssize_t __pyx_temp;
   30557           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   30558             :       __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
   30559             :     }
   30560             :   }
   30561           0 :   __PYX_XCLEAR_MEMVIEW(&__pyx_v_xi, 1);
   30562           0 :   __Pyx_AddTraceback("scipy.interpolate._interpnd.CloughTocher2DInterpolator._do_evaluate", __pyx_clineno, __pyx_lineno, __pyx_filename);
   30563           0 :   __Pyx_RefNannyFinishContext();
   30564           0 :   return NULL;
   30565           9 :   __pyx_L4_argument_unpacking_done:;
   30566           9 :   __pyx_r = __pyx_pf_5scipy_11interpolate_9_interpnd_26CloughTocher2DInterpolator_14_do_evaluate(__pyx_self, __pyx_v_self, __pyx_v_xi, __pyx_v_dummy);
   30567             : 
   30568             :   /* function exit code */
   30569           9 :   __PYX_XCLEAR_MEMVIEW(&__pyx_v_xi, 1);
   30570             :   {
   30571           9 :     Py_ssize_t __pyx_temp;
   30572           9 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   30573             :       __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
   30574             :     }
   30575             :   }
   30576             :   __Pyx_RefNannyFinishContext();
   30577             :   return __pyx_r;
   30578             : }
   30579             : 
   30580           9 : static PyObject *__pyx_pf_5scipy_11interpolate_9_interpnd_26CloughTocher2DInterpolator_14_do_evaluate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, __Pyx_memviewslice __pyx_v_xi, CYTHON_UNUSED __pyx_t_double_complex __pyx_v_dummy) {
   30581           9 :   __Pyx_memviewslice __pyx_v_values = { 0, 0, { 0 }, { 0 }, { 0 } };
   30582           9 :   __Pyx_memviewslice __pyx_v_grad = { 0, 0, { 0 }, { 0 }, { 0 } };
   30583           9 :   __Pyx_memviewslice __pyx_v_out = { 0, 0, { 0 }, { 0 }, { 0 } };
   30584           9 :   __Pyx_memviewslice __pyx_v_simplices = { 0, 0, { 0 }, { 0 }, { 0 } };
   30585           9 :   double __pyx_v_c[NPY_MAXDIMS];
   30586           9 :   __pyx_t_double_complex __pyx_v_f[(NPY_MAXDIMS + 1)];
   30587           9 :   __pyx_t_double_complex __pyx_v_df[((2 * NPY_MAXDIMS) + 2)];
   30588           9 :   __pyx_t_double_complex __pyx_v_w;
   30589           9 :   __pyx_t_double_complex __pyx_v_fill_value;
   30590           9 :   int __pyx_v_i;
   30591           9 :   int __pyx_v_j;
   30592           9 :   int __pyx_v_k;
   30593           9 :   int __pyx_v_ndim;
   30594           9 :   int __pyx_v_isimplex;
   30595           9 :   int __pyx_v_start;
   30596           9 :   int __pyx_v_nvalues;
   30597           9 :   __pyx_t_5scipy_7spatial_6_qhull_DelaunayInfo_t __pyx_v_info;
   30598           9 :   double __pyx_v_eps;
   30599           9 :   double __pyx_v_eps_broad;
   30600           9 :   PyObject *__pyx_r = NULL;
   30601             :   __Pyx_RefNannyDeclarations
   30602           9 :   PyObject *__pyx_t_1 = NULL;
   30603           9 :   __Pyx_memviewslice __pyx_t_2 = { 0, 0, { 0 }, { 0 }, { 0 } };
   30604           9 :   __Pyx_memviewslice __pyx_t_3 = { 0, 0, { 0 }, { 0 }, { 0 } };
   30605           9 :   PyObject *__pyx_t_4 = NULL;
   30606           9 :   __Pyx_memviewslice __pyx_t_5 = { 0, 0, { 0 }, { 0 }, { 0 } };
   30607           9 :   __pyx_t_double_complex __pyx_t_6;
   30608           9 :   int __pyx_t_7;
   30609           9 :   PyObject *__pyx_t_8 = NULL;
   30610           9 :   PyObject *__pyx_t_9 = NULL;
   30611           9 :   PyObject *__pyx_t_10 = NULL;
   30612           9 :   __Pyx_memviewslice __pyx_t_11 = { 0, 0, { 0 }, { 0 }, { 0 } };
   30613           9 :   Py_ssize_t __pyx_t_12;
   30614           9 :   Py_ssize_t __pyx_t_13;
   30615           9 :   Py_ssize_t __pyx_t_14;
   30616           9 :   Py_ssize_t __pyx_t_15;
   30617           9 :   int __pyx_t_16;
   30618           9 :   int __pyx_t_17;
   30619           9 :   int __pyx_t_18;
   30620           9 :   int __pyx_t_19;
   30621           9 :   long __pyx_t_20;
   30622           9 :   long __pyx_t_21;
   30623           9 :   int __pyx_t_22;
   30624           9 :   Py_ssize_t __pyx_t_23;
   30625           9 :   Py_ssize_t __pyx_t_24;
   30626           9 :   Py_ssize_t __pyx_t_25;
   30627           9 :   int __pyx_lineno = 0;
   30628           9 :   const char *__pyx_filename = NULL;
   30629           9 :   int __pyx_clineno = 0;
   30630           9 :   __Pyx_RefNannySetupContext("__pyx_fuse_1_do_evaluate", 1);
   30631             : 
   30632             :   /* "scipy/interpolate/_interpnd.pyx":964
   30633             :  *     @cython.wraparound(False)
   30634             :  *     def _do_evaluate(self, const double[:,::1] xi, const double_or_complex dummy):
   30635             :  *         cdef const double_or_complex[:,::1] values = self.values             # <<<<<<<<<<<<<<
   30636             :  *         cdef const double_or_complex[:,:,:] grad = self.grad
   30637             :  *         cdef double_or_complex[:,::1] out
   30638             :  */
   30639           9 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 964, __pyx_L1_error)
   30640           9 :   __Pyx_GOTREF(__pyx_t_1);
   30641           9 :   __pyx_t_2 = __Pyx_PyObject_to_MemoryviewSlice_d_dc___pyx_t_double_complex__const__(__pyx_t_1, 0); if (unlikely(!__pyx_t_2.memview)) __PYX_ERR(0, 964, __pyx_L1_error)
   30642           9 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   30643           9 :   __pyx_v_values = __pyx_t_2;
   30644           9 :   __pyx_t_2.memview = NULL;
   30645           9 :   __pyx_t_2.data = NULL;
   30646             : 
   30647             :   /* "scipy/interpolate/_interpnd.pyx":965
   30648             :  *     def _do_evaluate(self, const double[:,::1] xi, const double_or_complex dummy):
   30649             :  *         cdef const double_or_complex[:,::1] values = self.values
   30650             :  *         cdef const double_or_complex[:,:,:] grad = self.grad             # <<<<<<<<<<<<<<
   30651             :  *         cdef double_or_complex[:,::1] out
   30652             :  *         cdef const int[:,::1] simplices = self.tri.simplices
   30653             :  */
   30654           9 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_grad); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 965, __pyx_L1_error)
   30655           9 :   __Pyx_GOTREF(__pyx_t_1);
   30656           9 :   __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_dsdsds___pyx_t_double_complex__const__(__pyx_t_1, 0); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 965, __pyx_L1_error)
   30657           9 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   30658           9 :   __pyx_v_grad = __pyx_t_3;
   30659           9 :   __pyx_t_3.memview = NULL;
   30660           9 :   __pyx_t_3.data = NULL;
   30661             : 
   30662             :   /* "scipy/interpolate/_interpnd.pyx":967
   30663             :  *         cdef const double_or_complex[:,:,:] grad = self.grad
   30664             :  *         cdef double_or_complex[:,::1] out
   30665             :  *         cdef const int[:,::1] simplices = self.tri.simplices             # <<<<<<<<<<<<<<
   30666             :  *         cdef double c[NPY_MAXDIMS]
   30667             :  *         cdef double_or_complex f[NPY_MAXDIMS+1]
   30668             :  */
   30669           9 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tri); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 967, __pyx_L1_error)
   30670           9 :   __Pyx_GOTREF(__pyx_t_1);
   30671           9 :   __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_simplices); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 967, __pyx_L1_error)
   30672           9 :   __Pyx_GOTREF(__pyx_t_4);
   30673           9 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   30674           9 :   __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_d_dc_int__const__(__pyx_t_4, 0); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 967, __pyx_L1_error)
   30675           9 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   30676           9 :   __pyx_v_simplices = __pyx_t_5;
   30677           9 :   __pyx_t_5.memview = NULL;
   30678           9 :   __pyx_t_5.data = NULL;
   30679             : 
   30680             :   /* "scipy/interpolate/_interpnd.pyx":977
   30681             :  *         cdef double eps, eps_broad
   30682             :  * 
   30683             :  *         ndim = xi.shape[1]             # <<<<<<<<<<<<<<
   30684             :  *         fill_value = self.fill_value
   30685             :  * 
   30686             :  */
   30687           9 :   __pyx_v_ndim = (__pyx_v_xi.shape[1]);
   30688             : 
   30689             :   /* "scipy/interpolate/_interpnd.pyx":978
   30690             :  * 
   30691             :  *         ndim = xi.shape[1]
   30692             :  *         fill_value = self.fill_value             # <<<<<<<<<<<<<<
   30693             :  * 
   30694             :  *         qhull._get_delaunay_info(&info, self.tri, 1, 1, 0)
   30695             :  */
   30696           9 :   __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fill_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 978, __pyx_L1_error)
   30697           9 :   __Pyx_GOTREF(__pyx_t_4);
   30698           9 :   __pyx_t_6 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 978, __pyx_L1_error)
   30699           9 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   30700           9 :   __pyx_v_fill_value = __pyx_t_6;
   30701             : 
   30702             :   /* "scipy/interpolate/_interpnd.pyx":980
   30703             :  *         fill_value = self.fill_value
   30704             :  * 
   30705             :  *         qhull._get_delaunay_info(&info, self.tri, 1, 1, 0)             # <<<<<<<<<<<<<<
   30706             :  * 
   30707             :  *         out = np.zeros((xi.shape[0], self.values.shape[1]),
   30708             :  */
   30709           9 :   __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_tri); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 980, __pyx_L1_error)
   30710           9 :   __Pyx_GOTREF(__pyx_t_4);
   30711           9 :   __pyx_t_7 = __pyx_f_5scipy_7spatial_6_qhull__get_delaunay_info((&__pyx_v_info), __pyx_t_4, 1, 1, 0); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 980, __pyx_L1_error)
   30712           9 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   30713             : 
   30714             :   /* "scipy/interpolate/_interpnd.pyx":982
   30715             :  *         qhull._get_delaunay_info(&info, self.tri, 1, 1, 0)
   30716             :  * 
   30717             :  *         out = np.zeros((xi.shape[0], self.values.shape[1]),             # <<<<<<<<<<<<<<
   30718             :  *                        dtype=self.values.dtype)
   30719             :  *         nvalues = out.shape[1]
   30720             :  */
   30721           9 :   __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 982, __pyx_L1_error)
   30722           9 :   __Pyx_GOTREF(__pyx_t_4);
   30723           9 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 982, __pyx_L1_error)
   30724           9 :   __Pyx_GOTREF(__pyx_t_1);
   30725           9 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   30726           9 :   __pyx_t_4 = PyInt_FromSsize_t((__pyx_v_xi.shape[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 982, __pyx_L1_error)
   30727           9 :   __Pyx_GOTREF(__pyx_t_4);
   30728           9 :   __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_values); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 982, __pyx_L1_error)
   30729           9 :   __Pyx_GOTREF(__pyx_t_8);
   30730           9 :   __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_shape); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 982, __pyx_L1_error)
   30731           9 :   __Pyx_GOTREF(__pyx_t_9);
   30732           9 :   __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   30733           9 :   __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_9, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 982, __pyx_L1_error)
   30734           9 :   __Pyx_GOTREF(__pyx_t_8);
   30735           9 :   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
   30736           9 :   __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 982, __pyx_L1_error)
   30737           9 :   __Pyx_GOTREF(__pyx_t_9);
   30738           9 :   __Pyx_GIVEREF(__pyx_t_4);
   30739           9 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_4)) __PYX_ERR(0, 982, __pyx_L1_error);
   30740           9 :   __Pyx_GIVEREF(__pyx_t_8);
   30741           9 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_8)) __PYX_ERR(0, 982, __pyx_L1_error);
   30742           9 :   __pyx_t_4 = 0;
   30743           9 :   __pyx_t_8 = 0;
   30744           9 :   __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 982, __pyx_L1_error)
   30745           9 :   __Pyx_GOTREF(__pyx_t_8);
   30746           9 :   __Pyx_GIVEREF(__pyx_t_9);
   30747           9 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9)) __PYX_ERR(0, 982, __pyx_L1_error);
   30748           9 :   __pyx_t_9 = 0;
   30749             : 
   30750             :   /* "scipy/interpolate/_interpnd.pyx":983
   30751             :  * 
   30752             :  *         out = np.zeros((xi.shape[0], self.values.shape[1]),
   30753             :  *                        dtype=self.values.dtype)             # <<<<<<<<<<<<<<
   30754             :  *         nvalues = out.shape[1]
   30755             :  * 
   30756             :  */
   30757           9 :   __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 983, __pyx_L1_error)
   30758           9 :   __Pyx_GOTREF(__pyx_t_9);
   30759           9 :   __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_values); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 983, __pyx_L1_error)
   30760           9 :   __Pyx_GOTREF(__pyx_t_4);
   30761           9 :   __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_dtype); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 983, __pyx_L1_error)
   30762           9 :   __Pyx_GOTREF(__pyx_t_10);
   30763           9 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   30764           9 :   if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_dtype, __pyx_t_10) < 0) __PYX_ERR(0, 983, __pyx_L1_error)
   30765           9 :   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
   30766             : 
   30767             :   /* "scipy/interpolate/_interpnd.pyx":982
   30768             :  *         qhull._get_delaunay_info(&info, self.tri, 1, 1, 0)
   30769             :  * 
   30770             :  *         out = np.zeros((xi.shape[0], self.values.shape[1]),             # <<<<<<<<<<<<<<
   30771             :  *                        dtype=self.values.dtype)
   30772             :  *         nvalues = out.shape[1]
   30773             :  */
   30774           9 :   __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 982, __pyx_L1_error)
   30775           9 :   __Pyx_GOTREF(__pyx_t_10);
   30776           9 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   30777           9 :   __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   30778           9 :   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
   30779           9 :   __pyx_t_11 = __Pyx_PyObject_to_MemoryviewSlice_d_dc___pyx_t_double_complex(__pyx_t_10, PyBUF_WRITABLE); if (unlikely(!__pyx_t_11.memview)) __PYX_ERR(0, 982, __pyx_L1_error)
   30780           9 :   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
   30781           9 :   __pyx_v_out = __pyx_t_11;
   30782           9 :   __pyx_t_11.memview = NULL;
   30783           9 :   __pyx_t_11.data = NULL;
   30784             : 
   30785             :   /* "scipy/interpolate/_interpnd.pyx":984
   30786             :  *         out = np.zeros((xi.shape[0], self.values.shape[1]),
   30787             :  *                        dtype=self.values.dtype)
   30788             :  *         nvalues = out.shape[1]             # <<<<<<<<<<<<<<
   30789             :  * 
   30790             :  *         start = 0
   30791             :  */
   30792           9 :   __pyx_v_nvalues = (__pyx_v_out.shape[1]);
   30793             : 
   30794             :   /* "scipy/interpolate/_interpnd.pyx":986
   30795             :  *         nvalues = out.shape[1]
   30796             :  * 
   30797             :  *         start = 0             # <<<<<<<<<<<<<<
   30798             :  *         eps = 100 * DBL_EPSILON
   30799             :  *         eps_broad = sqrt(eps)
   30800             :  */
   30801           9 :   __pyx_v_start = 0;
   30802             : 
   30803             :   /* "scipy/interpolate/_interpnd.pyx":987
   30804             :  * 
   30805             :  *         start = 0
   30806             :  *         eps = 100 * DBL_EPSILON             # <<<<<<<<<<<<<<
   30807             :  *         eps_broad = sqrt(eps)
   30808             :  * 
   30809             :  */
   30810           9 :   __pyx_v_eps = (100.0 * DBL_EPSILON);
   30811             : 
   30812             :   /* "scipy/interpolate/_interpnd.pyx":988
   30813             :  *         start = 0
   30814             :  *         eps = 100 * DBL_EPSILON
   30815             :  *         eps_broad = sqrt(eps)             # <<<<<<<<<<<<<<
   30816             :  * 
   30817             :  *         with nogil:
   30818             :  */
   30819           9 :   __pyx_v_eps_broad = sqrt(__pyx_v_eps);
   30820             : 
   30821             :   /* "scipy/interpolate/_interpnd.pyx":990
   30822             :  *         eps_broad = sqrt(eps)
   30823             :  * 
   30824             :  *         with nogil:             # <<<<<<<<<<<<<<
   30825             :  *             for i in range(xi.shape[0]):
   30826             :  *                 # 1) Find the simplex
   30827             :  */
   30828             :   {
   30829             :       #ifdef WITH_THREAD
   30830           9 :       PyThreadState *_save;
   30831           9 :       _save = NULL;
   30832           9 :       Py_UNBLOCK_THREADS
   30833           9 :       __Pyx_FastGIL_Remember();
   30834             :       #endif
   30835             :       /*try:*/ {
   30836             : 
   30837             :         /* "scipy/interpolate/_interpnd.pyx":991
   30838             :  * 
   30839             :  *         with nogil:
   30840             :  *             for i in range(xi.shape[0]):             # <<<<<<<<<<<<<<
   30841             :  *                 # 1) Find the simplex
   30842             :  * 
   30843             :  */
   30844           9 :         __pyx_t_12 = (__pyx_v_xi.shape[0]);
   30845           9 :         __pyx_t_13 = __pyx_t_12;
   30846          67 :         for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_13; __pyx_t_7+=1) {
   30847          49 :           __pyx_v_i = __pyx_t_7;
   30848             : 
   30849             :           /* "scipy/interpolate/_interpnd.pyx":995
   30850             :  * 
   30851             :  *                 isimplex = qhull._find_simplex(&info, c,
   30852             :  *                                                &xi[i,0],             # <<<<<<<<<<<<<<
   30853             :  *                                                &start, eps, eps_broad)
   30854             :  * 
   30855             :  */
   30856          49 :           __pyx_t_14 = __pyx_v_i;
   30857          49 :           __pyx_t_15 = 0;
   30858             : 
   30859             :           /* "scipy/interpolate/_interpnd.pyx":994
   30860             :  *                 # 1) Find the simplex
   30861             :  * 
   30862             :  *                 isimplex = qhull._find_simplex(&info, c,             # <<<<<<<<<<<<<<
   30863             :  *                                                &xi[i,0],
   30864             :  *                                                &start, eps, eps_broad)
   30865             :  */
   30866          49 :           __pyx_v_isimplex = __pyx_f_5scipy_7spatial_6_qhull__find_simplex((&__pyx_v_info), __pyx_v_c, (&(*((double const  *) ( /* dim=1 */ ((char *) (((double const  *) ( /* dim=0 */ (__pyx_v_xi.data + __pyx_t_14 * __pyx_v_xi.strides[0]) )) + __pyx_t_15)) )))), (&__pyx_v_start), __pyx_v_eps, __pyx_v_eps_broad);
   30867             : 
   30868             :           /* "scipy/interpolate/_interpnd.pyx":1000
   30869             :  *                 # 2) Clough-Tocher interpolation
   30870             :  * 
   30871             :  *                 if isimplex == -1:             # <<<<<<<<<<<<<<
   30872             :  *                     # outside triangulation
   30873             :  *                     for k in range(nvalues):
   30874             :  */
   30875          49 :           __pyx_t_16 = (__pyx_v_isimplex == -1L);
   30876          49 :           if (__pyx_t_16) {
   30877             : 
   30878             :             /* "scipy/interpolate/_interpnd.pyx":1002
   30879             :  *                 if isimplex == -1:
   30880             :  *                     # outside triangulation
   30881             :  *                     for k in range(nvalues):             # <<<<<<<<<<<<<<
   30882             :  *                         out[i,k] = fill_value
   30883             :  *                     continue
   30884             :  */
   30885             :             __pyx_t_17 = __pyx_v_nvalues;
   30886             :             __pyx_t_18 = __pyx_t_17;
   30887           0 :             for (__pyx_t_19 = 0; __pyx_t_19 < __pyx_t_18; __pyx_t_19+=1) {
   30888           0 :               __pyx_v_k = __pyx_t_19;
   30889             : 
   30890             :               /* "scipy/interpolate/_interpnd.pyx":1003
   30891             :  *                     # outside triangulation
   30892             :  *                     for k in range(nvalues):
   30893             :  *                         out[i,k] = fill_value             # <<<<<<<<<<<<<<
   30894             :  *                     continue
   30895             :  * 
   30896             :  */
   30897           0 :               __pyx_t_15 = __pyx_v_i;
   30898           0 :               __pyx_t_14 = __pyx_v_k;
   30899           0 :               *((__pyx_t_double_complex *) ( /* dim=1 */ ((char *) (((__pyx_t_double_complex *) ( /* dim=0 */ (__pyx_v_out.data + __pyx_t_15 * __pyx_v_out.strides[0]) )) + __pyx_t_14)) )) = __pyx_v_fill_value;
   30900             :             }
   30901             : 
   30902             :             /* "scipy/interpolate/_interpnd.pyx":1004
   30903             :  *                     for k in range(nvalues):
   30904             :  *                         out[i,k] = fill_value
   30905             :  *                     continue             # <<<<<<<<<<<<<<
   30906             :  * 
   30907             :  *                 for k in range(nvalues):
   30908             :  */
   30909           0 :             goto __pyx_L6_continue;
   30910             : 
   30911             :             /* "scipy/interpolate/_interpnd.pyx":1000
   30912             :  *                 # 2) Clough-Tocher interpolation
   30913             :  * 
   30914             :  *                 if isimplex == -1:             # <<<<<<<<<<<<<<
   30915             :  *                     # outside triangulation
   30916             :  *                     for k in range(nvalues):
   30917             :  */
   30918             :           }
   30919             : 
   30920             :           /* "scipy/interpolate/_interpnd.pyx":1006
   30921             :  *                     continue
   30922             :  * 
   30923             :  *                 for k in range(nvalues):             # <<<<<<<<<<<<<<
   30924             :  *                     for j in range(ndim+1):
   30925             :  *                         f[j] = values[simplices[isimplex,j],k]
   30926             :  */
   30927             :           __pyx_t_17 = __pyx_v_nvalues;
   30928             :           __pyx_t_18 = __pyx_t_17;
   30929          98 :           for (__pyx_t_19 = 0; __pyx_t_19 < __pyx_t_18; __pyx_t_19+=1) {
   30930          49 :             __pyx_v_k = __pyx_t_19;
   30931             : 
   30932             :             /* "scipy/interpolate/_interpnd.pyx":1007
   30933             :  * 
   30934             :  *                 for k in range(nvalues):
   30935             :  *                     for j in range(ndim+1):             # <<<<<<<<<<<<<<
   30936             :  *                         f[j] = values[simplices[isimplex,j],k]
   30937             :  *                         df[2*j] = grad[simplices[isimplex,j],k,0]
   30938             :  */
   30939          49 :             __pyx_t_20 = (__pyx_v_ndim + 1);
   30940          49 :             __pyx_t_21 = __pyx_t_20;
   30941         196 :             for (__pyx_t_22 = 0; __pyx_t_22 < __pyx_t_21; __pyx_t_22+=1) {
   30942         147 :               __pyx_v_j = __pyx_t_22;
   30943             : 
   30944             :               /* "scipy/interpolate/_interpnd.pyx":1008
   30945             :  *                 for k in range(nvalues):
   30946             :  *                     for j in range(ndim+1):
   30947             :  *                         f[j] = values[simplices[isimplex,j],k]             # <<<<<<<<<<<<<<
   30948             :  *                         df[2*j] = grad[simplices[isimplex,j],k,0]
   30949             :  *                         df[2*j+1] = grad[simplices[isimplex,j],k,1]
   30950             :  */
   30951         147 :               __pyx_t_14 = __pyx_v_isimplex;
   30952         147 :               __pyx_t_15 = __pyx_v_j;
   30953         147 :               __pyx_t_23 = (*((int const  *) ( /* dim=1 */ ((char *) (((int const  *) ( /* dim=0 */ (__pyx_v_simplices.data + __pyx_t_14 * __pyx_v_simplices.strides[0]) )) + __pyx_t_15)) )));
   30954         147 :               __pyx_t_24 = __pyx_v_k;
   30955         147 :               (__pyx_v_f[__pyx_v_j]) = (*((__pyx_t_double_complex const  *) ( /* dim=1 */ ((char *) (((__pyx_t_double_complex const  *) ( /* dim=0 */ (__pyx_v_values.data + __pyx_t_23 * __pyx_v_values.strides[0]) )) + __pyx_t_24)) )));
   30956             : 
   30957             :               /* "scipy/interpolate/_interpnd.pyx":1009
   30958             :  *                     for j in range(ndim+1):
   30959             :  *                         f[j] = values[simplices[isimplex,j],k]
   30960             :  *                         df[2*j] = grad[simplices[isimplex,j],k,0]             # <<<<<<<<<<<<<<
   30961             :  *                         df[2*j+1] = grad[simplices[isimplex,j],k,1]
   30962             :  * 
   30963             :  */
   30964         147 :               __pyx_t_15 = __pyx_v_isimplex;
   30965         147 :               __pyx_t_14 = __pyx_v_j;
   30966         147 :               __pyx_t_24 = (*((int const  *) ( /* dim=1 */ ((char *) (((int const  *) ( /* dim=0 */ (__pyx_v_simplices.data + __pyx_t_15 * __pyx_v_simplices.strides[0]) )) + __pyx_t_14)) )));
   30967         147 :               __pyx_t_23 = __pyx_v_k;
   30968         147 :               __pyx_t_25 = 0;
   30969         147 :               (__pyx_v_df[(2 * __pyx_v_j)]) = (*((__pyx_t_double_complex const  *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_grad.data + __pyx_t_24 * __pyx_v_grad.strides[0]) ) + __pyx_t_23 * __pyx_v_grad.strides[1]) ) + __pyx_t_25 * __pyx_v_grad.strides[2]) )));
   30970             : 
   30971             :               /* "scipy/interpolate/_interpnd.pyx":1010
   30972             :  *                         f[j] = values[simplices[isimplex,j],k]
   30973             :  *                         df[2*j] = grad[simplices[isimplex,j],k,0]
   30974             :  *                         df[2*j+1] = grad[simplices[isimplex,j],k,1]             # <<<<<<<<<<<<<<
   30975             :  * 
   30976             :  *                     w = _clough_tocher_2d_single(&info, isimplex, c, f, df)
   30977             :  */
   30978         147 :               __pyx_t_14 = __pyx_v_isimplex;
   30979         147 :               __pyx_t_15 = __pyx_v_j;
   30980         147 :               __pyx_t_25 = (*((int const  *) ( /* dim=1 */ ((char *) (((int const  *) ( /* dim=0 */ (__pyx_v_simplices.data + __pyx_t_14 * __pyx_v_simplices.strides[0]) )) + __pyx_t_15)) )));
   30981         147 :               __pyx_t_23 = __pyx_v_k;
   30982         147 :               __pyx_t_24 = 1;
   30983         147 :               (__pyx_v_df[((2 * __pyx_v_j) + 1)]) = (*((__pyx_t_double_complex const  *) ( /* dim=2 */ (( /* dim=1 */ (( /* dim=0 */ (__pyx_v_grad.data + __pyx_t_25 * __pyx_v_grad.strides[0]) ) + __pyx_t_23 * __pyx_v_grad.strides[1]) ) + __pyx_t_24 * __pyx_v_grad.strides[2]) )));
   30984             :             }
   30985             : 
   30986             :             /* "scipy/interpolate/_interpnd.pyx":1012
   30987             :  *                         df[2*j+1] = grad[simplices[isimplex,j],k,1]
   30988             :  * 
   30989             :  *                     w = _clough_tocher_2d_single(&info, isimplex, c, f, df)             # <<<<<<<<<<<<<<
   30990             :  *                     out[i,k] = w
   30991             :  * 
   30992             :  */
   30993          49 :             __pyx_v_w = __pyx_fuse_1__pyx_f_5scipy_11interpolate_9_interpnd__clough_tocher_2d_single((&__pyx_v_info), __pyx_v_isimplex, __pyx_v_c, __pyx_v_f, __pyx_v_df);
   30994             : 
   30995             :             /* "scipy/interpolate/_interpnd.pyx":1013
   30996             :  * 
   30997             :  *                     w = _clough_tocher_2d_single(&info, isimplex, c, f, df)
   30998             :  *                     out[i,k] = w             # <<<<<<<<<<<<<<
   30999             :  * 
   31000             :  *         return out
   31001             :  */
   31002          49 :             __pyx_t_15 = __pyx_v_i;
   31003          49 :             __pyx_t_14 = __pyx_v_k;
   31004          49 :             *((__pyx_t_double_complex *) ( /* dim=1 */ ((char *) (((__pyx_t_double_complex *) ( /* dim=0 */ (__pyx_v_out.data + __pyx_t_15 * __pyx_v_out.strides[0]) )) + __pyx_t_14)) )) = __pyx_v_w;
   31005             :           }
   31006          49 :           __pyx_L6_continue:;
   31007             :         }
   31008             :       }
   31009             : 
   31010             :       /* "scipy/interpolate/_interpnd.pyx":990
   31011             :  *         eps_broad = sqrt(eps)
   31012             :  * 
   31013             :  *         with nogil:             # <<<<<<<<<<<<<<
   31014             :  *             for i in range(xi.shape[0]):
   31015             :  *                 # 1) Find the simplex
   31016             :  */
   31017             :       /*finally:*/ {
   31018             :         /*normal exit:*/{
   31019             :           #ifdef WITH_THREAD
   31020           9 :           __Pyx_FastGIL_Forget();
   31021           9 :           Py_BLOCK_THREADS
   31022             :           #endif
   31023           9 :           goto __pyx_L5;
   31024             :         }
   31025           9 :         __pyx_L5:;
   31026             :       }
   31027             :   }
   31028             : 
   31029             :   /* "scipy/interpolate/_interpnd.pyx":1015
   31030             :  *                     out[i,k] = w
   31031             :  * 
   31032             :  *         return out             # <<<<<<<<<<<<<<
   31033             :  */
   31034           9 :   __Pyx_XDECREF(__pyx_r);
   31035           9 :   __pyx_t_10 = __pyx_memoryview_fromslice(__pyx_v_out, 2, (PyObject *(*)(char *)) __pyx_memview_get___pyx_t_double_complex, (int (*)(char *, PyObject *)) __pyx_memview_set___pyx_t_double_complex, 0);; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1015, __pyx_L1_error)
   31036           9 :   __Pyx_GOTREF(__pyx_t_10);
   31037           9 :   __pyx_r = __pyx_t_10;
   31038           9 :   __pyx_t_10 = 0;
   31039           9 :   goto __pyx_L0;
   31040             : 
   31041             :   /* "scipy/interpolate/_interpnd.pyx":961
   31042             :  *         return self._do_evaluate(xi, 1.0j)
   31043             :  * 
   31044             :  *     @cython.boundscheck(False)             # <<<<<<<<<<<<<<
   31045             :  *     @cython.wraparound(False)
   31046             :  *     def _do_evaluate(self, const double[:,::1] xi, const double_or_complex dummy):
   31047             :  */
   31048             : 
   31049             :   /* function exit code */
   31050           0 :   __pyx_L1_error:;
   31051           0 :   __Pyx_XDECREF(__pyx_t_1);
   31052           0 :   __PYX_XCLEAR_MEMVIEW(&__pyx_t_2, 1);
   31053           0 :   __PYX_XCLEAR_MEMVIEW(&__pyx_t_3, 1);
   31054           0 :   __Pyx_XDECREF(__pyx_t_4);
   31055           0 :   __PYX_XCLEAR_MEMVIEW(&__pyx_t_5, 1);
   31056           0 :   __Pyx_XDECREF(__pyx_t_8);
   31057           0 :   __Pyx_XDECREF(__pyx_t_9);
   31058           0 :   __Pyx_XDECREF(__pyx_t_10);
   31059           0 :   __PYX_XCLEAR_MEMVIEW(&__pyx_t_11, 1);
   31060           0 :   __Pyx_AddTraceback("scipy.interpolate._interpnd.CloughTocher2DInterpolator._do_evaluate", __pyx_clineno, __pyx_lineno, __pyx_filename);
   31061           0 :   __pyx_r = NULL;
   31062           9 :   __pyx_L0:;
   31063           9 :   __PYX_XCLEAR_MEMVIEW(&__pyx_v_values, 1);
   31064           9 :   __PYX_XCLEAR_MEMVIEW(&__pyx_v_grad, 1);
   31065           9 :   __PYX_XCLEAR_MEMVIEW(&__pyx_v_out, 1);
   31066           9 :   __PYX_XCLEAR_MEMVIEW(&__pyx_v_simplices, 1);
   31067           9 :   __Pyx_XGIVEREF(__pyx_r);
   31068           9 :   __Pyx_RefNannyFinishContext();
   31069           9 :   return __pyx_r;
   31070             : }
   31071             : static struct __pyx_vtabstruct_array __pyx_vtable_array;
   31072             : 
   31073           0 : static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k) {
   31074           0 :   struct __pyx_array_obj *p;
   31075           0 :   PyObject *o;
   31076             :   #if CYTHON_COMPILING_IN_LIMITED_API
   31077             :   allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
   31078             :   o = alloc_func(t, 0);
   31079             :   #else
   31080           0 :   if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
   31081           0 :     o = (*t->tp_alloc)(t, 0);
   31082             :   } else {
   31083           0 :     o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
   31084             :   }
   31085           0 :   if (unlikely(!o)) return 0;
   31086             :   #endif
   31087           0 :   p = ((struct __pyx_array_obj *)o);
   31088           0 :   p->__pyx_vtab = __pyx_vtabptr_array;
   31089           0 :   p->mode = ((PyObject*)Py_None); Py_INCREF(Py_None);
   31090           0 :   p->_format = ((PyObject*)Py_None); Py_INCREF(Py_None);
   31091           0 :   if (unlikely(__pyx_array___cinit__(o, a, k) < 0)) goto bad;
   31092             :   return o;
   31093           0 :   bad:
   31094           0 :   Py_DECREF(o); o = 0;
   31095             :   return NULL;
   31096             : }
   31097             : 
   31098           0 : static void __pyx_tp_dealloc_array(PyObject *o) {
   31099           0 :   struct __pyx_array_obj *p = (struct __pyx_array_obj *)o;
   31100             :   #if CYTHON_USE_TP_FINALIZE
   31101           0 :   if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
   31102           0 :     if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_array) {
   31103           0 :       if (PyObject_CallFinalizerFromDealloc(o)) return;
   31104             :     }
   31105             :   }
   31106             :   #endif
   31107             :   {
   31108           0 :     PyObject *etype, *eval, *etb;
   31109           0 :     PyErr_Fetch(&etype, &eval, &etb);
   31110           0 :     __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
   31111           0 :     __pyx_array___dealloc__(o);
   31112           0 :     __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
   31113           0 :     PyErr_Restore(etype, eval, etb);
   31114             :   }
   31115           0 :   Py_CLEAR(p->mode);
   31116           0 :   Py_CLEAR(p->_format);
   31117             :   #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
   31118           0 :   (*Py_TYPE(o)->tp_free)(o);
   31119             :   #else
   31120             :   {
   31121             :     freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
   31122             :     if (tp_free) tp_free(o);
   31123             :   }
   31124             :   #endif
   31125             : }
   31126           0 : static PyObject *__pyx_sq_item_array(PyObject *o, Py_ssize_t i) {
   31127           0 :   PyObject *r;
   31128           0 :   PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
   31129           0 :   r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
   31130           0 :   Py_DECREF(x);
   31131             :   return r;
   31132             : }
   31133             : 
   31134           0 : static int __pyx_mp_ass_subscript_array(PyObject *o, PyObject *i, PyObject *v) {
   31135           0 :   if (v) {
   31136           0 :     return __pyx_array___setitem__(o, i, v);
   31137             :   }
   31138             :   else {
   31139           0 :     __Pyx_TypeName o_type_name;
   31140           0 :     o_type_name = __Pyx_PyType_GetName(Py_TYPE(o));
   31141           0 :     PyErr_Format(PyExc_NotImplementedError,
   31142             :       "Subscript deletion not supported by " __Pyx_FMT_TYPENAME, o_type_name);
   31143           0 :     __Pyx_DECREF_TypeName(o_type_name);
   31144           0 :     return -1;
   31145             :   }
   31146             : }
   31147             : 
   31148           0 : static PyObject *__pyx_tp_getattro_array(PyObject *o, PyObject *n) {
   31149           0 :   PyObject *v = __Pyx_PyObject_GenericGetAttr(o, n);
   31150           0 :   if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) {
   31151           0 :     PyErr_Clear();
   31152           0 :     v = __pyx_array___getattr__(o, n);
   31153             :   }
   31154           0 :   return v;
   31155             : }
   31156             : 
   31157           0 : static PyObject *__pyx_getprop___pyx_array_memview(PyObject *o, CYTHON_UNUSED void *x) {
   31158           0 :   return __pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(o);
   31159             : }
   31160             : 
   31161             : static PyMethodDef __pyx_methods_array[] = {
   31162             :   {"__getattr__", (PyCFunction)__pyx_array___getattr__, METH_O|METH_COEXIST, 0},
   31163             :   {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_array_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
   31164             :   {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_array_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
   31165             :   {0, 0, 0, 0}
   31166             : };
   31167             : 
   31168             : static struct PyGetSetDef __pyx_getsets_array[] = {
   31169             :   {(char *)"memview", __pyx_getprop___pyx_array_memview, 0, (char *)0, 0},
   31170             :   {0, 0, 0, 0, 0}
   31171             : };
   31172             : #if CYTHON_USE_TYPE_SPECS
   31173             : #if !CYTHON_COMPILING_IN_LIMITED_API
   31174             : 
   31175             : static PyBufferProcs __pyx_tp_as_buffer_array = {
   31176             :   #if PY_MAJOR_VERSION < 3
   31177             :   0, /*bf_getreadbuffer*/
   31178             :   #endif
   31179             :   #if PY_MAJOR_VERSION < 3
   31180             :   0, /*bf_getwritebuffer*/
   31181             :   #endif
   31182             :   #if PY_MAJOR_VERSION < 3
   31183             :   0, /*bf_getsegcount*/
   31184             :   #endif
   31185             :   #if PY_MAJOR_VERSION < 3
   31186             :   0, /*bf_getcharbuffer*/
   31187             :   #endif
   31188             :   __pyx_array_getbuffer, /*bf_getbuffer*/
   31189             :   0, /*bf_releasebuffer*/
   31190             : };
   31191             : #endif
   31192             : static PyType_Slot __pyx_type___pyx_array_slots[] = {
   31193             :   {Py_tp_dealloc, (void *)__pyx_tp_dealloc_array},
   31194             :   {Py_sq_length, (void *)__pyx_array___len__},
   31195             :   {Py_sq_item, (void *)__pyx_sq_item_array},
   31196             :   {Py_mp_length, (void *)__pyx_array___len__},
   31197             :   {Py_mp_subscript, (void *)__pyx_array___getitem__},
   31198             :   {Py_mp_ass_subscript, (void *)__pyx_mp_ass_subscript_array},
   31199             :   {Py_tp_getattro, (void *)__pyx_tp_getattro_array},
   31200             :   #if defined(Py_bf_getbuffer)
   31201             :   {Py_bf_getbuffer, (void *)__pyx_array_getbuffer},
   31202             :   #endif
   31203             :   {Py_tp_methods, (void *)__pyx_methods_array},
   31204             :   {Py_tp_getset, (void *)__pyx_getsets_array},
   31205             :   {Py_tp_new, (void *)__pyx_tp_new_array},
   31206             :   {0, 0},
   31207             : };
   31208             : static PyType_Spec __pyx_type___pyx_array_spec = {
   31209             :   "scipy.interpolate._interpnd.array",
   31210             :   sizeof(struct __pyx_array_obj),
   31211             :   0,
   31212             :   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_SEQUENCE,
   31213             :   __pyx_type___pyx_array_slots,
   31214             : };
   31215             : #else
   31216             : 
   31217             : static PySequenceMethods __pyx_tp_as_sequence_array = {
   31218             :   __pyx_array___len__, /*sq_length*/
   31219             :   0, /*sq_concat*/
   31220             :   0, /*sq_repeat*/
   31221             :   __pyx_sq_item_array, /*sq_item*/
   31222             :   0, /*sq_slice*/
   31223             :   0, /*sq_ass_item*/
   31224             :   0, /*sq_ass_slice*/
   31225             :   0, /*sq_contains*/
   31226             :   0, /*sq_inplace_concat*/
   31227             :   0, /*sq_inplace_repeat*/
   31228             : };
   31229             : 
   31230             : static PyMappingMethods __pyx_tp_as_mapping_array = {
   31231             :   __pyx_array___len__, /*mp_length*/
   31232             :   __pyx_array___getitem__, /*mp_subscript*/
   31233             :   __pyx_mp_ass_subscript_array, /*mp_ass_subscript*/
   31234             : };
   31235             : 
   31236             : static PyBufferProcs __pyx_tp_as_buffer_array = {
   31237             :   #if PY_MAJOR_VERSION < 3
   31238             :   0, /*bf_getreadbuffer*/
   31239             :   #endif
   31240             :   #if PY_MAJOR_VERSION < 3
   31241             :   0, /*bf_getwritebuffer*/
   31242             :   #endif
   31243             :   #if PY_MAJOR_VERSION < 3
   31244             :   0, /*bf_getsegcount*/
   31245             :   #endif
   31246             :   #if PY_MAJOR_VERSION < 3
   31247             :   0, /*bf_getcharbuffer*/
   31248             :   #endif
   31249             :   __pyx_array_getbuffer, /*bf_getbuffer*/
   31250             :   0, /*bf_releasebuffer*/
   31251             : };
   31252             : 
   31253             : static PyTypeObject __pyx_type___pyx_array = {
   31254             :   PyVarObject_HEAD_INIT(0, 0)
   31255             :   "scipy.interpolate._interpnd.""array", /*tp_name*/
   31256             :   sizeof(struct __pyx_array_obj), /*tp_basicsize*/
   31257             :   0, /*tp_itemsize*/
   31258             :   __pyx_tp_dealloc_array, /*tp_dealloc*/
   31259             :   #if PY_VERSION_HEX < 0x030800b4
   31260             :   0, /*tp_print*/
   31261             :   #endif
   31262             :   #if PY_VERSION_HEX >= 0x030800b4
   31263             :   0, /*tp_vectorcall_offset*/
   31264             :   #endif
   31265             :   0, /*tp_getattr*/
   31266             :   0, /*tp_setattr*/
   31267             :   #if PY_MAJOR_VERSION < 3
   31268             :   0, /*tp_compare*/
   31269             :   #endif
   31270             :   #if PY_MAJOR_VERSION >= 3
   31271             :   0, /*tp_as_async*/
   31272             :   #endif
   31273             :   0, /*tp_repr*/
   31274             :   0, /*tp_as_number*/
   31275             :   &__pyx_tp_as_sequence_array, /*tp_as_sequence*/
   31276             :   &__pyx_tp_as_mapping_array, /*tp_as_mapping*/
   31277             :   0, /*tp_hash*/
   31278             :   0, /*tp_call*/
   31279             :   0, /*tp_str*/
   31280             :   __pyx_tp_getattro_array, /*tp_getattro*/
   31281             :   0, /*tp_setattro*/
   31282             :   &__pyx_tp_as_buffer_array, /*tp_as_buffer*/
   31283             :   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_SEQUENCE, /*tp_flags*/
   31284             :   0, /*tp_doc*/
   31285             :   0, /*tp_traverse*/
   31286             :   0, /*tp_clear*/
   31287             :   0, /*tp_richcompare*/
   31288             :   0, /*tp_weaklistoffset*/
   31289             :   0, /*tp_iter*/
   31290             :   0, /*tp_iternext*/
   31291             :   __pyx_methods_array, /*tp_methods*/
   31292             :   0, /*tp_members*/
   31293             :   __pyx_getsets_array, /*tp_getset*/
   31294             :   0, /*tp_base*/
   31295             :   0, /*tp_dict*/
   31296             :   0, /*tp_descr_get*/
   31297             :   0, /*tp_descr_set*/
   31298             :   #if !CYTHON_USE_TYPE_SPECS
   31299             :   0, /*tp_dictoffset*/
   31300             :   #endif
   31301             :   0, /*tp_init*/
   31302             :   0, /*tp_alloc*/
   31303             :   __pyx_tp_new_array, /*tp_new*/
   31304             :   0, /*tp_free*/
   31305             :   0, /*tp_is_gc*/
   31306             :   0, /*tp_bases*/
   31307             :   0, /*tp_mro*/
   31308             :   0, /*tp_cache*/
   31309             :   0, /*tp_subclasses*/
   31310             :   0, /*tp_weaklist*/
   31311             :   0, /*tp_del*/
   31312             :   0, /*tp_version_tag*/
   31313             :   #if PY_VERSION_HEX >= 0x030400a1
   31314             :   #if CYTHON_USE_TP_FINALIZE
   31315             :   0, /*tp_finalize*/
   31316             :   #else
   31317             :   NULL, /*tp_finalize*/
   31318             :   #endif
   31319             :   #endif
   31320             :   #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
   31321             :   0, /*tp_vectorcall*/
   31322             :   #endif
   31323             :   #if __PYX_NEED_TP_PRINT_SLOT == 1
   31324             :   0, /*tp_print*/
   31325             :   #endif
   31326             :   #if PY_VERSION_HEX >= 0x030C0000
   31327             :   0, /*tp_watched*/
   31328             :   #endif
   31329             :   #if PY_VERSION_HEX >= 0x030d00A4
   31330             :   0, /*tp_versions_used*/
   31331             :   #endif
   31332             :   #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
   31333             :   0, /*tp_pypy_flags*/
   31334             :   #endif
   31335             : };
   31336             : #endif
   31337             : 
   31338          15 : static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
   31339          15 :   struct __pyx_MemviewEnum_obj *p;
   31340          15 :   PyObject *o;
   31341             :   #if CYTHON_COMPILING_IN_LIMITED_API
   31342             :   allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
   31343             :   o = alloc_func(t, 0);
   31344             :   #else
   31345          15 :   if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
   31346          15 :     o = (*t->tp_alloc)(t, 0);
   31347             :   } else {
   31348           0 :     o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
   31349             :   }
   31350          15 :   if (unlikely(!o)) return 0;
   31351             :   #endif
   31352          15 :   p = ((struct __pyx_MemviewEnum_obj *)o);
   31353          15 :   p->name = Py_None; Py_INCREF(Py_None);
   31354             :   return o;
   31355             : }
   31356             : 
   31357           0 : static void __pyx_tp_dealloc_Enum(PyObject *o) {
   31358           0 :   struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o;
   31359             :   #if CYTHON_USE_TP_FINALIZE
   31360           0 :   if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
   31361           0 :     if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_Enum) {
   31362           0 :       if (PyObject_CallFinalizerFromDealloc(o)) return;
   31363             :     }
   31364             :   }
   31365             :   #endif
   31366           0 :   PyObject_GC_UnTrack(o);
   31367           0 :   Py_CLEAR(p->name);
   31368             :   #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
   31369           0 :   (*Py_TYPE(o)->tp_free)(o);
   31370             :   #else
   31371             :   {
   31372             :     freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
   31373             :     if (tp_free) tp_free(o);
   31374             :   }
   31375             :   #endif
   31376             : }
   31377             : 
   31378         685 : static int __pyx_tp_traverse_Enum(PyObject *o, visitproc v, void *a) {
   31379         685 :   int e;
   31380         685 :   struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o;
   31381         685 :   if (p->name) {
   31382         685 :     e = (*v)(p->name, a); if (e) return e;
   31383             :   }
   31384             :   return 0;
   31385             : }
   31386             : 
   31387           0 : static int __pyx_tp_clear_Enum(PyObject *o) {
   31388           0 :   PyObject* tmp;
   31389           0 :   struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o;
   31390           0 :   tmp = ((PyObject*)p->name);
   31391           0 :   p->name = Py_None; Py_INCREF(Py_None);
   31392           0 :   Py_XDECREF(tmp);
   31393           0 :   return 0;
   31394             : }
   31395             : 
   31396           0 : static PyObject *__pyx_specialmethod___pyx_MemviewEnum___repr__(PyObject *self, CYTHON_UNUSED PyObject *arg) {
   31397           0 :   return __pyx_MemviewEnum___repr__(self);
   31398             : }
   31399             : 
   31400             : static PyMethodDef __pyx_methods_Enum[] = {
   31401             :   {"__repr__", (PyCFunction)__pyx_specialmethod___pyx_MemviewEnum___repr__, METH_NOARGS|METH_COEXIST, 0},
   31402             :   {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_MemviewEnum_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
   31403             :   {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_MemviewEnum_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
   31404             :   {0, 0, 0, 0}
   31405             : };
   31406             : #if CYTHON_USE_TYPE_SPECS
   31407             : static PyType_Slot __pyx_type___pyx_MemviewEnum_slots[] = {
   31408             :   {Py_tp_dealloc, (void *)__pyx_tp_dealloc_Enum},
   31409             :   {Py_tp_repr, (void *)__pyx_MemviewEnum___repr__},
   31410             :   {Py_tp_traverse, (void *)__pyx_tp_traverse_Enum},
   31411             :   {Py_tp_clear, (void *)__pyx_tp_clear_Enum},
   31412             :   {Py_tp_methods, (void *)__pyx_methods_Enum},
   31413             :   {Py_tp_init, (void *)__pyx_MemviewEnum___init__},
   31414             :   {Py_tp_new, (void *)__pyx_tp_new_Enum},
   31415             :   {0, 0},
   31416             : };
   31417             : static PyType_Spec __pyx_type___pyx_MemviewEnum_spec = {
   31418             :   "scipy.interpolate._interpnd.Enum",
   31419             :   sizeof(struct __pyx_MemviewEnum_obj),
   31420             :   0,
   31421             :   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
   31422             :   __pyx_type___pyx_MemviewEnum_slots,
   31423             : };
   31424             : #else
   31425             : 
   31426             : static PyTypeObject __pyx_type___pyx_MemviewEnum = {
   31427             :   PyVarObject_HEAD_INIT(0, 0)
   31428             :   "scipy.interpolate._interpnd.""Enum", /*tp_name*/
   31429             :   sizeof(struct __pyx_MemviewEnum_obj), /*tp_basicsize*/
   31430             :   0, /*tp_itemsize*/
   31431             :   __pyx_tp_dealloc_Enum, /*tp_dealloc*/
   31432             :   #if PY_VERSION_HEX < 0x030800b4
   31433             :   0, /*tp_print*/
   31434             :   #endif
   31435             :   #if PY_VERSION_HEX >= 0x030800b4
   31436             :   0, /*tp_vectorcall_offset*/
   31437             :   #endif
   31438             :   0, /*tp_getattr*/
   31439             :   0, /*tp_setattr*/
   31440             :   #if PY_MAJOR_VERSION < 3
   31441             :   0, /*tp_compare*/
   31442             :   #endif
   31443             :   #if PY_MAJOR_VERSION >= 3
   31444             :   0, /*tp_as_async*/
   31445             :   #endif
   31446             :   __pyx_MemviewEnum___repr__, /*tp_repr*/
   31447             :   0, /*tp_as_number*/
   31448             :   0, /*tp_as_sequence*/
   31449             :   0, /*tp_as_mapping*/
   31450             :   0, /*tp_hash*/
   31451             :   0, /*tp_call*/
   31452             :   0, /*tp_str*/
   31453             :   0, /*tp_getattro*/
   31454             :   0, /*tp_setattro*/
   31455             :   0, /*tp_as_buffer*/
   31456             :   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
   31457             :   0, /*tp_doc*/
   31458             :   __pyx_tp_traverse_Enum, /*tp_traverse*/
   31459             :   __pyx_tp_clear_Enum, /*tp_clear*/
   31460             :   0, /*tp_richcompare*/
   31461             :   0, /*tp_weaklistoffset*/
   31462             :   0, /*tp_iter*/
   31463             :   0, /*tp_iternext*/
   31464             :   __pyx_methods_Enum, /*tp_methods*/
   31465             :   0, /*tp_members*/
   31466             :   0, /*tp_getset*/
   31467             :   0, /*tp_base*/
   31468             :   0, /*tp_dict*/
   31469             :   0, /*tp_descr_get*/
   31470             :   0, /*tp_descr_set*/
   31471             :   #if !CYTHON_USE_TYPE_SPECS
   31472             :   0, /*tp_dictoffset*/
   31473             :   #endif
   31474             :   __pyx_MemviewEnum___init__, /*tp_init*/
   31475             :   0, /*tp_alloc*/
   31476             :   __pyx_tp_new_Enum, /*tp_new*/
   31477             :   0, /*tp_free*/
   31478             :   0, /*tp_is_gc*/
   31479             :   0, /*tp_bases*/
   31480             :   0, /*tp_mro*/
   31481             :   0, /*tp_cache*/
   31482             :   0, /*tp_subclasses*/
   31483             :   0, /*tp_weaklist*/
   31484             :   0, /*tp_del*/
   31485             :   0, /*tp_version_tag*/
   31486             :   #if PY_VERSION_HEX >= 0x030400a1
   31487             :   #if CYTHON_USE_TP_FINALIZE
   31488             :   0, /*tp_finalize*/
   31489             :   #else
   31490             :   NULL, /*tp_finalize*/
   31491             :   #endif
   31492             :   #endif
   31493             :   #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
   31494             :   0, /*tp_vectorcall*/
   31495             :   #endif
   31496             :   #if __PYX_NEED_TP_PRINT_SLOT == 1
   31497             :   0, /*tp_print*/
   31498             :   #endif
   31499             :   #if PY_VERSION_HEX >= 0x030C0000
   31500             :   0, /*tp_watched*/
   31501             :   #endif
   31502             :   #if PY_VERSION_HEX >= 0x030d00A4
   31503             :   0, /*tp_versions_used*/
   31504             :   #endif
   31505             :   #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
   31506             :   0, /*tp_pypy_flags*/
   31507             :   #endif
   31508             : };
   31509             : #endif
   31510             : static struct __pyx_vtabstruct_memoryview __pyx_vtable_memoryview;
   31511             : 
   31512         673 : static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k) {
   31513         673 :   struct __pyx_memoryview_obj *p;
   31514         673 :   PyObject *o;
   31515             :   #if CYTHON_COMPILING_IN_LIMITED_API
   31516             :   allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
   31517             :   o = alloc_func(t, 0);
   31518             :   #else
   31519         673 :   if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
   31520         673 :     o = (*t->tp_alloc)(t, 0);
   31521             :   } else {
   31522           0 :     o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
   31523             :   }
   31524         673 :   if (unlikely(!o)) return 0;
   31525             :   #endif
   31526         673 :   p = ((struct __pyx_memoryview_obj *)o);
   31527         673 :   p->__pyx_vtab = __pyx_vtabptr_memoryview;
   31528         673 :   p->obj = Py_None; Py_INCREF(Py_None);
   31529         673 :   p->_size = Py_None; Py_INCREF(Py_None);
   31530         673 :   p->_array_interface = Py_None; Py_INCREF(Py_None);
   31531         673 :   p->view.obj = NULL;
   31532         673 :   if (unlikely(__pyx_memoryview___cinit__(o, a, k) < 0)) goto bad;
   31533             :   return o;
   31534           0 :   bad:
   31535           0 :   Py_DECREF(o); o = 0;
   31536             :   return NULL;
   31537             : }
   31538             : 
   31539         673 : static void __pyx_tp_dealloc_memoryview(PyObject *o) {
   31540         673 :   struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o;
   31541             :   #if CYTHON_USE_TP_FINALIZE
   31542         673 :   if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
   31543           0 :     if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_memoryview) {
   31544           0 :       if (PyObject_CallFinalizerFromDealloc(o)) return;
   31545             :     }
   31546             :   }
   31547             :   #endif
   31548         673 :   PyObject_GC_UnTrack(o);
   31549             :   {
   31550         673 :     PyObject *etype, *eval, *etb;
   31551         673 :     PyErr_Fetch(&etype, &eval, &etb);
   31552         673 :     __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
   31553         673 :     __pyx_memoryview___dealloc__(o);
   31554         673 :     __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
   31555         673 :     PyErr_Restore(etype, eval, etb);
   31556             :   }
   31557         673 :   Py_CLEAR(p->obj);
   31558         673 :   Py_CLEAR(p->_size);
   31559         673 :   Py_CLEAR(p->_array_interface);
   31560             :   #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
   31561         673 :   (*Py_TYPE(o)->tp_free)(o);
   31562             :   #else
   31563             :   {
   31564             :     freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
   31565             :     if (tp_free) tp_free(o);
   31566             :   }
   31567             :   #endif
   31568             : }
   31569             : 
   31570           0 : static int __pyx_tp_traverse_memoryview(PyObject *o, visitproc v, void *a) {
   31571           0 :   int e;
   31572           0 :   struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o;
   31573           0 :   if (p->obj) {
   31574           0 :     e = (*v)(p->obj, a); if (e) return e;
   31575             :   }
   31576           0 :   if (p->_size) {
   31577           0 :     e = (*v)(p->_size, a); if (e) return e;
   31578             :   }
   31579           0 :   if (p->_array_interface) {
   31580           0 :     e = (*v)(p->_array_interface, a); if (e) return e;
   31581             :   }
   31582           0 :   if (p->view.obj) {
   31583           0 :     e = (*v)(p->view.obj, a); if (e) return e;
   31584             :   }
   31585             :   return 0;
   31586             : }
   31587             : 
   31588           0 : static int __pyx_tp_clear_memoryview(PyObject *o) {
   31589           0 :   PyObject* tmp;
   31590           0 :   struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o;
   31591           0 :   tmp = ((PyObject*)p->obj);
   31592           0 :   p->obj = Py_None; Py_INCREF(Py_None);
   31593           0 :   Py_XDECREF(tmp);
   31594           0 :   tmp = ((PyObject*)p->_size);
   31595           0 :   p->_size = Py_None; Py_INCREF(Py_None);
   31596           0 :   Py_XDECREF(tmp);
   31597           0 :   tmp = ((PyObject*)p->_array_interface);
   31598           0 :   p->_array_interface = Py_None; Py_INCREF(Py_None);
   31599           0 :   Py_XDECREF(tmp);
   31600           0 :   Py_CLEAR(p->view.obj);
   31601           0 :   return 0;
   31602             : }
   31603           0 : static PyObject *__pyx_sq_item_memoryview(PyObject *o, Py_ssize_t i) {
   31604           0 :   PyObject *r;
   31605           0 :   PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
   31606           0 :   r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
   31607           0 :   Py_DECREF(x);
   31608             :   return r;
   31609             : }
   31610             : 
   31611           0 : static int __pyx_mp_ass_subscript_memoryview(PyObject *o, PyObject *i, PyObject *v) {
   31612           0 :   if (v) {
   31613           0 :     return __pyx_memoryview___setitem__(o, i, v);
   31614             :   }
   31615             :   else {
   31616           0 :     __Pyx_TypeName o_type_name;
   31617           0 :     o_type_name = __Pyx_PyType_GetName(Py_TYPE(o));
   31618           0 :     PyErr_Format(PyExc_NotImplementedError,
   31619             :       "Subscript deletion not supported by " __Pyx_FMT_TYPENAME, o_type_name);
   31620           0 :     __Pyx_DECREF_TypeName(o_type_name);
   31621           0 :     return -1;
   31622             :   }
   31623             : }
   31624             : 
   31625           0 : static PyObject *__pyx_getprop___pyx_memoryview_T(PyObject *o, CYTHON_UNUSED void *x) {
   31626           0 :   return __pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(o);
   31627             : }
   31628             : 
   31629           0 : static PyObject *__pyx_getprop___pyx_memoryview_base(PyObject *o, CYTHON_UNUSED void *x) {
   31630           0 :   return __pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(o);
   31631             : }
   31632             : 
   31633           0 : static PyObject *__pyx_getprop___pyx_memoryview_shape(PyObject *o, CYTHON_UNUSED void *x) {
   31634           0 :   return __pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(o);
   31635             : }
   31636             : 
   31637           0 : static PyObject *__pyx_getprop___pyx_memoryview_strides(PyObject *o, CYTHON_UNUSED void *x) {
   31638           0 :   return __pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(o);
   31639             : }
   31640             : 
   31641           0 : static PyObject *__pyx_getprop___pyx_memoryview_suboffsets(PyObject *o, CYTHON_UNUSED void *x) {
   31642           0 :   return __pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(o);
   31643             : }
   31644             : 
   31645           0 : static PyObject *__pyx_getprop___pyx_memoryview_ndim(PyObject *o, CYTHON_UNUSED void *x) {
   31646           0 :   return __pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(o);
   31647             : }
   31648             : 
   31649           0 : static PyObject *__pyx_getprop___pyx_memoryview_itemsize(PyObject *o, CYTHON_UNUSED void *x) {
   31650           0 :   return __pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(o);
   31651             : }
   31652             : 
   31653           0 : static PyObject *__pyx_getprop___pyx_memoryview_nbytes(PyObject *o, CYTHON_UNUSED void *x) {
   31654           0 :   return __pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(o);
   31655             : }
   31656             : 
   31657           0 : static PyObject *__pyx_getprop___pyx_memoryview_size(PyObject *o, CYTHON_UNUSED void *x) {
   31658           0 :   return __pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(o);
   31659             : }
   31660             : 
   31661           0 : static PyObject *__pyx_specialmethod___pyx_memoryview___repr__(PyObject *self, CYTHON_UNUSED PyObject *arg) {
   31662           0 :   return __pyx_memoryview___repr__(self);
   31663             : }
   31664             : 
   31665             : static PyMethodDef __pyx_methods_memoryview[] = {
   31666             :   {"__repr__", (PyCFunction)__pyx_specialmethod___pyx_memoryview___repr__, METH_NOARGS|METH_COEXIST, 0},
   31667             :   {"is_c_contig", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_memoryview_is_c_contig, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
   31668             :   {"is_f_contig", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_memoryview_is_f_contig, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
   31669             :   {"copy", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_memoryview_copy, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
   31670             :   {"copy_fortran", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_memoryview_copy_fortran, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
   31671             :   {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_memoryview_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
   31672             :   {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_memoryview_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
   31673             :   {0, 0, 0, 0}
   31674             : };
   31675             : 
   31676             : static struct PyGetSetDef __pyx_getsets_memoryview[] = {
   31677             :   {(char *)"T", __pyx_getprop___pyx_memoryview_T, 0, (char *)0, 0},
   31678             :   {(char *)"base", __pyx_getprop___pyx_memoryview_base, 0, (char *)0, 0},
   31679             :   {(char *)"shape", __pyx_getprop___pyx_memoryview_shape, 0, (char *)0, 0},
   31680             :   {(char *)"strides", __pyx_getprop___pyx_memoryview_strides, 0, (char *)0, 0},
   31681             :   {(char *)"suboffsets", __pyx_getprop___pyx_memoryview_suboffsets, 0, (char *)0, 0},
   31682             :   {(char *)"ndim", __pyx_getprop___pyx_memoryview_ndim, 0, (char *)0, 0},
   31683             :   {(char *)"itemsize", __pyx_getprop___pyx_memoryview_itemsize, 0, (char *)0, 0},
   31684             :   {(char *)"nbytes", __pyx_getprop___pyx_memoryview_nbytes, 0, (char *)0, 0},
   31685             :   {(char *)"size", __pyx_getprop___pyx_memoryview_size, 0, (char *)0, 0},
   31686             :   {0, 0, 0, 0, 0}
   31687             : };
   31688             : #if CYTHON_USE_TYPE_SPECS
   31689             : #if !CYTHON_COMPILING_IN_LIMITED_API
   31690             : 
   31691             : static PyBufferProcs __pyx_tp_as_buffer_memoryview = {
   31692             :   #if PY_MAJOR_VERSION < 3
   31693             :   0, /*bf_getreadbuffer*/
   31694             :   #endif
   31695             :   #if PY_MAJOR_VERSION < 3
   31696             :   0, /*bf_getwritebuffer*/
   31697             :   #endif
   31698             :   #if PY_MAJOR_VERSION < 3
   31699             :   0, /*bf_getsegcount*/
   31700             :   #endif
   31701             :   #if PY_MAJOR_VERSION < 3
   31702             :   0, /*bf_getcharbuffer*/
   31703             :   #endif
   31704             :   __pyx_memoryview_getbuffer, /*bf_getbuffer*/
   31705             :   0, /*bf_releasebuffer*/
   31706             : };
   31707             : #endif
   31708             : static PyType_Slot __pyx_type___pyx_memoryview_slots[] = {
   31709             :   {Py_tp_dealloc, (void *)__pyx_tp_dealloc_memoryview},
   31710             :   {Py_tp_repr, (void *)__pyx_memoryview___repr__},
   31711             :   {Py_sq_length, (void *)__pyx_memoryview___len__},
   31712             :   {Py_sq_item, (void *)__pyx_sq_item_memoryview},
   31713             :   {Py_mp_length, (void *)__pyx_memoryview___len__},
   31714             :   {Py_mp_subscript, (void *)__pyx_memoryview___getitem__},
   31715             :   {Py_mp_ass_subscript, (void *)__pyx_mp_ass_subscript_memoryview},
   31716             :   {Py_tp_str, (void *)__pyx_memoryview___str__},
   31717             :   #if defined(Py_bf_getbuffer)
   31718             :   {Py_bf_getbuffer, (void *)__pyx_memoryview_getbuffer},
   31719             :   #endif
   31720             :   {Py_tp_traverse, (void *)__pyx_tp_traverse_memoryview},
   31721             :   {Py_tp_clear, (void *)__pyx_tp_clear_memoryview},
   31722             :   {Py_tp_methods, (void *)__pyx_methods_memoryview},
   31723             :   {Py_tp_getset, (void *)__pyx_getsets_memoryview},
   31724             :   {Py_tp_new, (void *)__pyx_tp_new_memoryview},
   31725             :   {0, 0},
   31726             : };
   31727             : static PyType_Spec __pyx_type___pyx_memoryview_spec = {
   31728             :   "scipy.interpolate._interpnd.memoryview",
   31729             :   sizeof(struct __pyx_memoryview_obj),
   31730             :   0,
   31731             :   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
   31732             :   __pyx_type___pyx_memoryview_slots,
   31733             : };
   31734             : #else
   31735             : 
   31736             : static PySequenceMethods __pyx_tp_as_sequence_memoryview = {
   31737             :   __pyx_memoryview___len__, /*sq_length*/
   31738             :   0, /*sq_concat*/
   31739             :   0, /*sq_repeat*/
   31740             :   __pyx_sq_item_memoryview, /*sq_item*/
   31741             :   0, /*sq_slice*/
   31742             :   0, /*sq_ass_item*/
   31743             :   0, /*sq_ass_slice*/
   31744             :   0, /*sq_contains*/
   31745             :   0, /*sq_inplace_concat*/
   31746             :   0, /*sq_inplace_repeat*/
   31747             : };
   31748             : 
   31749             : static PyMappingMethods __pyx_tp_as_mapping_memoryview = {
   31750             :   __pyx_memoryview___len__, /*mp_length*/
   31751             :   __pyx_memoryview___getitem__, /*mp_subscript*/
   31752             :   __pyx_mp_ass_subscript_memoryview, /*mp_ass_subscript*/
   31753             : };
   31754             : 
   31755             : static PyBufferProcs __pyx_tp_as_buffer_memoryview = {
   31756             :   #if PY_MAJOR_VERSION < 3
   31757             :   0, /*bf_getreadbuffer*/
   31758             :   #endif
   31759             :   #if PY_MAJOR_VERSION < 3
   31760             :   0, /*bf_getwritebuffer*/
   31761             :   #endif
   31762             :   #if PY_MAJOR_VERSION < 3
   31763             :   0, /*bf_getsegcount*/
   31764             :   #endif
   31765             :   #if PY_MAJOR_VERSION < 3
   31766             :   0, /*bf_getcharbuffer*/
   31767             :   #endif
   31768             :   __pyx_memoryview_getbuffer, /*bf_getbuffer*/
   31769             :   0, /*bf_releasebuffer*/
   31770             : };
   31771             : 
   31772             : static PyTypeObject __pyx_type___pyx_memoryview = {
   31773             :   PyVarObject_HEAD_INIT(0, 0)
   31774             :   "scipy.interpolate._interpnd.""memoryview", /*tp_name*/
   31775             :   sizeof(struct __pyx_memoryview_obj), /*tp_basicsize*/
   31776             :   0, /*tp_itemsize*/
   31777             :   __pyx_tp_dealloc_memoryview, /*tp_dealloc*/
   31778             :   #if PY_VERSION_HEX < 0x030800b4
   31779             :   0, /*tp_print*/
   31780             :   #endif
   31781             :   #if PY_VERSION_HEX >= 0x030800b4
   31782             :   0, /*tp_vectorcall_offset*/
   31783             :   #endif
   31784             :   0, /*tp_getattr*/
   31785             :   0, /*tp_setattr*/
   31786             :   #if PY_MAJOR_VERSION < 3
   31787             :   0, /*tp_compare*/
   31788             :   #endif
   31789             :   #if PY_MAJOR_VERSION >= 3
   31790             :   0, /*tp_as_async*/
   31791             :   #endif
   31792             :   __pyx_memoryview___repr__, /*tp_repr*/
   31793             :   0, /*tp_as_number*/
   31794             :   &__pyx_tp_as_sequence_memoryview, /*tp_as_sequence*/
   31795             :   &__pyx_tp_as_mapping_memoryview, /*tp_as_mapping*/
   31796             :   0, /*tp_hash*/
   31797             :   0, /*tp_call*/
   31798             :   __pyx_memoryview___str__, /*tp_str*/
   31799             :   0, /*tp_getattro*/
   31800             :   0, /*tp_setattro*/
   31801             :   &__pyx_tp_as_buffer_memoryview, /*tp_as_buffer*/
   31802             :   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
   31803             :   0, /*tp_doc*/
   31804             :   __pyx_tp_traverse_memoryview, /*tp_traverse*/
   31805             :   __pyx_tp_clear_memoryview, /*tp_clear*/
   31806             :   0, /*tp_richcompare*/
   31807             :   0, /*tp_weaklistoffset*/
   31808             :   0, /*tp_iter*/
   31809             :   0, /*tp_iternext*/
   31810             :   __pyx_methods_memoryview, /*tp_methods*/
   31811             :   0, /*tp_members*/
   31812             :   __pyx_getsets_memoryview, /*tp_getset*/
   31813             :   0, /*tp_base*/
   31814             :   0, /*tp_dict*/
   31815             :   0, /*tp_descr_get*/
   31816             :   0, /*tp_descr_set*/
   31817             :   #if !CYTHON_USE_TYPE_SPECS
   31818             :   0, /*tp_dictoffset*/
   31819             :   #endif
   31820             :   0, /*tp_init*/
   31821             :   0, /*tp_alloc*/
   31822             :   __pyx_tp_new_memoryview, /*tp_new*/
   31823             :   0, /*tp_free*/
   31824             :   0, /*tp_is_gc*/
   31825             :   0, /*tp_bases*/
   31826             :   0, /*tp_mro*/
   31827             :   0, /*tp_cache*/
   31828             :   0, /*tp_subclasses*/
   31829             :   0, /*tp_weaklist*/
   31830             :   0, /*tp_del*/
   31831             :   0, /*tp_version_tag*/
   31832             :   #if PY_VERSION_HEX >= 0x030400a1
   31833             :   #if CYTHON_USE_TP_FINALIZE
   31834             :   0, /*tp_finalize*/
   31835             :   #else
   31836             :   NULL, /*tp_finalize*/
   31837             :   #endif
   31838             :   #endif
   31839             :   #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
   31840             :   0, /*tp_vectorcall*/
   31841             :   #endif
   31842             :   #if __PYX_NEED_TP_PRINT_SLOT == 1
   31843             :   0, /*tp_print*/
   31844             :   #endif
   31845             :   #if PY_VERSION_HEX >= 0x030C0000
   31846             :   0, /*tp_watched*/
   31847             :   #endif
   31848             :   #if PY_VERSION_HEX >= 0x030d00A4
   31849             :   0, /*tp_versions_used*/
   31850             :   #endif
   31851             :   #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
   31852             :   0, /*tp_pypy_flags*/
   31853             :   #endif
   31854             : };
   31855             : #endif
   31856             : static struct __pyx_vtabstruct__memoryviewslice __pyx_vtable__memoryviewslice;
   31857             : 
   31858          94 : static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k) {
   31859          94 :   struct __pyx_memoryviewslice_obj *p;
   31860          94 :   PyObject *o = __pyx_tp_new_memoryview(t, a, k);
   31861          94 :   if (unlikely(!o)) return 0;
   31862          94 :   p = ((struct __pyx_memoryviewslice_obj *)o);
   31863          94 :   p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_memoryview*)__pyx_vtabptr__memoryviewslice;
   31864          94 :   p->from_object = Py_None; Py_INCREF(Py_None);
   31865          94 :   p->from_slice.memview = NULL;
   31866          94 :   return o;
   31867             : }
   31868             : 
   31869          94 : static void __pyx_tp_dealloc__memoryviewslice(PyObject *o) {
   31870          94 :   struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o;
   31871             :   #if CYTHON_USE_TP_FINALIZE
   31872          94 :   if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
   31873           0 :     if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc__memoryviewslice) {
   31874           0 :       if (PyObject_CallFinalizerFromDealloc(o)) return;
   31875             :     }
   31876             :   }
   31877             :   #endif
   31878          94 :   PyObject_GC_UnTrack(o);
   31879             :   {
   31880          94 :     PyObject *etype, *eval, *etb;
   31881          94 :     PyErr_Fetch(&etype, &eval, &etb);
   31882          94 :     __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
   31883          94 :     __pyx_memoryviewslice___dealloc__(o);
   31884          94 :     __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
   31885          94 :     PyErr_Restore(etype, eval, etb);
   31886             :   }
   31887          94 :   Py_CLEAR(p->from_object);
   31888          94 :   PyObject_GC_Track(o);
   31889          94 :   __pyx_tp_dealloc_memoryview(o);
   31890             : }
   31891             : 
   31892           0 : static int __pyx_tp_traverse__memoryviewslice(PyObject *o, visitproc v, void *a) {
   31893           0 :   int e;
   31894           0 :   struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o;
   31895           0 :   e = __pyx_tp_traverse_memoryview(o, v, a); if (e) return e;
   31896           0 :   if (p->from_object) {
   31897           0 :     e = (*v)(p->from_object, a); if (e) return e;
   31898             :   }
   31899             :   return 0;
   31900             : }
   31901             : 
   31902           0 : static int __pyx_tp_clear__memoryviewslice(PyObject *o) {
   31903           0 :   PyObject* tmp;
   31904           0 :   struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o;
   31905           0 :   __pyx_tp_clear_memoryview(o);
   31906           0 :   tmp = ((PyObject*)p->from_object);
   31907           0 :   p->from_object = Py_None; Py_INCREF(Py_None);
   31908           0 :   Py_XDECREF(tmp);
   31909           0 :   __PYX_XCLEAR_MEMVIEW(&p->from_slice, 1);
   31910           0 :   return 0;
   31911             : }
   31912             : 
   31913             : static PyMethodDef __pyx_methods__memoryviewslice[] = {
   31914             :   {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_memoryviewslice_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
   31915             :   {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_memoryviewslice_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
   31916             :   {0, 0, 0, 0}
   31917             : };
   31918             : #if CYTHON_USE_TYPE_SPECS
   31919             : static PyType_Slot __pyx_type___pyx_memoryviewslice_slots[] = {
   31920             :   {Py_tp_dealloc, (void *)__pyx_tp_dealloc__memoryviewslice},
   31921             :   {Py_tp_doc, (void *)PyDoc_STR("Internal class for passing memoryview slices to Python")},
   31922             :   {Py_tp_traverse, (void *)__pyx_tp_traverse__memoryviewslice},
   31923             :   {Py_tp_clear, (void *)__pyx_tp_clear__memoryviewslice},
   31924             :   {Py_tp_methods, (void *)__pyx_methods__memoryviewslice},
   31925             :   {Py_tp_new, (void *)__pyx_tp_new__memoryviewslice},
   31926             :   {0, 0},
   31927             : };
   31928             : static PyType_Spec __pyx_type___pyx_memoryviewslice_spec = {
   31929             :   "scipy.interpolate._interpnd._memoryviewslice",
   31930             :   sizeof(struct __pyx_memoryviewslice_obj),
   31931             :   0,
   31932             :   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_SEQUENCE,
   31933             :   __pyx_type___pyx_memoryviewslice_slots,
   31934             : };
   31935             : #else
   31936             : 
   31937             : static PyTypeObject __pyx_type___pyx_memoryviewslice = {
   31938             :   PyVarObject_HEAD_INIT(0, 0)
   31939             :   "scipy.interpolate._interpnd.""_memoryviewslice", /*tp_name*/
   31940             :   sizeof(struct __pyx_memoryviewslice_obj), /*tp_basicsize*/
   31941             :   0, /*tp_itemsize*/
   31942             :   __pyx_tp_dealloc__memoryviewslice, /*tp_dealloc*/
   31943             :   #if PY_VERSION_HEX < 0x030800b4
   31944             :   0, /*tp_print*/
   31945             :   #endif
   31946             :   #if PY_VERSION_HEX >= 0x030800b4
   31947             :   0, /*tp_vectorcall_offset*/
   31948             :   #endif
   31949             :   0, /*tp_getattr*/
   31950             :   0, /*tp_setattr*/
   31951             :   #if PY_MAJOR_VERSION < 3
   31952             :   0, /*tp_compare*/
   31953             :   #endif
   31954             :   #if PY_MAJOR_VERSION >= 3
   31955             :   0, /*tp_as_async*/
   31956             :   #endif
   31957             :   #if CYTHON_COMPILING_IN_PYPY || 0
   31958             :   __pyx_memoryview___repr__, /*tp_repr*/
   31959             :   #else
   31960             :   0, /*tp_repr*/
   31961             :   #endif
   31962             :   0, /*tp_as_number*/
   31963             :   0, /*tp_as_sequence*/
   31964             :   0, /*tp_as_mapping*/
   31965             :   0, /*tp_hash*/
   31966             :   0, /*tp_call*/
   31967             :   #if CYTHON_COMPILING_IN_PYPY || 0
   31968             :   __pyx_memoryview___str__, /*tp_str*/
   31969             :   #else
   31970             :   0, /*tp_str*/
   31971             :   #endif
   31972             :   0, /*tp_getattro*/
   31973             :   0, /*tp_setattro*/
   31974             :   0, /*tp_as_buffer*/
   31975             :   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_SEQUENCE, /*tp_flags*/
   31976             :   PyDoc_STR("Internal class for passing memoryview slices to Python"), /*tp_doc*/
   31977             :   __pyx_tp_traverse__memoryviewslice, /*tp_traverse*/
   31978             :   __pyx_tp_clear__memoryviewslice, /*tp_clear*/
   31979             :   0, /*tp_richcompare*/
   31980             :   0, /*tp_weaklistoffset*/
   31981             :   0, /*tp_iter*/
   31982             :   0, /*tp_iternext*/
   31983             :   __pyx_methods__memoryviewslice, /*tp_methods*/
   31984             :   0, /*tp_members*/
   31985             :   0, /*tp_getset*/
   31986             :   0, /*tp_base*/
   31987             :   0, /*tp_dict*/
   31988             :   0, /*tp_descr_get*/
   31989             :   0, /*tp_descr_set*/
   31990             :   #if !CYTHON_USE_TYPE_SPECS
   31991             :   0, /*tp_dictoffset*/
   31992             :   #endif
   31993             :   0, /*tp_init*/
   31994             :   0, /*tp_alloc*/
   31995             :   __pyx_tp_new__memoryviewslice, /*tp_new*/
   31996             :   0, /*tp_free*/
   31997             :   0, /*tp_is_gc*/
   31998             :   0, /*tp_bases*/
   31999             :   0, /*tp_mro*/
   32000             :   0, /*tp_cache*/
   32001             :   0, /*tp_subclasses*/
   32002             :   0, /*tp_weaklist*/
   32003             :   0, /*tp_del*/
   32004             :   0, /*tp_version_tag*/
   32005             :   #if PY_VERSION_HEX >= 0x030400a1
   32006             :   #if CYTHON_USE_TP_FINALIZE
   32007             :   0, /*tp_finalize*/
   32008             :   #else
   32009             :   NULL, /*tp_finalize*/
   32010             :   #endif
   32011             :   #endif
   32012             :   #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
   32013             :   0, /*tp_vectorcall*/
   32014             :   #endif
   32015             :   #if __PYX_NEED_TP_PRINT_SLOT == 1
   32016             :   0, /*tp_print*/
   32017             :   #endif
   32018             :   #if PY_VERSION_HEX >= 0x030C0000
   32019             :   0, /*tp_watched*/
   32020             :   #endif
   32021             :   #if PY_VERSION_HEX >= 0x030d00A4
   32022             :   0, /*tp_versions_used*/
   32023             :   #endif
   32024             :   #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
   32025             :   0, /*tp_pypy_flags*/
   32026             :   #endif
   32027             : };
   32028             : #endif
   32029             : 
   32030             : static PyMethodDef __pyx_methods[] = {
   32031             :   {0, 0, 0, 0}
   32032             : };
   32033             : #ifndef CYTHON_SMALL_CODE
   32034             : #if defined(__clang__)
   32035             :     #define CYTHON_SMALL_CODE
   32036             : #elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
   32037             :     #define CYTHON_SMALL_CODE __attribute__((cold))
   32038             : #else
   32039             :     #define CYTHON_SMALL_CODE
   32040             : #endif
   32041             : #endif
   32042             : /* #### Code section: pystring_table ### */
   32043             : 
   32044           3 : static int __Pyx_CreateStringTabAndInitStrings(void) {
   32045           3 :   __Pyx_StringTabEntry __pyx_string_tab[] = {
   32046           3 :     {&__pyx_kp_u_, __pyx_k_, sizeof(__pyx_k_), 0, 1, 0, 0},
   32047           3 :     {&__pyx_n_s_ASCII, __pyx_k_ASCII, sizeof(__pyx_k_ASCII), 0, 0, 1, 1},
   32048           3 :     {&__pyx_kp_s_All_dimensions_preceding_dimensi, __pyx_k_All_dimensions_preceding_dimensi, sizeof(__pyx_k_All_dimensions_preceding_dimensi), 0, 0, 1, 0},
   32049           3 :     {&__pyx_n_s_AssertionError, __pyx_k_AssertionError, sizeof(__pyx_k_AssertionError), 0, 0, 1, 1},
   32050           3 :     {&__pyx_kp_s_Buffer_view_does_not_expose_stri, __pyx_k_Buffer_view_does_not_expose_stri, sizeof(__pyx_k_Buffer_view_does_not_expose_stri), 0, 0, 1, 0},
   32051           3 :     {&__pyx_kp_s_Can_only_create_a_buffer_that_is, __pyx_k_Can_only_create_a_buffer_that_is, sizeof(__pyx_k_Can_only_create_a_buffer_that_is), 0, 0, 1, 0},
   32052           3 :     {&__pyx_kp_s_Cannot_assign_to_read_only_memor, __pyx_k_Cannot_assign_to_read_only_memor, sizeof(__pyx_k_Cannot_assign_to_read_only_memor), 0, 0, 1, 0},
   32053           3 :     {&__pyx_kp_s_Cannot_create_writable_memory_vi, __pyx_k_Cannot_create_writable_memory_vi, sizeof(__pyx_k_Cannot_create_writable_memory_vi), 0, 0, 1, 0},
   32054           3 :     {&__pyx_kp_u_Cannot_index_with_type, __pyx_k_Cannot_index_with_type, sizeof(__pyx_k_Cannot_index_with_type), 0, 1, 0, 0},
   32055           3 :     {&__pyx_kp_s_Cannot_transpose_memoryview_with, __pyx_k_Cannot_transpose_memoryview_with, sizeof(__pyx_k_Cannot_transpose_memoryview_with), 0, 0, 1, 0},
   32056           3 :     {&__pyx_n_s_CloughTocher2DInterpolator, __pyx_k_CloughTocher2DInterpolator, sizeof(__pyx_k_CloughTocher2DInterpolator), 0, 0, 1, 1},
   32057           3 :     {&__pyx_n_s_CloughTocher2DInterpolator___ini, __pyx_k_CloughTocher2DInterpolator___ini, sizeof(__pyx_k_CloughTocher2DInterpolator___ini), 0, 0, 1, 1},
   32058           3 :     {&__pyx_n_s_CloughTocher2DInterpolator__calc, __pyx_k_CloughTocher2DInterpolator__calc, sizeof(__pyx_k_CloughTocher2DInterpolator__calc), 0, 0, 1, 1},
   32059           3 :     {&__pyx_n_s_CloughTocher2DInterpolator__do_e, __pyx_k_CloughTocher2DInterpolator__do_e, sizeof(__pyx_k_CloughTocher2DInterpolator__do_e), 0, 0, 1, 1},
   32060           3 :     {&__pyx_n_s_CloughTocher2DInterpolator__eval, __pyx_k_CloughTocher2DInterpolator__eval, sizeof(__pyx_k_CloughTocher2DInterpolator__eval), 0, 0, 1, 1},
   32061           3 :     {&__pyx_n_s_CloughTocher2DInterpolator__eval_2, __pyx_k_CloughTocher2DInterpolator__eval_2, sizeof(__pyx_k_CloughTocher2DInterpolator__eval_2), 0, 0, 1, 1},
   32062           3 :     {&__pyx_n_s_CloughTocher2DInterpolator__set, __pyx_k_CloughTocher2DInterpolator__set, sizeof(__pyx_k_CloughTocher2DInterpolator__set), 0, 0, 1, 1},
   32063           3 :     {&__pyx_kp_s_CloughTocher2DInterpolator_point, __pyx_k_CloughTocher2DInterpolator_point, sizeof(__pyx_k_CloughTocher2DInterpolator_point), 0, 0, 1, 0},
   32064           3 :     {&__pyx_kp_s_Common_routines_for_interpolato, __pyx_k_Common_routines_for_interpolato, sizeof(__pyx_k_Common_routines_for_interpolato), 0, 0, 1, 0},
   32065           3 :     {&__pyx_n_s_Delaunay, __pyx_k_Delaunay, sizeof(__pyx_k_Delaunay), 0, 0, 1, 1},
   32066           3 :     {&__pyx_kp_s_Dimension_d_is_not_direct, __pyx_k_Dimension_d_is_not_direct, sizeof(__pyx_k_Dimension_d_is_not_direct), 0, 0, 1, 0},
   32067           3 :     {&__pyx_n_s_Ellipsis, __pyx_k_Ellipsis, sizeof(__pyx_k_Ellipsis), 0, 0, 1, 1},
   32068           3 :     {&__pyx_kp_s_Empty_shape_tuple_for_cython_arr, __pyx_k_Empty_shape_tuple_for_cython_arr, sizeof(__pyx_k_Empty_shape_tuple_for_cython_arr), 0, 0, 1, 0},
   32069           3 :     {&__pyx_kp_s_Expected_at_least_d_argument_s_g, __pyx_k_Expected_at_least_d_argument_s_g, sizeof(__pyx_k_Expected_at_least_d_argument_s_g), 0, 0, 1, 0},
   32070           3 :     {&__pyx_kp_s_Function_call_with_ambiguous_arg, __pyx_k_Function_call_with_ambiguous_arg, sizeof(__pyx_k_Function_call_with_ambiguous_arg), 0, 0, 1, 0},
   32071           3 :     {&__pyx_n_s_GradientEstimationWarning, __pyx_k_GradientEstimationWarning, sizeof(__pyx_k_GradientEstimationWarning), 0, 0, 1, 1},
   32072           3 :     {&__pyx_kp_u_Gradient_estimation_did_not_conv, __pyx_k_Gradient_estimation_did_not_conv, sizeof(__pyx_k_Gradient_estimation_did_not_conv), 0, 1, 0, 0},
   32073           3 :     {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_k_Incompatible_checksums_0x_x_vs_0, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0), 0, 0, 1, 0},
   32074           3 :     {&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1},
   32075           3 :     {&__pyx_kp_s_Index_out_of_bounds_axis_d, __pyx_k_Index_out_of_bounds_axis_d, sizeof(__pyx_k_Index_out_of_bounds_axis_d), 0, 0, 1, 0},
   32076           3 :     {&__pyx_kp_s_Indirect_dimensions_not_supporte, __pyx_k_Indirect_dimensions_not_supporte, sizeof(__pyx_k_Indirect_dimensions_not_supporte), 0, 0, 1, 0},
   32077           3 :     {&__pyx_kp_u_Invalid_mode_expected_c_or_fortr, __pyx_k_Invalid_mode_expected_c_or_fortr, sizeof(__pyx_k_Invalid_mode_expected_c_or_fortr), 0, 1, 0, 0},
   32078           3 :     {&__pyx_kp_u_Invalid_shape_in_axis, __pyx_k_Invalid_shape_in_axis, sizeof(__pyx_k_Invalid_shape_in_axis), 0, 1, 0, 0},
   32079           3 :     {&__pyx_n_s_LinearNDInterpolator, __pyx_k_LinearNDInterpolator, sizeof(__pyx_k_LinearNDInterpolator), 0, 0, 1, 1},
   32080           3 :     {&__pyx_n_s_LinearNDInterpolator___init, __pyx_k_LinearNDInterpolator___init, sizeof(__pyx_k_LinearNDInterpolator___init), 0, 0, 1, 1},
   32081           3 :     {&__pyx_n_s_LinearNDInterpolator__calculate, __pyx_k_LinearNDInterpolator__calculate, sizeof(__pyx_k_LinearNDInterpolator__calculate), 0, 0, 1, 1},
   32082           3 :     {&__pyx_n_s_LinearNDInterpolator__do_evaluat, __pyx_k_LinearNDInterpolator__do_evaluat, sizeof(__pyx_k_LinearNDInterpolator__do_evaluat), 0, 0, 1, 1},
   32083           3 :     {&__pyx_n_s_LinearNDInterpolator__evaluate_c, __pyx_k_LinearNDInterpolator__evaluate_c, sizeof(__pyx_k_LinearNDInterpolator__evaluate_c), 0, 0, 1, 1},
   32084           3 :     {&__pyx_n_s_LinearNDInterpolator__evaluate_d, __pyx_k_LinearNDInterpolator__evaluate_d, sizeof(__pyx_k_LinearNDInterpolator__evaluate_d), 0, 0, 1, 1},
   32085           3 :     {&__pyx_kp_s_LinearNDInterpolator_points_val, __pyx_k_LinearNDInterpolator_points_val, sizeof(__pyx_k_LinearNDInterpolator_points_val), 0, 0, 1, 0},
   32086           3 :     {&__pyx_n_s_MemoryError, __pyx_k_MemoryError, sizeof(__pyx_k_MemoryError), 0, 0, 1, 1},
   32087           3 :     {&__pyx_kp_s_MemoryView_of_r_at_0x_x, __pyx_k_MemoryView_of_r_at_0x_x, sizeof(__pyx_k_MemoryView_of_r_at_0x_x), 0, 0, 1, 0},
   32088           3 :     {&__pyx_kp_s_MemoryView_of_r_object, __pyx_k_MemoryView_of_r_object, sizeof(__pyx_k_MemoryView_of_r_object), 0, 0, 1, 0},
   32089           3 :     {&__pyx_n_s_NDInterpolatorBase, __pyx_k_NDInterpolatorBase, sizeof(__pyx_k_NDInterpolatorBase), 0, 0, 1, 1},
   32090           3 :     {&__pyx_n_s_NDInterpolatorBase___call, __pyx_k_NDInterpolatorBase___call, sizeof(__pyx_k_NDInterpolatorBase___call), 0, 0, 1, 1},
   32091           3 :     {&__pyx_n_s_NDInterpolatorBase___init, __pyx_k_NDInterpolatorBase___init, sizeof(__pyx_k_NDInterpolatorBase___init), 0, 0, 1, 1},
   32092           3 :     {&__pyx_n_s_NDInterpolatorBase__calculate_tr, __pyx_k_NDInterpolatorBase__calculate_tr, sizeof(__pyx_k_NDInterpolatorBase__calculate_tr), 0, 0, 1, 1},
   32093           3 :     {&__pyx_n_s_NDInterpolatorBase__check_call_s, __pyx_k_NDInterpolatorBase__check_call_s, sizeof(__pyx_k_NDInterpolatorBase__check_call_s), 0, 0, 1, 1},
   32094           3 :     {&__pyx_n_s_NDInterpolatorBase__preprocess_x, __pyx_k_NDInterpolatorBase__preprocess_x, sizeof(__pyx_k_NDInterpolatorBase__preprocess_x), 0, 0, 1, 1},
   32095           3 :     {&__pyx_n_s_NDInterpolatorBase__scale_x, __pyx_k_NDInterpolatorBase__scale_x, sizeof(__pyx_k_NDInterpolatorBase__scale_x), 0, 0, 1, 1},
   32096           3 :     {&__pyx_n_s_NDInterpolatorBase__set_values, __pyx_k_NDInterpolatorBase__set_values, sizeof(__pyx_k_NDInterpolatorBase__set_values), 0, 0, 1, 1},
   32097           3 :     {&__pyx_kp_s_No_matching_signature_found, __pyx_k_No_matching_signature_found, sizeof(__pyx_k_No_matching_signature_found), 0, 0, 1, 0},
   32098           3 :     {&__pyx_n_b_O, __pyx_k_O, sizeof(__pyx_k_O), 0, 0, 0, 1},
   32099           3 :     {&__pyx_kp_u_Out_of_bounds_on_buffer_access_a, __pyx_k_Out_of_bounds_on_buffer_access_a, sizeof(__pyx_k_Out_of_bounds_on_buffer_access_a), 0, 1, 0, 0},
   32100           3 :     {&__pyx_n_s_PickleError, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1},
   32101           3 :     {&__pyx_kp_u_Rescaling_is_not_supported_when, __pyx_k_Rescaling_is_not_supported_when, sizeof(__pyx_k_Rescaling_is_not_supported_when), 0, 1, 0, 0},
   32102           3 :     {&__pyx_n_s_Sequence, __pyx_k_Sequence, sizeof(__pyx_k_Sequence), 0, 0, 1, 1},
   32103           3 :     {&__pyx_kp_s_Step_may_not_be_zero_axis_d, __pyx_k_Step_may_not_be_zero_axis_d, sizeof(__pyx_k_Step_may_not_be_zero_axis_d), 0, 0, 1, 0},
   32104           3 :     {&__pyx_n_s_T, __pyx_k_T, sizeof(__pyx_k_T), 0, 0, 1, 1},
   32105           3 :     {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
   32106           3 :     {&__pyx_kp_s_Unable_to_convert_item_to_object, __pyx_k_Unable_to_convert_item_to_object, sizeof(__pyx_k_Unable_to_convert_item_to_object), 0, 0, 1, 0},
   32107           3 :     {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
   32108           3 :     {&__pyx_n_s_View_MemoryView, __pyx_k_View_MemoryView, sizeof(__pyx_k_View_MemoryView), 0, 0, 1, 1},
   32109           3 :     {&__pyx_n_s_Warning, __pyx_k_Warning, sizeof(__pyx_k_Warning), 0, 0, 1, 1},
   32110           3 :     {&__pyx_kp_s__19, __pyx_k__19, sizeof(__pyx_k__19), 0, 0, 1, 0},
   32111           3 :     {&__pyx_kp_u__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 1, 0, 0},
   32112           3 :     {&__pyx_kp_s__20, __pyx_k__20, sizeof(__pyx_k__20), 0, 0, 1, 0},
   32113           3 :     {&__pyx_kp_u__20, __pyx_k__20, sizeof(__pyx_k__20), 0, 1, 0, 0},
   32114           3 :     {&__pyx_n_s__3, __pyx_k__3, sizeof(__pyx_k__3), 0, 0, 1, 1},
   32115           3 :     {&__pyx_kp_u__6, __pyx_k__6, sizeof(__pyx_k__6), 0, 1, 0, 0},
   32116           3 :     {&__pyx_kp_u__7, __pyx_k__7, sizeof(__pyx_k__7), 0, 1, 0, 0},
   32117           3 :     {&__pyx_n_s__74, __pyx_k__74, sizeof(__pyx_k__74), 0, 0, 1, 1},
   32118           3 :     {&__pyx_n_s_abc, __pyx_k_abc, sizeof(__pyx_k_abc), 0, 0, 1, 1},
   32119           3 :     {&__pyx_n_s_allocate_buffer, __pyx_k_allocate_buffer, sizeof(__pyx_k_allocate_buffer), 0, 0, 1, 1},
   32120           3 :     {&__pyx_kp_u_and, __pyx_k_and, sizeof(__pyx_k_and), 0, 1, 0, 0},
   32121           3 :     {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
   32122           3 :     {&__pyx_n_s_asanyarray, __pyx_k_asanyarray, sizeof(__pyx_k_asanyarray), 0, 0, 1, 1},
   32123           3 :     {&__pyx_n_s_asarray, __pyx_k_asarray, sizeof(__pyx_k_asarray), 0, 0, 1, 1},
   32124           3 :     {&__pyx_n_s_ascontiguousarray, __pyx_k_ascontiguousarray, sizeof(__pyx_k_ascontiguousarray), 0, 0, 1, 1},
   32125           3 :     {&__pyx_n_s_asyncio_coroutines, __pyx_k_asyncio_coroutines, sizeof(__pyx_k_asyncio_coroutines), 0, 0, 1, 1},
   32126           3 :     {&__pyx_n_s_axis, __pyx_k_axis, sizeof(__pyx_k_axis), 0, 0, 1, 1},
   32127           3 :     {&__pyx_n_s_base, __pyx_k_base, sizeof(__pyx_k_base), 0, 0, 1, 1},
   32128           3 :     {&__pyx_n_s_broadcast_arrays, __pyx_k_broadcast_arrays, sizeof(__pyx_k_broadcast_arrays), 0, 0, 1, 1},
   32129           3 :     {&__pyx_n_s_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 0, 1, 1},
   32130           3 :     {&__pyx_n_u_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 1, 0, 1},
   32131           3 :     {&__pyx_n_s_calculate_triangulation, __pyx_k_calculate_triangulation, sizeof(__pyx_k_calculate_triangulation), 0, 0, 1, 1},
   32132           3 :     {&__pyx_n_s_call, __pyx_k_call, sizeof(__pyx_k_call), 0, 0, 1, 1},
   32133           3 :     {&__pyx_n_s_check_call_shape, __pyx_k_check_call_shape, sizeof(__pyx_k_check_call_shape), 0, 0, 1, 1},
   32134           3 :     {&__pyx_n_s_class, __pyx_k_class, sizeof(__pyx_k_class), 0, 0, 1, 1},
   32135           3 :     {&__pyx_n_s_class_getitem, __pyx_k_class_getitem, sizeof(__pyx_k_class_getitem), 0, 0, 1, 1},
   32136           3 :     {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
   32137           3 :     {&__pyx_n_s_collections, __pyx_k_collections, sizeof(__pyx_k_collections), 0, 0, 1, 1},
   32138           3 :     {&__pyx_kp_s_collections_abc, __pyx_k_collections_abc, sizeof(__pyx_k_collections_abc), 0, 0, 1, 0},
   32139           3 :     {&__pyx_n_s_complex128, __pyx_k_complex128, sizeof(__pyx_k_complex128), 0, 0, 1, 1},
   32140           3 :     {&__pyx_n_s_complexfloating, __pyx_k_complexfloating, sizeof(__pyx_k_complexfloating), 0, 0, 1, 1},
   32141           3 :     {&__pyx_kp_s_contiguous_and_direct, __pyx_k_contiguous_and_direct, sizeof(__pyx_k_contiguous_and_direct), 0, 0, 1, 0},
   32142           3 :     {&__pyx_kp_s_contiguous_and_indirect, __pyx_k_contiguous_and_indirect, sizeof(__pyx_k_contiguous_and_indirect), 0, 0, 1, 0},
   32143           3 :     {&__pyx_kp_u_coordinate_arrays_do_not_have_th, __pyx_k_coordinate_arrays_do_not_have_th, sizeof(__pyx_k_coordinate_arrays_do_not_have_th), 0, 1, 0, 0},
   32144           3 :     {&__pyx_n_s_count, __pyx_k_count, sizeof(__pyx_k_count), 0, 0, 1, 1},
   32145           3 :     {&__pyx_n_s_defaults, __pyx_k_defaults, sizeof(__pyx_k_defaults), 0, 0, 1, 1},
   32146           3 :     {&__pyx_n_s_df, __pyx_k_df, sizeof(__pyx_k_df), 0, 0, 1, 1},
   32147           3 :     {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1},
   32148           3 :     {&__pyx_kp_u_different_number_of_values_and_p, __pyx_k_different_number_of_values_and_p, sizeof(__pyx_k_different_number_of_values_and_p), 0, 1, 0, 0},
   32149           3 :     {&__pyx_kp_u_disable, __pyx_k_disable, sizeof(__pyx_k_disable), 0, 1, 0, 0},
   32150           3 :     {&__pyx_n_s_do_evaluate, __pyx_k_do_evaluate, sizeof(__pyx_k_do_evaluate), 0, 0, 1, 1},
   32151           3 :     {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1},
   32152           3 :     {&__pyx_n_s_double, __pyx_k_double, sizeof(__pyx_k_double), 0, 0, 1, 1},
   32153           3 :     {&__pyx_kp_s_double_complex, __pyx_k_double_complex, sizeof(__pyx_k_double_complex), 0, 0, 1, 0},
   32154           3 :     {&__pyx_n_s_dtype, __pyx_k_dtype, sizeof(__pyx_k_dtype), 0, 0, 1, 1},
   32155           3 :     {&__pyx_n_s_dtype_is_object, __pyx_k_dtype_is_object, sizeof(__pyx_k_dtype_is_object), 0, 0, 1, 1},
   32156           3 :     {&__pyx_n_s_dummy, __pyx_k_dummy, sizeof(__pyx_k_dummy), 0, 0, 1, 1},
   32157           3 :     {&__pyx_n_s_empty, __pyx_k_empty, sizeof(__pyx_k_empty), 0, 0, 1, 1},
   32158           3 :     {&__pyx_kp_u_enable, __pyx_k_enable, sizeof(__pyx_k_enable), 0, 1, 0, 0},
   32159           3 :     {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1},
   32160           3 :     {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1},
   32161           3 :     {&__pyx_n_s_eps, __pyx_k_eps, sizeof(__pyx_k_eps), 0, 0, 1, 1},
   32162           3 :     {&__pyx_n_s_eps_broad, __pyx_k_eps_broad, sizeof(__pyx_k_eps_broad), 0, 0, 1, 1},
   32163           3 :     {&__pyx_n_s_error, __pyx_k_error, sizeof(__pyx_k_error), 0, 0, 1, 1},
   32164           3 :     {&__pyx_n_s_estimate_gradients_2d_global, __pyx_k_estimate_gradients_2d_global, sizeof(__pyx_k_estimate_gradients_2d_global), 0, 0, 1, 1},
   32165           3 :     {&__pyx_n_s_evaluate_complex, __pyx_k_evaluate_complex, sizeof(__pyx_k_evaluate_complex), 0, 0, 1, 1},
   32166           3 :     {&__pyx_n_s_evaluate_double, __pyx_k_evaluate_double, sizeof(__pyx_k_evaluate_double), 0, 0, 1, 1},
   32167           3 :     {&__pyx_n_s_f, __pyx_k_f, sizeof(__pyx_k_f), 0, 0, 1, 1},
   32168           3 :     {&__pyx_n_s_fill_value, __pyx_k_fill_value, sizeof(__pyx_k_fill_value), 0, 0, 1, 1},
   32169           3 :     {&__pyx_n_s_flags, __pyx_k_flags, sizeof(__pyx_k_flags), 0, 0, 1, 1},
   32170           3 :     {&__pyx_n_s_float64, __pyx_k_float64, sizeof(__pyx_k_float64), 0, 0, 1, 1},
   32171           3 :     {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1},
   32172           3 :     {&__pyx_n_s_fortran, __pyx_k_fortran, sizeof(__pyx_k_fortran), 0, 0, 1, 1},
   32173           3 :     {&__pyx_n_u_fortran, __pyx_k_fortran, sizeof(__pyx_k_fortran), 0, 1, 0, 1},
   32174           3 :     {&__pyx_n_s_fused_sigindex, __pyx_k_fused_sigindex, sizeof(__pyx_k_fused_sigindex), 0, 0, 1, 1},
   32175           3 :     {&__pyx_kp_u_gc, __pyx_k_gc, sizeof(__pyx_k_gc), 0, 1, 0, 0},
   32176           3 :     {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1},
   32177           3 :     {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
   32178           3 :     {&__pyx_kp_u_got, __pyx_k_got, sizeof(__pyx_k_got), 0, 1, 0, 0},
   32179           3 :     {&__pyx_kp_u_got_differing_extents_in_dimensi, __pyx_k_got_differing_extents_in_dimensi, sizeof(__pyx_k_got_differing_extents_in_dimensi), 0, 1, 0, 0},
   32180           3 :     {&__pyx_n_s_grad, __pyx_k_grad, sizeof(__pyx_k_grad), 0, 0, 1, 1},
   32181           3 :     {&__pyx_kp_s_home_czgdp18079_Quansight_scipy, __pyx_k_home_czgdp18079_Quansight_scipy, sizeof(__pyx_k_home_czgdp18079_Quansight_scipy), 0, 0, 1, 0},
   32182           3 :     {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
   32183           3 :     {&__pyx_n_s_id, __pyx_k_id, sizeof(__pyx_k_id), 0, 0, 1, 1},
   32184           3 :     {&__pyx_n_s_imag, __pyx_k_imag, sizeof(__pyx_k_imag), 0, 0, 1, 1},
   32185           3 :     {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
   32186           3 :     {&__pyx_n_s_index, __pyx_k_index, sizeof(__pyx_k_index), 0, 0, 1, 1},
   32187           3 :     {&__pyx_n_s_info, __pyx_k_info, sizeof(__pyx_k_info), 0, 0, 1, 1},
   32188           3 :     {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1},
   32189           3 :     {&__pyx_n_s_init_subclass, __pyx_k_init_subclass, sizeof(__pyx_k_init_subclass), 0, 0, 1, 1},
   32190           3 :     {&__pyx_n_s_initializing, __pyx_k_initializing, sizeof(__pyx_k_initializing), 0, 0, 1, 1},
   32191           3 :     {&__pyx_kp_u_input_data_must_be_at_least_2_D, __pyx_k_input_data_must_be_at_least_2_D, sizeof(__pyx_k_input_data_must_be_at_least_2_D), 0, 1, 0, 0},
   32192           3 :     {&__pyx_n_s_interpolation_points_shape, __pyx_k_interpolation_points_shape, sizeof(__pyx_k_interpolation_points_shape), 0, 0, 1, 1},
   32193           3 :     {&__pyx_kp_u_invalid_shape_for_input_data_poi, __pyx_k_invalid_shape_for_input_data_poi, sizeof(__pyx_k_invalid_shape_for_input_data_poi), 0, 1, 0, 0},
   32194           3 :     {&__pyx_n_s_is_complex, __pyx_k_is_complex, sizeof(__pyx_k_is_complex), 0, 0, 1, 1},
   32195           3 :     {&__pyx_n_s_is_coroutine, __pyx_k_is_coroutine, sizeof(__pyx_k_is_coroutine), 0, 0, 1, 1},
   32196           3 :     {&__pyx_kp_u_isenabled, __pyx_k_isenabled, sizeof(__pyx_k_isenabled), 0, 1, 0, 0},
   32197           3 :     {&__pyx_n_s_isimplex, __pyx_k_isimplex, sizeof(__pyx_k_isimplex), 0, 0, 1, 1},
   32198           3 :     {&__pyx_n_s_issubdtype, __pyx_k_issubdtype, sizeof(__pyx_k_issubdtype), 0, 0, 1, 1},
   32199           3 :     {&__pyx_n_s_itemsize, __pyx_k_itemsize, sizeof(__pyx_k_itemsize), 0, 0, 1, 1},
   32200           3 :     {&__pyx_kp_s_itemsize_0_for_cython_array, __pyx_k_itemsize_0_for_cython_array, sizeof(__pyx_k_itemsize_0_for_cython_array), 0, 0, 1, 0},
   32201           3 :     {&__pyx_n_s_j, __pyx_k_j, sizeof(__pyx_k_j), 0, 0, 1, 1},
   32202           3 :     {&__pyx_n_s_k, __pyx_k_k, sizeof(__pyx_k_k), 0, 0, 1, 1},
   32203           3 :     {&__pyx_n_s_kwargs, __pyx_k_kwargs, sizeof(__pyx_k_kwargs), 0, 0, 1, 1},
   32204           3 :     {&__pyx_n_s_m, __pyx_k_m, sizeof(__pyx_k_m), 0, 0, 1, 1},
   32205           3 :     {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
   32206           3 :     {&__pyx_n_s_maxiter, __pyx_k_maxiter, sizeof(__pyx_k_maxiter), 0, 0, 1, 1},
   32207           3 :     {&__pyx_n_s_maxiter_2, __pyx_k_maxiter_2, sizeof(__pyx_k_maxiter_2), 0, 0, 1, 1},
   32208           3 :     {&__pyx_n_s_mean, __pyx_k_mean, sizeof(__pyx_k_mean), 0, 0, 1, 1},
   32209           3 :     {&__pyx_n_s_memview, __pyx_k_memview, sizeof(__pyx_k_memview), 0, 0, 1, 1},
   32210           3 :     {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1},
   32211           3 :     {&__pyx_n_s_mode, __pyx_k_mode, sizeof(__pyx_k_mode), 0, 0, 1, 1},
   32212           3 :     {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1},
   32213           3 :     {&__pyx_n_s_mro_entries, __pyx_k_mro_entries, sizeof(__pyx_k_mro_entries), 0, 0, 1, 1},
   32214           3 :     {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
   32215           3 :     {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1},
   32216           3 :     {&__pyx_n_s_nan, __pyx_k_nan, sizeof(__pyx_k_nan), 0, 0, 1, 1},
   32217           3 :     {&__pyx_n_s_ndim, __pyx_k_ndim, sizeof(__pyx_k_ndim), 0, 0, 1, 1},
   32218           3 :     {&__pyx_n_s_ndim_coords_from_arrays, __pyx_k_ndim_coords_from_arrays, sizeof(__pyx_k_ndim_coords_from_arrays), 0, 0, 1, 1},
   32219           3 :     {&__pyx_n_s_need_contiguous, __pyx_k_need_contiguous, sizeof(__pyx_k_need_contiguous), 0, 0, 1, 1},
   32220           3 :     {&__pyx_n_s_need_values, __pyx_k_need_values, sizeof(__pyx_k_need_values), 0, 0, 1, 1},
   32221           3 :     {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1},
   32222           3 :     {&__pyx_kp_s_no_default___reduce___due_to_non, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0},
   32223           3 :     {&__pyx_n_s_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 0, 1, 1},
   32224           3 :     {&__pyx_n_s_npoints, __pyx_k_npoints, sizeof(__pyx_k_npoints), 0, 0, 1, 1},
   32225           3 :     {&__pyx_kp_u_number_of_dimensions_in_xi_does, __pyx_k_number_of_dimensions_in_xi_does, sizeof(__pyx_k_number_of_dimensions_in_xi_does), 0, 1, 0, 0},
   32226           3 :     {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1},
   32227           3 :     {&__pyx_n_s_nvalues, __pyx_k_nvalues, sizeof(__pyx_k_nvalues), 0, 0, 1, 1},
   32228           3 :     {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1},
   32229           3 :     {&__pyx_n_s_offset, __pyx_k_offset, sizeof(__pyx_k_offset), 0, 0, 1, 1},
   32230           3 :     {&__pyx_n_s_out, __pyx_k_out, sizeof(__pyx_k_out), 0, 0, 1, 1},
   32231           3 :     {&__pyx_n_s_pack, __pyx_k_pack, sizeof(__pyx_k_pack), 0, 0, 1, 1},
   32232           3 :     {&__pyx_n_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1},
   32233           3 :     {&__pyx_n_s_points, __pyx_k_points, sizeof(__pyx_k_points), 0, 0, 1, 1},
   32234           3 :     {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1},
   32235           3 :     {&__pyx_n_s_preprocess_xi, __pyx_k_preprocess_xi, sizeof(__pyx_k_preprocess_xi), 0, 0, 1, 1},
   32236           3 :     {&__pyx_n_s_prod, __pyx_k_prod, sizeof(__pyx_k_prod), 0, 0, 1, 1},
   32237           3 :     {&__pyx_n_s_ptp, __pyx_k_ptp, sizeof(__pyx_k_ptp), 0, 0, 1, 1},
   32238           3 :     {&__pyx_n_s_pyx_PickleError, __pyx_k_pyx_PickleError, sizeof(__pyx_k_pyx_PickleError), 0, 0, 1, 1},
   32239           3 :     {&__pyx_n_s_pyx_checksum, __pyx_k_pyx_checksum, sizeof(__pyx_k_pyx_checksum), 0, 0, 1, 1},
   32240           3 :     {&__pyx_n_s_pyx_result, __pyx_k_pyx_result, sizeof(__pyx_k_pyx_result), 0, 0, 1, 1},
   32241           3 :     {&__pyx_n_s_pyx_state, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1},
   32242           3 :     {&__pyx_n_s_pyx_type, __pyx_k_pyx_type, sizeof(__pyx_k_pyx_type), 0, 0, 1, 1},
   32243           3 :     {&__pyx_n_s_pyx_unpickle_Enum, __pyx_k_pyx_unpickle_Enum, sizeof(__pyx_k_pyx_unpickle_Enum), 0, 0, 1, 1},
   32244           3 :     {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
   32245           3 :     {&__pyx_n_s_qhull, __pyx_k_qhull, sizeof(__pyx_k_qhull), 0, 0, 1, 1},
   32246           3 :     {&__pyx_n_s_qhull_2, __pyx_k_qhull_2, sizeof(__pyx_k_qhull_2), 0, 0, 1, 1},
   32247           3 :     {&__pyx_n_s_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1},
   32248           3 :     {&__pyx_n_s_r, __pyx_k_r, sizeof(__pyx_k_r), 0, 0, 1, 1},
   32249           3 :     {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
   32250           3 :     {&__pyx_n_s_real, __pyx_k_real, sizeof(__pyx_k_real), 0, 0, 1, 1},
   32251           3 :     {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
   32252           3 :     {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
   32253           3 :     {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
   32254           3 :     {&__pyx_n_s_register, __pyx_k_register, sizeof(__pyx_k_register), 0, 0, 1, 1},
   32255           3 :     {&__pyx_n_s_rescale, __pyx_k_rescale, sizeof(__pyx_k_rescale), 0, 0, 1, 1},
   32256           3 :     {&__pyx_n_s_reshape, __pyx_k_reshape, sizeof(__pyx_k_reshape), 0, 0, 1, 1},
   32257           3 :     {&__pyx_n_s_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 0, 1, 1},
   32258           3 :     {&__pyx_n_s_scale, __pyx_k_scale, sizeof(__pyx_k_scale), 0, 0, 1, 1},
   32259           3 :     {&__pyx_n_s_scale_x, __pyx_k_scale_x, sizeof(__pyx_k_scale_x), 0, 0, 1, 1},
   32260           3 :     {&__pyx_n_s_scipy, __pyx_k_scipy, sizeof(__pyx_k_scipy), 0, 0, 1, 1},
   32261           3 :     {&__pyx_n_s_scipy_interpolate__interpnd, __pyx_k_scipy_interpolate__interpnd, sizeof(__pyx_k_scipy_interpolate__interpnd), 0, 0, 1, 1},
   32262           3 :     {&__pyx_n_s_scipy_spatial__qhull, __pyx_k_scipy_spatial__qhull, sizeof(__pyx_k_scipy_spatial__qhull), 0, 0, 1, 1},
   32263           3 :     {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1},
   32264           3 :     {&__pyx_n_s_set_name, __pyx_k_set_name, sizeof(__pyx_k_set_name), 0, 0, 1, 1},
   32265           3 :     {&__pyx_n_s_set_values, __pyx_k_set_values, sizeof(__pyx_k_set_values), 0, 0, 1, 1},
   32266           3 :     {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
   32267           3 :     {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
   32268           3 :     {&__pyx_n_s_shape, __pyx_k_shape, sizeof(__pyx_k_shape), 0, 0, 1, 1},
   32269           3 :     {&__pyx_n_s_signatures, __pyx_k_signatures, sizeof(__pyx_k_signatures), 0, 0, 1, 1},
   32270           3 :     {&__pyx_n_s_simplices, __pyx_k_simplices, sizeof(__pyx_k_simplices), 0, 0, 1, 1},
   32271           3 :     {&__pyx_n_s_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 0, 1, 1},
   32272           3 :     {&__pyx_n_s_spatial, __pyx_k_spatial, sizeof(__pyx_k_spatial), 0, 0, 1, 1},
   32273           3 :     {&__pyx_n_s_spec, __pyx_k_spec, sizeof(__pyx_k_spec), 0, 0, 1, 1},
   32274           3 :     {&__pyx_n_s_split, __pyx_k_split, sizeof(__pyx_k_split), 0, 0, 1, 1},
   32275           3 :     {&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1},
   32276           3 :     {&__pyx_n_s_step, __pyx_k_step, sizeof(__pyx_k_step), 0, 0, 1, 1},
   32277           3 :     {&__pyx_n_s_stop, __pyx_k_stop, sizeof(__pyx_k_stop), 0, 0, 1, 1},
   32278           3 :     {&__pyx_kp_s_strided_and_direct, __pyx_k_strided_and_direct, sizeof(__pyx_k_strided_and_direct), 0, 0, 1, 0},
   32279           3 :     {&__pyx_kp_s_strided_and_direct_or_indirect, __pyx_k_strided_and_direct_or_indirect, sizeof(__pyx_k_strided_and_direct_or_indirect), 0, 0, 1, 0},
   32280           3 :     {&__pyx_kp_s_strided_and_indirect, __pyx_k_strided_and_indirect, sizeof(__pyx_k_strided_and_indirect), 0, 0, 1, 0},
   32281           3 :     {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0},
   32282           3 :     {&__pyx_n_s_strip, __pyx_k_strip, sizeof(__pyx_k_strip), 0, 0, 1, 1},
   32283           3 :     {&__pyx_n_s_struct, __pyx_k_struct, sizeof(__pyx_k_struct), 0, 0, 1, 1},
   32284           3 :     {&__pyx_n_s_super, __pyx_k_super, sizeof(__pyx_k_super), 0, 0, 1, 1},
   32285           3 :     {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1},
   32286           3 :     {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
   32287           3 :     {&__pyx_kp_u_this_mode_of_interpolation_avail, __pyx_k_this_mode_of_interpolation_avail, sizeof(__pyx_k_this_mode_of_interpolation_avail), 0, 1, 0, 0},
   32288           3 :     {&__pyx_n_s_tol, __pyx_k_tol, sizeof(__pyx_k_tol), 0, 0, 1, 1},
   32289           3 :     {&__pyx_n_s_tol_2, __pyx_k_tol_2, sizeof(__pyx_k_tol_2), 0, 0, 1, 1},
   32290           3 :     {&__pyx_n_s_transpose, __pyx_k_transpose, sizeof(__pyx_k_transpose), 0, 0, 1, 1},
   32291           3 :     {&__pyx_n_s_tri, __pyx_k_tri, sizeof(__pyx_k_tri), 0, 0, 1, 1},
   32292           3 :     {&__pyx_kp_s_unable_to_allocate_array_data, __pyx_k_unable_to_allocate_array_data, sizeof(__pyx_k_unable_to_allocate_array_data), 0, 0, 1, 0},
   32293           3 :     {&__pyx_kp_s_unable_to_allocate_shape_and_str, __pyx_k_unable_to_allocate_shape_and_str, sizeof(__pyx_k_unable_to_allocate_shape_and_str), 0, 0, 1, 0},
   32294           3 :     {&__pyx_n_s_unpack, __pyx_k_unpack, sizeof(__pyx_k_unpack), 0, 0, 1, 1},
   32295           3 :     {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},
   32296           3 :     {&__pyx_n_s_values, __pyx_k_values, sizeof(__pyx_k_values), 0, 0, 1, 1},
   32297           3 :     {&__pyx_n_s_values_shape, __pyx_k_values_shape, sizeof(__pyx_k_values_shape), 0, 0, 1, 1},
   32298           3 :     {&__pyx_n_s_version_info, __pyx_k_version_info, sizeof(__pyx_k_version_info), 0, 0, 1, 1},
   32299           3 :     {&__pyx_n_s_w, __pyx_k_w, sizeof(__pyx_k_w), 0, 0, 1, 1},
   32300           3 :     {&__pyx_n_s_warn, __pyx_k_warn, sizeof(__pyx_k_warn), 0, 0, 1, 1},
   32301           3 :     {&__pyx_n_s_warnings, __pyx_k_warnings, sizeof(__pyx_k_warnings), 0, 0, 1, 1},
   32302           3 :     {&__pyx_n_s_xi, __pyx_k_xi, sizeof(__pyx_k_xi), 0, 0, 1, 1},
   32303           3 :     {&__pyx_n_s_y, __pyx_k_y, sizeof(__pyx_k_y), 0, 0, 1, 1},
   32304           3 :     {&__pyx_kp_u_y_has_a_wrong_number_of_items, __pyx_k_y_has_a_wrong_number_of_items, sizeof(__pyx_k_y_has_a_wrong_number_of_items), 0, 1, 0, 0},
   32305           3 :     {&__pyx_n_s_zeros, __pyx_k_zeros, sizeof(__pyx_k_zeros), 0, 0, 1, 1},
   32306             :     {0, 0, 0, 0, 0, 0, 0}
   32307             :   };
   32308           3 :   return __Pyx_InitStrings(__pyx_string_tab);
   32309             : }
   32310             : /* #### Code section: cached_builtins ### */
   32311           3 : static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
   32312           3 :   __pyx_builtin_Warning = __Pyx_GetBuiltinName(__pyx_n_s_Warning); if (!__pyx_builtin_Warning) __PYX_ERR(0, 373, __pyx_L1_error)
   32313           3 :   __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 69, __pyx_L1_error)
   32314           3 :   __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 186, __pyx_L1_error)
   32315           3 :   __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 190, __pyx_L1_error)
   32316           3 :   __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 314, __pyx_L1_error)
   32317           3 :   __pyx_builtin___import__ = __Pyx_GetBuiltinName(__pyx_n_s_import); if (!__pyx_builtin___import__) __PYX_ERR(1, 100, __pyx_L1_error)
   32318           3 :   __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(1, 156, __pyx_L1_error)
   32319           3 :   __pyx_builtin_AssertionError = __Pyx_GetBuiltinName(__pyx_n_s_AssertionError); if (!__pyx_builtin_AssertionError) __PYX_ERR(1, 373, __pyx_L1_error)
   32320           3 :   __pyx_builtin_Ellipsis = __Pyx_GetBuiltinName(__pyx_n_s_Ellipsis); if (!__pyx_builtin_Ellipsis) __PYX_ERR(1, 408, __pyx_L1_error)
   32321           3 :   __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(1, 618, __pyx_L1_error)
   32322           3 :   __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(1, 914, __pyx_L1_error)
   32323             :   return 0;
   32324             :   __pyx_L1_error:;
   32325             :   return -1;
   32326             : }
   32327             : /* #### Code section: cached_constants ### */
   32328             : 
   32329           3 : static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
   32330             :   __Pyx_RefNannyDeclarations
   32331           3 :   __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
   32332             : 
   32333             :   /* "View.MemoryView":582
   32334             :  *     def suboffsets(self):
   32335             :  *         if self.view.suboffsets == NULL:
   32336             :  *             return (-1,) * self.view.ndim             # <<<<<<<<<<<<<<
   32337             :  * 
   32338             :  *         return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])
   32339             :  */
   32340           3 :   __pyx_tuple__4 = PyTuple_New(1); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(1, 582, __pyx_L1_error)
   32341           3 :   __Pyx_GOTREF(__pyx_tuple__4);
   32342           3 :   __Pyx_INCREF(__pyx_int_neg_1);
   32343           3 :   __Pyx_GIVEREF(__pyx_int_neg_1);
   32344           3 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_tuple__4, 0, __pyx_int_neg_1)) __PYX_ERR(1, 582, __pyx_L1_error);
   32345           3 :   __Pyx_GIVEREF(__pyx_tuple__4);
   32346             : 
   32347             :   /* "View.MemoryView":679
   32348             :  *     tup = <tuple>index if isinstance(index, tuple) else (index,)
   32349             :  * 
   32350             :  *     result = [slice(None)] * ndim             # <<<<<<<<<<<<<<
   32351             :  *     have_slices = False
   32352             :  *     seen_ellipsis = False
   32353             :  */
   32354           3 :   __pyx_slice__5 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__5)) __PYX_ERR(1, 679, __pyx_L1_error)
   32355           3 :   __Pyx_GOTREF(__pyx_slice__5);
   32356           3 :   __Pyx_GIVEREF(__pyx_slice__5);
   32357             : 
   32358             :   /* "(tree fragment)":4
   32359             :  *     cdef object __pyx_PickleError
   32360             :  *     cdef object __pyx_result
   32361             :  *     if __pyx_checksum not in (0x82a3537, 0x6ae9995, 0xb068931):             # <<<<<<<<<<<<<<
   32362             :  *         from pickle import PickleError as __pyx_PickleError
   32363             :  *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x82a3537, 0x6ae9995, 0xb068931) = (name))" % __pyx_checksum
   32364             :  */
   32365           3 :   __pyx_tuple__8 = PyTuple_Pack(3, __pyx_int_136983863, __pyx_int_112105877, __pyx_int_184977713); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(1, 4, __pyx_L1_error)
   32366           3 :   __Pyx_GOTREF(__pyx_tuple__8);
   32367           3 :   __Pyx_GIVEREF(__pyx_tuple__8);
   32368             : 
   32369             :   /* "scipy/interpolate/_interpnd.pyx":69
   32370             :  *             # Precomputed triangulation was passed in
   32371             :  *             if rescale:
   32372             :  *                 raise ValueError("Rescaling is not supported when passing "             # <<<<<<<<<<<<<<
   32373             :  *                                  "a Delaunay triangulation as ``points``.")
   32374             :  *             self.tri = points
   32375             :  */
   32376           3 :   __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_u_Rescaling_is_not_supported_when); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 69, __pyx_L1_error)
   32377           3 :   __Pyx_GOTREF(__pyx_tuple__9);
   32378           3 :   __Pyx_GIVEREF(__pyx_tuple__9);
   32379             : 
   32380             :   /* "scipy/interpolate/_interpnd.pyx":107
   32381             :  *         _check_init_shape(self.points, values, ndim=ndim)
   32382             :  * 
   32383             :  *         self.values_shape = values.shape[1:]             # <<<<<<<<<<<<<<
   32384             :  *         if values.ndim == 1:
   32385             :  *             self.values = values[:,None]
   32386             :  */
   32387           3 :   __pyx_slice__10 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__10)) __PYX_ERR(0, 107, __pyx_L1_error)
   32388           3 :   __Pyx_GOTREF(__pyx_slice__10);
   32389           3 :   __Pyx_GIVEREF(__pyx_slice__10);
   32390             : 
   32391             :   /* "scipy/interpolate/_interpnd.pyx":109
   32392             :  *         self.values_shape = values.shape[1:]
   32393             :  *         if values.ndim == 1:
   32394             :  *             self.values = values[:,None]             # <<<<<<<<<<<<<<
   32395             :  *         elif values.ndim == 2:
   32396             :  *             self.values = values
   32397             :  */
   32398           3 :   __pyx_tuple__11 = PyTuple_Pack(2, __pyx_slice__5, Py_None); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 109, __pyx_L1_error)
   32399           3 :   __Pyx_GOTREF(__pyx_tuple__11);
   32400           3 :   __Pyx_GIVEREF(__pyx_tuple__11);
   32401             : 
   32402             :   /* "scipy/interpolate/_interpnd.pyx":133
   32403             :  *         xi = np.asanyarray(xi)
   32404             :  *         if xi.shape[-1] != self.points.shape[1]:
   32405             :  *             raise ValueError("number of dimensions in xi does not match x")             # <<<<<<<<<<<<<<
   32406             :  *         return xi
   32407             :  * 
   32408             :  */
   32409           3 :   __pyx_tuple__12 = PyTuple_Pack(1, __pyx_kp_u_number_of_dimensions_in_xi_does); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 133, __pyx_L1_error)
   32410           3 :   __Pyx_GOTREF(__pyx_tuple__12);
   32411           3 :   __Pyx_GIVEREF(__pyx_tuple__12);
   32412             : 
   32413             :   /* "scipy/interpolate/_interpnd.pyx":170
   32414             :  *             r = self._evaluate_double(xi)
   32415             :  * 
   32416             :  *         return np.asarray(r).reshape(interpolation_points_shape[:-1] + self.values_shape)             # <<<<<<<<<<<<<<
   32417             :  * 
   32418             :  * 
   32419             :  */
   32420           3 :   __pyx_slice__13 = PySlice_New(Py_None, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__13)) __PYX_ERR(0, 170, __pyx_L1_error)
   32421           3 :   __Pyx_GOTREF(__pyx_slice__13);
   32422           3 :   __Pyx_GIVEREF(__pyx_slice__13);
   32423             : 
   32424             :   /* "scipy/interpolate/_interpnd.pyx":188
   32425             :  *         for j in range(1, n):
   32426             :  *             if p[j].shape != p[0].shape:
   32427             :  *                 raise ValueError("coordinate arrays do not have the same shape")             # <<<<<<<<<<<<<<
   32428             :  *         points = np.empty(p[0].shape + (len(points),), dtype=float)
   32429             :  *         for j, item in enumerate(p):
   32430             :  */
   32431           3 :   __pyx_tuple__14 = PyTuple_Pack(1, __pyx_kp_u_coordinate_arrays_do_not_have_th); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(0, 188, __pyx_L1_error)
   32432           3 :   __Pyx_GOTREF(__pyx_tuple__14);
   32433           3 :   __Pyx_GIVEREF(__pyx_tuple__14);
   32434             : 
   32435             :   /* "scipy/interpolate/_interpnd.pyx":196
   32436             :  *         if points.ndim == 1:
   32437             :  *             if ndim is None:
   32438             :  *                 points = points.reshape(-1, 1)             # <<<<<<<<<<<<<<
   32439             :  *             else:
   32440             :  *                 points = points.reshape(-1, ndim)
   32441             :  */
   32442           3 :   __pyx_tuple__15 = PyTuple_Pack(2, __pyx_int_neg_1, __pyx_int_1); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 196, __pyx_L1_error)
   32443           3 :   __Pyx_GOTREF(__pyx_tuple__15);
   32444           3 :   __Pyx_GIVEREF(__pyx_tuple__15);
   32445             : 
   32446             :   /* "scipy/interpolate/_interpnd.pyx":208
   32447             :  *     """
   32448             :  *     if values.shape[0] != points.shape[0]:
   32449             :  *         raise ValueError("different number of values and points")             # <<<<<<<<<<<<<<
   32450             :  *     if points.ndim != 2:
   32451             :  *         raise ValueError("invalid shape for input data points")
   32452             :  */
   32453           3 :   __pyx_tuple__16 = PyTuple_Pack(1, __pyx_kp_u_different_number_of_values_and_p); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 208, __pyx_L1_error)
   32454           3 :   __Pyx_GOTREF(__pyx_tuple__16);
   32455           3 :   __Pyx_GIVEREF(__pyx_tuple__16);
   32456             : 
   32457             :   /* "scipy/interpolate/_interpnd.pyx":210
   32458             :  *         raise ValueError("different number of values and points")
   32459             :  *     if points.ndim != 2:
   32460             :  *         raise ValueError("invalid shape for input data points")             # <<<<<<<<<<<<<<
   32461             :  *     if points.shape[1] < 2:
   32462             :  *         raise ValueError("input data must be at least 2-D")
   32463             :  */
   32464           3 :   __pyx_tuple__17 = PyTuple_Pack(1, __pyx_kp_u_invalid_shape_for_input_data_poi); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 210, __pyx_L1_error)
   32465           3 :   __Pyx_GOTREF(__pyx_tuple__17);
   32466           3 :   __Pyx_GIVEREF(__pyx_tuple__17);
   32467             : 
   32468             :   /* "scipy/interpolate/_interpnd.pyx":212
   32469             :  *         raise ValueError("invalid shape for input data points")
   32470             :  *     if points.shape[1] < 2:
   32471             :  *         raise ValueError("input data must be at least 2-D")             # <<<<<<<<<<<<<<
   32472             :  *     if ndim is not None and points.shape[1] != ndim:
   32473             :  *         raise ValueError("this mode of interpolation available only for "
   32474             :  */
   32475           3 :   __pyx_tuple__18 = PyTuple_Pack(1, __pyx_kp_u_input_data_must_be_at_least_2_D); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 212, __pyx_L1_error)
   32476           3 :   __Pyx_GOTREF(__pyx_tuple__18);
   32477           3 :   __Pyx_GIVEREF(__pyx_tuple__18);
   32478             : 
   32479             :   /* "scipy/interpolate/_interpnd.pyx":314
   32480             :  *         return self._do_evaluate(xi, 1.0j)
   32481             :  * 
   32482             :  *     @cython.boundscheck(False)             # <<<<<<<<<<<<<<
   32483             :  *     @cython.wraparound(False)
   32484             :  *     def _do_evaluate(self, const double[:,::1] xi, const double_or_complex dummy):
   32485             :  */
   32486           3 :   __pyx_tuple__21 = PyTuple_Pack(1, __pyx_kp_s_No_matching_signature_found); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 314, __pyx_L1_error)
   32487           3 :   __Pyx_GOTREF(__pyx_tuple__21);
   32488           3 :   __Pyx_GIVEREF(__pyx_tuple__21);
   32489           3 :   __pyx_tuple__22 = PyTuple_Pack(1, __pyx_kp_s_Function_call_with_ambiguous_arg); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 314, __pyx_L1_error)
   32490           3 :   __Pyx_GOTREF(__pyx_tuple__22);
   32491           3 :   __Pyx_GIVEREF(__pyx_tuple__22);
   32492             : 
   32493             :   /* "scipy/interpolate/_interpnd.pyx":562
   32494             :  * 
   32495             :  *     if y.shape[0] != tri.npoints:
   32496             :  *         raise ValueError("'y' has a wrong number of items")             # <<<<<<<<<<<<<<
   32497             :  * 
   32498             :  *     if np.issubdtype(y.dtype, np.complexfloating):
   32499             :  */
   32500           3 :   __pyx_tuple__23 = PyTuple_Pack(1, __pyx_kp_u_y_has_a_wrong_number_of_items); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 562, __pyx_L1_error)
   32501           3 :   __Pyx_GOTREF(__pyx_tuple__23);
   32502           3 :   __Pyx_GIVEREF(__pyx_tuple__23);
   32503             : 
   32504             :   /* "scipy/interpolate/_interpnd.pyx":601
   32505             :  *                           GradientEstimationWarning)
   32506             :  * 
   32507             :  *     return yi.transpose(1, 0, 2).reshape(y_shape + (2,))             # <<<<<<<<<<<<<<
   32508             :  * 
   32509             :  * 
   32510             :  */
   32511           3 :   __pyx_tuple__24 = PyTuple_Pack(3, __pyx_int_1, __pyx_int_0, __pyx_int_2); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(0, 601, __pyx_L1_error)
   32512           3 :   __Pyx_GOTREF(__pyx_tuple__24);
   32513           3 :   __Pyx_GIVEREF(__pyx_tuple__24);
   32514           3 :   __pyx_tuple__25 = PyTuple_Pack(1, __pyx_int_2); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 601, __pyx_L1_error)
   32515           3 :   __Pyx_GOTREF(__pyx_tuple__25);
   32516           3 :   __Pyx_GIVEREF(__pyx_tuple__25);
   32517             : 
   32518             :   /* "View.MemoryView":100
   32519             :  * cdef object __pyx_collections_abc_Sequence "__pyx_collections_abc_Sequence"
   32520             :  * try:
   32521             :  *     if __import__("sys").version_info >= (3, 3):             # <<<<<<<<<<<<<<
   32522             :  *         __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence
   32523             :  *     else:
   32524             :  */
   32525           3 :   __pyx_tuple__26 = PyTuple_Pack(1, __pyx_n_s_sys); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(1, 100, __pyx_L1_error)
   32526           3 :   __Pyx_GOTREF(__pyx_tuple__26);
   32527           3 :   __Pyx_GIVEREF(__pyx_tuple__26);
   32528           3 :   __pyx_tuple__27 = PyTuple_Pack(2, __pyx_int_3, __pyx_int_3); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(1, 100, __pyx_L1_error)
   32529           3 :   __Pyx_GOTREF(__pyx_tuple__27);
   32530           3 :   __Pyx_GIVEREF(__pyx_tuple__27);
   32531             : 
   32532             :   /* "View.MemoryView":101
   32533             :  * try:
   32534             :  *     if __import__("sys").version_info >= (3, 3):
   32535             :  *         __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence             # <<<<<<<<<<<<<<
   32536             :  *     else:
   32537             :  *         __pyx_collections_abc_Sequence = __import__("collections").Sequence
   32538             :  */
   32539           3 :   __pyx_tuple__28 = PyTuple_Pack(1, __pyx_kp_s_collections_abc); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(1, 101, __pyx_L1_error)
   32540           3 :   __Pyx_GOTREF(__pyx_tuple__28);
   32541           3 :   __Pyx_GIVEREF(__pyx_tuple__28);
   32542             : 
   32543             :   /* "View.MemoryView":103
   32544             :  *         __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence
   32545             :  *     else:
   32546             :  *         __pyx_collections_abc_Sequence = __import__("collections").Sequence             # <<<<<<<<<<<<<<
   32547             :  * except:
   32548             :  * 
   32549             :  */
   32550           3 :   __pyx_tuple__29 = PyTuple_Pack(1, __pyx_n_s_collections); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(1, 103, __pyx_L1_error)
   32551           3 :   __Pyx_GOTREF(__pyx_tuple__29);
   32552           3 :   __Pyx_GIVEREF(__pyx_tuple__29);
   32553             : 
   32554             :   /* "View.MemoryView":309
   32555             :  *         return self.name
   32556             :  * 
   32557             :  * cdef generic = Enum("<strided and direct or indirect>")             # <<<<<<<<<<<<<<
   32558             :  * cdef strided = Enum("<strided and direct>") # default
   32559             :  * cdef indirect = Enum("<strided and indirect>")
   32560             :  */
   32561           3 :   __pyx_tuple__30 = PyTuple_Pack(1, __pyx_kp_s_strided_and_direct_or_indirect); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(1, 309, __pyx_L1_error)
   32562           3 :   __Pyx_GOTREF(__pyx_tuple__30);
   32563           3 :   __Pyx_GIVEREF(__pyx_tuple__30);
   32564             : 
   32565             :   /* "View.MemoryView":310
   32566             :  * 
   32567             :  * cdef generic = Enum("<strided and direct or indirect>")
   32568             :  * cdef strided = Enum("<strided and direct>") # default             # <<<<<<<<<<<<<<
   32569             :  * cdef indirect = Enum("<strided and indirect>")
   32570             :  * 
   32571             :  */
   32572           3 :   __pyx_tuple__31 = PyTuple_Pack(1, __pyx_kp_s_strided_and_direct); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(1, 310, __pyx_L1_error)
   32573           3 :   __Pyx_GOTREF(__pyx_tuple__31);
   32574           3 :   __Pyx_GIVEREF(__pyx_tuple__31);
   32575             : 
   32576             :   /* "View.MemoryView":311
   32577             :  * cdef generic = Enum("<strided and direct or indirect>")
   32578             :  * cdef strided = Enum("<strided and direct>") # default
   32579             :  * cdef indirect = Enum("<strided and indirect>")             # <<<<<<<<<<<<<<
   32580             :  * 
   32581             :  * 
   32582             :  */
   32583           3 :   __pyx_tuple__32 = PyTuple_Pack(1, __pyx_kp_s_strided_and_indirect); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(1, 311, __pyx_L1_error)
   32584           3 :   __Pyx_GOTREF(__pyx_tuple__32);
   32585           3 :   __Pyx_GIVEREF(__pyx_tuple__32);
   32586             : 
   32587             :   /* "View.MemoryView":314
   32588             :  * 
   32589             :  * 
   32590             :  * cdef contiguous = Enum("<contiguous and direct>")             # <<<<<<<<<<<<<<
   32591             :  * cdef indirect_contiguous = Enum("<contiguous and indirect>")
   32592             :  * 
   32593             :  */
   32594           3 :   __pyx_tuple__33 = PyTuple_Pack(1, __pyx_kp_s_contiguous_and_direct); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(1, 314, __pyx_L1_error)
   32595           3 :   __Pyx_GOTREF(__pyx_tuple__33);
   32596           3 :   __Pyx_GIVEREF(__pyx_tuple__33);
   32597             : 
   32598             :   /* "View.MemoryView":315
   32599             :  * 
   32600             :  * cdef contiguous = Enum("<contiguous and direct>")
   32601             :  * cdef indirect_contiguous = Enum("<contiguous and indirect>")             # <<<<<<<<<<<<<<
   32602             :  * 
   32603             :  * 
   32604             :  */
   32605           3 :   __pyx_tuple__34 = PyTuple_Pack(1, __pyx_kp_s_contiguous_and_indirect); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(1, 315, __pyx_L1_error)
   32606           3 :   __Pyx_GOTREF(__pyx_tuple__34);
   32607           3 :   __Pyx_GIVEREF(__pyx_tuple__34);
   32608             : 
   32609             :   /* "(tree fragment)":1
   32610             :  * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
   32611             :  *     cdef object __pyx_PickleError
   32612             :  *     cdef object __pyx_result
   32613             :  */
   32614           3 :   __pyx_tuple__35 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(1, 1, __pyx_L1_error)
   32615           3 :   __Pyx_GOTREF(__pyx_tuple__35);
   32616           3 :   __Pyx_GIVEREF(__pyx_tuple__35);
   32617           3 :   __pyx_codeobj__36 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__35, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Enum, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__36)) __PYX_ERR(1, 1, __pyx_L1_error)
   32618             : 
   32619             :   /* "scipy/interpolate/_interpnd.pyx":28
   32620             :  * import numpy as np
   32621             :  * 
   32622             :  * import scipy.spatial._qhull as qhull             # <<<<<<<<<<<<<<
   32623             :  * cimport scipy.spatial._qhull as qhull
   32624             :  * 
   32625             :  */
   32626           3 :   __pyx_tuple__37 = PyTuple_Pack(3, __pyx_n_s_scipy, __pyx_n_s_spatial, __pyx_n_s_qhull_2); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(0, 28, __pyx_L1_error)
   32627           3 :   __Pyx_GOTREF(__pyx_tuple__37);
   32628           3 :   __Pyx_GIVEREF(__pyx_tuple__37);
   32629             : 
   32630             :   /* "scipy/interpolate/_interpnd.pyx":58
   32631             :  *     """
   32632             :  * 
   32633             :  *     def __init__(self, points, values, fill_value=np.nan, ndim=None,             # <<<<<<<<<<<<<<
   32634             :  *                  rescale=False, need_contiguous=True, need_values=True):
   32635             :  *         """
   32636             :  */
   32637           3 :   __pyx_tuple__38 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_points, __pyx_n_s_values, __pyx_n_s_fill_value, __pyx_n_s_ndim, __pyx_n_s_rescale, __pyx_n_s_need_contiguous, __pyx_n_s_need_values); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(0, 58, __pyx_L1_error)
   32638           3 :   __Pyx_GOTREF(__pyx_tuple__38);
   32639           3 :   __Pyx_GIVEREF(__pyx_tuple__38);
   32640           3 :   __pyx_codeobj__39 = (PyObject*)__Pyx_PyCode_New(8, 0, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_czgdp18079_Quansight_scipy, __pyx_n_s_init, 58, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__39)) __PYX_ERR(0, 58, __pyx_L1_error)
   32641             : 
   32642             :   /* "scipy/interpolate/_interpnd.pyx":100
   32643             :  *             self.values = None
   32644             :  * 
   32645             :  *     def _calculate_triangulation(self, points):             # <<<<<<<<<<<<<<
   32646             :  *         pass
   32647             :  * 
   32648             :  */
   32649           3 :   __pyx_tuple__40 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_points); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(0, 100, __pyx_L1_error)
   32650           3 :   __Pyx_GOTREF(__pyx_tuple__40);
   32651           3 :   __Pyx_GIVEREF(__pyx_tuple__40);
   32652           3 :   __pyx_codeobj__41 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__40, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_czgdp18079_Quansight_scipy, __pyx_n_s_calculate_triangulation, 100, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__41)) __PYX_ERR(0, 100, __pyx_L1_error)
   32653             : 
   32654             :   /* "scipy/interpolate/_interpnd.pyx":103
   32655             :  *         pass
   32656             :  * 
   32657             :  *     def _set_values(self, values, fill_value=np.nan, need_contiguous=True, ndim=None):             # <<<<<<<<<<<<<<
   32658             :  *         values = np.asarray(values)
   32659             :  *         _check_init_shape(self.points, values, ndim=ndim)
   32660             :  */
   32661           3 :   __pyx_tuple__42 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_values, __pyx_n_s_fill_value, __pyx_n_s_need_contiguous, __pyx_n_s_ndim); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(0, 103, __pyx_L1_error)
   32662           3 :   __Pyx_GOTREF(__pyx_tuple__42);
   32663           3 :   __Pyx_GIVEREF(__pyx_tuple__42);
   32664           3 :   __pyx_codeobj__43 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__42, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_czgdp18079_Quansight_scipy, __pyx_n_s_set_values, 103, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__43)) __PYX_ERR(0, 103, __pyx_L1_error)
   32665             : 
   32666             :   /* "scipy/interpolate/_interpnd.pyx":130
   32667             :  *             self.fill_value = float(fill_value)
   32668             :  * 
   32669             :  *     def _check_call_shape(self, xi):             # <<<<<<<<<<<<<<
   32670             :  *         xi = np.asanyarray(xi)
   32671             :  *         if xi.shape[-1] != self.points.shape[1]:
   32672             :  */
   32673           3 :   __pyx_tuple__44 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_xi); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(0, 130, __pyx_L1_error)
   32674           3 :   __Pyx_GOTREF(__pyx_tuple__44);
   32675           3 :   __Pyx_GIVEREF(__pyx_tuple__44);
   32676           3 :   __pyx_codeobj__45 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__44, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_czgdp18079_Quansight_scipy, __pyx_n_s_check_call_shape, 130, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__45)) __PYX_ERR(0, 130, __pyx_L1_error)
   32677             : 
   32678             :   /* "scipy/interpolate/_interpnd.pyx":136
   32679             :  *         return xi
   32680             :  * 
   32681             :  *     def _scale_x(self, xi):             # <<<<<<<<<<<<<<
   32682             :  *         if self.scale is None:
   32683             :  *             return xi
   32684             :  */
   32685           3 :   __pyx_codeobj__46 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__44, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_czgdp18079_Quansight_scipy, __pyx_n_s_scale_x, 136, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__46)) __PYX_ERR(0, 136, __pyx_L1_error)
   32686             : 
   32687             :   /* "scipy/interpolate/_interpnd.pyx":142
   32688             :  *             return (xi - self.offset) / self.scale
   32689             :  * 
   32690             :  *     def _preprocess_xi(self, *args):             # <<<<<<<<<<<<<<
   32691             :  *         xi = _ndim_coords_from_arrays(args, ndim=self.points.shape[1])
   32692             :  *         xi = self._check_call_shape(xi)
   32693             :  */
   32694           3 :   __pyx_tuple__47 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_xi, __pyx_n_s_interpolation_points_shape); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(0, 142, __pyx_L1_error)
   32695           3 :   __Pyx_GOTREF(__pyx_tuple__47);
   32696           3 :   __Pyx_GIVEREF(__pyx_tuple__47);
   32697           3 :   __pyx_codeobj__48 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__47, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_czgdp18079_Quansight_scipy, __pyx_n_s_preprocess_xi, 142, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__48)) __PYX_ERR(0, 142, __pyx_L1_error)
   32698             : 
   32699             :   /* "scipy/interpolate/_interpnd.pyx":150
   32700             :  *         return self._scale_x(xi), interpolation_points_shape
   32701             :  * 
   32702             :  *     def __call__(self, *args):             # <<<<<<<<<<<<<<
   32703             :  *         """
   32704             :  *         interpolator(xi)
   32705             :  */
   32706           3 :   __pyx_tuple__49 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_xi, __pyx_n_s_interpolation_points_shape, __pyx_n_s_r); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(0, 150, __pyx_L1_error)
   32707           3 :   __Pyx_GOTREF(__pyx_tuple__49);
   32708           3 :   __Pyx_GIVEREF(__pyx_tuple__49);
   32709           3 :   __pyx_codeobj__50 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__49, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_czgdp18079_Quansight_scipy, __pyx_n_s_call, 150, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__50)) __PYX_ERR(0, 150, __pyx_L1_error)
   32710             : 
   32711             :   /* "scipy/interpolate/_interpnd.pyx":173
   32712             :  * 
   32713             :  * 
   32714             :  * cpdef _ndim_coords_from_arrays(points, ndim=None):             # <<<<<<<<<<<<<<
   32715             :  *     """
   32716             :  *     Convert a tuple of coordinate arrays to a (..., ndim)-shaped array.
   32717             :  */
   32718           3 :   __pyx_tuple__51 = PyTuple_Pack(2, __pyx_n_s_points, __pyx_n_s_ndim); if (unlikely(!__pyx_tuple__51)) __PYX_ERR(0, 173, __pyx_L1_error)
   32719           3 :   __Pyx_GOTREF(__pyx_tuple__51);
   32720           3 :   __Pyx_GIVEREF(__pyx_tuple__51);
   32721           3 :   __pyx_codeobj__52 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__51, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_czgdp18079_Quansight_scipy, __pyx_n_s_ndim_coords_from_arrays, 173, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__52)) __PYX_ERR(0, 173, __pyx_L1_error)
   32722           3 :   __pyx_tuple__53 = PyTuple_Pack(1, Py_None); if (unlikely(!__pyx_tuple__53)) __PYX_ERR(0, 173, __pyx_L1_error)
   32723           3 :   __Pyx_GOTREF(__pyx_tuple__53);
   32724           3 :   __Pyx_GIVEREF(__pyx_tuple__53);
   32725             : 
   32726             :   /* "scipy/interpolate/_interpnd.pyx":301
   32727             :  *     """
   32728             :  * 
   32729             :  *     def __init__(self, points, values, fill_value=np.nan, rescale=False):             # <<<<<<<<<<<<<<
   32730             :  *         NDInterpolatorBase.__init__(self, points, values, fill_value=fill_value,
   32731             :  *                 rescale=rescale)
   32732             :  */
   32733           3 :   __pyx_tuple__54 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_points, __pyx_n_s_values, __pyx_n_s_fill_value, __pyx_n_s_rescale); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(0, 301, __pyx_L1_error)
   32734           3 :   __Pyx_GOTREF(__pyx_tuple__54);
   32735           3 :   __Pyx_GIVEREF(__pyx_tuple__54);
   32736           3 :   __pyx_codeobj__55 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_czgdp18079_Quansight_scipy, __pyx_n_s_init, 301, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__55)) __PYX_ERR(0, 301, __pyx_L1_error)
   32737             : 
   32738             :   /* "scipy/interpolate/_interpnd.pyx":305
   32739             :  *                 rescale=rescale)
   32740             :  * 
   32741             :  *     def _calculate_triangulation(self, points):             # <<<<<<<<<<<<<<
   32742             :  *         self.tri = qhull.Delaunay(points)
   32743             :  * 
   32744             :  */
   32745           3 :   __pyx_codeobj__56 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__40, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_czgdp18079_Quansight_scipy, __pyx_n_s_calculate_triangulation, 305, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__56)) __PYX_ERR(0, 305, __pyx_L1_error)
   32746             : 
   32747             :   /* "scipy/interpolate/_interpnd.pyx":308
   32748             :  *         self.tri = qhull.Delaunay(points)
   32749             :  * 
   32750             :  *     def _evaluate_double(self, xi):             # <<<<<<<<<<<<<<
   32751             :  *         return self._do_evaluate(xi, 1.0)
   32752             :  * 
   32753             :  */
   32754           3 :   __pyx_codeobj__57 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__44, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_czgdp18079_Quansight_scipy, __pyx_n_s_evaluate_double, 308, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__57)) __PYX_ERR(0, 308, __pyx_L1_error)
   32755             : 
   32756             :   /* "scipy/interpolate/_interpnd.pyx":311
   32757             :  *         return self._do_evaluate(xi, 1.0)
   32758             :  * 
   32759             :  *     def _evaluate_complex(self, xi):             # <<<<<<<<<<<<<<
   32760             :  *         return self._do_evaluate(xi, 1.0j)
   32761             :  * 
   32762             :  */
   32763           3 :   __pyx_codeobj__58 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__44, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_czgdp18079_Quansight_scipy, __pyx_n_s_evaluate_complex, 311, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__58)) __PYX_ERR(0, 311, __pyx_L1_error)
   32764             : 
   32765             :   /* "scipy/interpolate/_interpnd.pyx":314
   32766             :  *         return self._do_evaluate(xi, 1.0j)
   32767             :  * 
   32768             :  *     @cython.boundscheck(False)             # <<<<<<<<<<<<<<
   32769             :  *     @cython.wraparound(False)
   32770             :  *     def _do_evaluate(self, const double[:,::1] xi, const double_or_complex dummy):
   32771             :  */
   32772           3 :   __pyx_tuple__59 = PyTuple_Pack(19, __pyx_n_s_self, __pyx_n_s_xi, __pyx_n_s_dummy, __pyx_n_s_values, __pyx_n_s_out, __pyx_n_s_simplices, __pyx_n_s_fill_value, __pyx_n_s_c, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_m, __pyx_n_s_ndim, __pyx_n_s_isimplex, __pyx_n_s_start, __pyx_n_s_nvalues, __pyx_n_s_info, __pyx_n_s_eps, __pyx_n_s_eps_broad); if (unlikely(!__pyx_tuple__59)) __PYX_ERR(0, 314, __pyx_L1_error)
   32773           3 :   __Pyx_GOTREF(__pyx_tuple__59);
   32774           3 :   __Pyx_GIVEREF(__pyx_tuple__59);
   32775           3 :   __pyx_codeobj__60 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 19, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__59, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_czgdp18079_Quansight_scipy, __pyx_n_s_do_evaluate, 314, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__60)) __PYX_ERR(0, 314, __pyx_L1_error)
   32776             : 
   32777             :   /* "scipy/interpolate/_interpnd.pyx":373
   32778             :  * #------------------------------------------------------------------------------
   32779             :  * 
   32780             :  * class GradientEstimationWarning(Warning):             # <<<<<<<<<<<<<<
   32781             :  *     pass
   32782             :  * 
   32783             :  */
   32784           3 :   __pyx_tuple__61 = PyTuple_Pack(1, __pyx_builtin_Warning); if (unlikely(!__pyx_tuple__61)) __PYX_ERR(0, 373, __pyx_L1_error)
   32785           3 :   __Pyx_GOTREF(__pyx_tuple__61);
   32786           3 :   __Pyx_GIVEREF(__pyx_tuple__61);
   32787           3 :   __pyx_tuple__62 = PyTuple_Pack(1, __pyx_builtin_Warning); if (unlikely(!__pyx_tuple__62)) __PYX_ERR(0, 373, __pyx_L1_error)
   32788           3 :   __Pyx_GOTREF(__pyx_tuple__62);
   32789           3 :   __Pyx_GIVEREF(__pyx_tuple__62);
   32790             : 
   32791             :   /* "scipy/interpolate/_interpnd.pyx":553
   32792             :  * @cython.boundscheck(False)
   32793             :  * @cython.wraparound(False)
   32794             :  * cpdef estimate_gradients_2d_global(tri, y, int maxiter=400, double tol=1e-6):             # <<<<<<<<<<<<<<
   32795             :  *     cdef const double[:,::1] data
   32796             :  *     cdef double[:,:,::1] grad
   32797             :  */
   32798           3 :   __pyx_tuple__63 = PyTuple_Pack(4, __pyx_n_s_tri, __pyx_n_s_y, __pyx_n_s_maxiter, __pyx_n_s_tol); if (unlikely(!__pyx_tuple__63)) __PYX_ERR(0, 553, __pyx_L1_error)
   32799           3 :   __Pyx_GOTREF(__pyx_tuple__63);
   32800           3 :   __Pyx_GIVEREF(__pyx_tuple__63);
   32801           3 :   __pyx_codeobj__64 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__63, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_czgdp18079_Quansight_scipy, __pyx_n_s_estimate_gradients_2d_global, 553, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__64)) __PYX_ERR(0, 553, __pyx_L1_error)
   32802           3 :   __pyx_tuple__65 = PyTuple_Pack(2, __pyx_int_400, __pyx_float_1eneg_6); if (unlikely(!__pyx_tuple__65)) __PYX_ERR(0, 553, __pyx_L1_error)
   32803           3 :   __Pyx_GOTREF(__pyx_tuple__65);
   32804           3 :   __Pyx_GIVEREF(__pyx_tuple__65);
   32805             : 
   32806             :   /* "scipy/interpolate/_interpnd.pyx":930
   32807             :  *     """
   32808             :  * 
   32809             :  *     def __init__(self, points, values, fill_value=np.nan,             # <<<<<<<<<<<<<<
   32810             :  *                  tol=1e-6, maxiter=400, rescale=False):
   32811             :  *         self._tol = tol
   32812             :  */
   32813           3 :   __pyx_tuple__66 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_points, __pyx_n_s_values, __pyx_n_s_fill_value, __pyx_n_s_tol, __pyx_n_s_maxiter, __pyx_n_s_rescale); if (unlikely(!__pyx_tuple__66)) __PYX_ERR(0, 930, __pyx_L1_error)
   32814           3 :   __Pyx_GOTREF(__pyx_tuple__66);
   32815           3 :   __Pyx_GIVEREF(__pyx_tuple__66);
   32816           3 :   __pyx_codeobj__67 = (PyObject*)__Pyx_PyCode_New(7, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__66, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_czgdp18079_Quansight_scipy, __pyx_n_s_init, 930, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__67)) __PYX_ERR(0, 930, __pyx_L1_error)
   32817             : 
   32818             :   /* "scipy/interpolate/_interpnd.pyx":938
   32819             :  *                                     need_values=False)
   32820             :  * 
   32821             :  *     def _set_values(self, values, fill_value=np.nan, need_contiguous=True, ndim=None):             # <<<<<<<<<<<<<<
   32822             :  *         """
   32823             :  *         Sets the values of the interpolation points.
   32824             :  */
   32825           3 :   __pyx_codeobj__68 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__42, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_czgdp18079_Quansight_scipy, __pyx_n_s_set_values, 938, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__68)) __PYX_ERR(0, 938, __pyx_L1_error)
   32826             : 
   32827             :   /* "scipy/interpolate/_interpnd.pyx":952
   32828             :  *                                                     tol=self._tol, maxiter=self._maxiter)
   32829             :  * 
   32830             :  *     def _calculate_triangulation(self, points):             # <<<<<<<<<<<<<<
   32831             :  *         self.tri = qhull.Delaunay(points)
   32832             :  * 
   32833             :  */
   32834           3 :   __pyx_codeobj__69 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__40, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_czgdp18079_Quansight_scipy, __pyx_n_s_calculate_triangulation, 952, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__69)) __PYX_ERR(0, 952, __pyx_L1_error)
   32835             : 
   32836             :   /* "scipy/interpolate/_interpnd.pyx":955
   32837             :  *         self.tri = qhull.Delaunay(points)
   32838             :  * 
   32839             :  *     def _evaluate_double(self, xi):             # <<<<<<<<<<<<<<
   32840             :  *         return self._do_evaluate(xi, 1.0)
   32841             :  * 
   32842             :  */
   32843           3 :   __pyx_codeobj__70 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__44, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_czgdp18079_Quansight_scipy, __pyx_n_s_evaluate_double, 955, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__70)) __PYX_ERR(0, 955, __pyx_L1_error)
   32844             : 
   32845             :   /* "scipy/interpolate/_interpnd.pyx":958
   32846             :  *         return self._do_evaluate(xi, 1.0)
   32847             :  * 
   32848             :  *     def _evaluate_complex(self, xi):             # <<<<<<<<<<<<<<
   32849             :  *         return self._do_evaluate(xi, 1.0j)
   32850             :  * 
   32851             :  */
   32852           3 :   __pyx_codeobj__71 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__44, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_czgdp18079_Quansight_scipy, __pyx_n_s_evaluate_complex, 958, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__71)) __PYX_ERR(0, 958, __pyx_L1_error)
   32853             : 
   32854             :   /* "scipy/interpolate/_interpnd.pyx":961
   32855             :  *         return self._do_evaluate(xi, 1.0j)
   32856             :  * 
   32857             :  *     @cython.boundscheck(False)             # <<<<<<<<<<<<<<
   32858             :  *     @cython.wraparound(False)
   32859             :  *     def _do_evaluate(self, const double[:,::1] xi, const double_or_complex dummy):
   32860             :  */
   32861           3 :   __pyx_tuple__72 = PyTuple_Pack(22, __pyx_n_s_self, __pyx_n_s_xi, __pyx_n_s_dummy, __pyx_n_s_values, __pyx_n_s_grad, __pyx_n_s_out, __pyx_n_s_simplices, __pyx_n_s_c, __pyx_n_s_f, __pyx_n_s_df, __pyx_n_s_w, __pyx_n_s_fill_value, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_ndim, __pyx_n_s_isimplex, __pyx_n_s_start, __pyx_n_s_nvalues, __pyx_n_s_info, __pyx_n_s_eps, __pyx_n_s_eps_broad); if (unlikely(!__pyx_tuple__72)) __PYX_ERR(0, 961, __pyx_L1_error)
   32862           3 :   __Pyx_GOTREF(__pyx_tuple__72);
   32863           3 :   __Pyx_GIVEREF(__pyx_tuple__72);
   32864           3 :   __pyx_codeobj__73 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 22, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__72, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_czgdp18079_Quansight_scipy, __pyx_n_s_do_evaluate, 961, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__73)) __PYX_ERR(0, 961, __pyx_L1_error)
   32865             :   __Pyx_RefNannyFinishContext();
   32866             :   return 0;
   32867             :   __pyx_L1_error:;
   32868             :   __Pyx_RefNannyFinishContext();
   32869             :   return -1;
   32870             : }
   32871             : /* #### Code section: init_constants ### */
   32872             : 
   32873           3 : static CYTHON_SMALL_CODE int __Pyx_InitConstants(void) {
   32874           3 :   __pyx_umethod_PyDict_Type_get.type = (PyObject*)&PyDict_Type;
   32875           3 :   __pyx_umethod_PyDict_Type_get.method_name = &__pyx_n_s_get;
   32876           3 :   __pyx_umethod_PyDict_Type_values.type = (PyObject*)&PyDict_Type;
   32877           3 :   __pyx_umethod_PyDict_Type_values.method_name = &__pyx_n_s_values;
   32878           3 :   if (__Pyx_CreateStringTabAndInitStrings() < 0) __PYX_ERR(0, 1, __pyx_L1_error);
   32879           3 :   __pyx_float_1_0 = PyFloat_FromDouble(1.0); if (unlikely(!__pyx_float_1_0)) __PYX_ERR(0, 1, __pyx_L1_error)
   32880           3 :   __pyx_float_1eneg_6 = PyFloat_FromDouble(1e-6); if (unlikely(!__pyx_float_1eneg_6)) __PYX_ERR(0, 1, __pyx_L1_error)
   32881           3 :   __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
   32882           3 :   __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
   32883           3 :   __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) __PYX_ERR(0, 1, __pyx_L1_error)
   32884           3 :   __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) __PYX_ERR(0, 1, __pyx_L1_error)
   32885           3 :   __pyx_int_400 = PyInt_FromLong(400); if (unlikely(!__pyx_int_400)) __PYX_ERR(0, 1, __pyx_L1_error)
   32886           3 :   __pyx_int_112105877 = PyInt_FromLong(112105877L); if (unlikely(!__pyx_int_112105877)) __PYX_ERR(0, 1, __pyx_L1_error)
   32887           3 :   __pyx_int_136983863 = PyInt_FromLong(136983863L); if (unlikely(!__pyx_int_136983863)) __PYX_ERR(0, 1, __pyx_L1_error)
   32888           3 :   __pyx_int_184977713 = PyInt_FromLong(184977713L); if (unlikely(!__pyx_int_184977713)) __PYX_ERR(0, 1, __pyx_L1_error)
   32889           3 :   __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error)
   32890             :   return 0;
   32891             :   __pyx_L1_error:;
   32892             :   return -1;
   32893             : }
   32894             : /* #### Code section: init_globals ### */
   32895             : 
   32896           3 : static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
   32897             :   /* AssertionsEnabled.init */
   32898           3 :   if (likely(__Pyx_init_assertions_enabled() == 0)); else
   32899             : 
   32900           0 : if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)
   32901             : 
   32902             :   return 0;
   32903           0 :   __pyx_L1_error:;
   32904           0 :   return -1;
   32905             : }
   32906             : /* #### Code section: init_module ### */
   32907             : 
   32908             : static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
   32909             : static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
   32910             : static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
   32911             : static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
   32912             : static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
   32913             : static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
   32914             : static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/
   32915             : 
   32916           3 : static int __Pyx_modinit_global_init_code(void) {
   32917             :   __Pyx_RefNannyDeclarations
   32918           3 :   __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
   32919             :   /*--- Global init code ---*/
   32920           3 :   __pyx_collections_abc_Sequence = Py_None; Py_INCREF(Py_None);
   32921           3 :   generic = Py_None; Py_INCREF(Py_None);
   32922           3 :   strided = Py_None; Py_INCREF(Py_None);
   32923           3 :   indirect = Py_None; Py_INCREF(Py_None);
   32924           3 :   contiguous = Py_None; Py_INCREF(Py_None);
   32925           3 :   indirect_contiguous = Py_None; Py_INCREF(Py_None);
   32926           3 :   __Pyx_RefNannyFinishContext();
   32927           3 :   return 0;
   32928             : }
   32929             : 
   32930             : static int __Pyx_modinit_variable_export_code(void) {
   32931             :   __Pyx_RefNannyDeclarations
   32932             :   __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
   32933             :   /*--- Variable export code ---*/
   32934             :   __Pyx_RefNannyFinishContext();
   32935             :   return 0;
   32936             : }
   32937             : 
   32938             : static int __Pyx_modinit_function_export_code(void) {
   32939             :   __Pyx_RefNannyDeclarations
   32940             :   __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
   32941             :   /*--- Function export code ---*/
   32942             :   __Pyx_RefNannyFinishContext();
   32943             :   return 0;
   32944             : }
   32945             : 
   32946           3 : static int __Pyx_modinit_type_init_code(void) {
   32947             :   __Pyx_RefNannyDeclarations
   32948           3 :   PyObject *__pyx_t_1 = NULL;
   32949           3 :   int __pyx_lineno = 0;
   32950           3 :   const char *__pyx_filename = NULL;
   32951           3 :   int __pyx_clineno = 0;
   32952           3 :   __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
   32953             :   /*--- Type init code ---*/
   32954           3 :   __pyx_vtabptr_array = &__pyx_vtable_array;
   32955           3 :   __pyx_vtable_array.get_memview = (PyObject *(*)(struct __pyx_array_obj *))__pyx_array_get_memview;
   32956             :   #if CYTHON_USE_TYPE_SPECS
   32957             :   __pyx_array_type = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type___pyx_array_spec, NULL); if (unlikely(!__pyx_array_type)) __PYX_ERR(1, 114, __pyx_L1_error)
   32958             :   #if !CYTHON_COMPILING_IN_LIMITED_API
   32959             :   __pyx_array_type->tp_as_buffer = &__pyx_tp_as_buffer_array;
   32960             :   if (!__pyx_array_type->tp_as_buffer->bf_releasebuffer && __pyx_array_type->tp_base->tp_as_buffer && __pyx_array_type->tp_base->tp_as_buffer->bf_releasebuffer) {
   32961             :     __pyx_array_type->tp_as_buffer->bf_releasebuffer = __pyx_array_type->tp_base->tp_as_buffer->bf_releasebuffer;
   32962             :   }
   32963             :   #elif defined(Py_bf_getbuffer) && defined(Py_bf_releasebuffer)
   32964             :   /* PY_VERSION_HEX >= 0x03090000 || Py_LIMITED_API >= 0x030B0000 */
   32965             :   #elif defined(_MSC_VER)
   32966             :   #pragma message ("The buffer protocol is not supported in the Limited C-API < 3.11.")
   32967             :   #else
   32968             :   #warning "The buffer protocol is not supported in the Limited C-API < 3.11."
   32969             :   #endif
   32970             :   if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type___pyx_array_spec, __pyx_array_type) < 0) __PYX_ERR(1, 114, __pyx_L1_error)
   32971             :   #else
   32972           3 :   __pyx_array_type = &__pyx_type___pyx_array;
   32973             :   #endif
   32974             :   #if !CYTHON_COMPILING_IN_LIMITED_API
   32975             :   #endif
   32976             :   #if !CYTHON_USE_TYPE_SPECS
   32977           3 :   if (__Pyx_PyType_Ready(__pyx_array_type) < 0) __PYX_ERR(1, 114, __pyx_L1_error)
   32978             :   #endif
   32979             :   #if PY_MAJOR_VERSION < 3
   32980             :   __pyx_array_type->tp_print = 0;
   32981             :   #endif
   32982           3 :   if (__Pyx_SetVtable(__pyx_array_type, __pyx_vtabptr_array) < 0) __PYX_ERR(1, 114, __pyx_L1_error)
   32983             :   #if !CYTHON_COMPILING_IN_LIMITED_API
   32984           3 :   if (__Pyx_MergeVtables(__pyx_array_type) < 0) __PYX_ERR(1, 114, __pyx_L1_error)
   32985             :   #endif
   32986             :   #if !CYTHON_COMPILING_IN_LIMITED_API
   32987           3 :   if (__Pyx_setup_reduce((PyObject *) __pyx_array_type) < 0) __PYX_ERR(1, 114, __pyx_L1_error)
   32988             :   #endif
   32989             :   #if CYTHON_USE_TYPE_SPECS
   32990             :   __pyx_MemviewEnum_type = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type___pyx_MemviewEnum_spec, NULL); if (unlikely(!__pyx_MemviewEnum_type)) __PYX_ERR(1, 302, __pyx_L1_error)
   32991             :   if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type___pyx_MemviewEnum_spec, __pyx_MemviewEnum_type) < 0) __PYX_ERR(1, 302, __pyx_L1_error)
   32992             :   #else
   32993           3 :   __pyx_MemviewEnum_type = &__pyx_type___pyx_MemviewEnum;
   32994             :   #endif
   32995             :   #if !CYTHON_COMPILING_IN_LIMITED_API
   32996             :   #endif
   32997             :   #if !CYTHON_USE_TYPE_SPECS
   32998           3 :   if (__Pyx_PyType_Ready(__pyx_MemviewEnum_type) < 0) __PYX_ERR(1, 302, __pyx_L1_error)
   32999             :   #endif
   33000             :   #if PY_MAJOR_VERSION < 3
   33001             :   __pyx_MemviewEnum_type->tp_print = 0;
   33002             :   #endif
   33003             :   #if !CYTHON_COMPILING_IN_LIMITED_API
   33004           3 :   if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_MemviewEnum_type->tp_dictoffset && __pyx_MemviewEnum_type->tp_getattro == PyObject_GenericGetAttr)) {
   33005           3 :     __pyx_MemviewEnum_type->tp_getattro = __Pyx_PyObject_GenericGetAttr;
   33006             :   }
   33007             :   #endif
   33008             :   #if !CYTHON_COMPILING_IN_LIMITED_API
   33009           3 :   if (__Pyx_setup_reduce((PyObject *) __pyx_MemviewEnum_type) < 0) __PYX_ERR(1, 302, __pyx_L1_error)
   33010             :   #endif
   33011           3 :   __pyx_vtabptr_memoryview = &__pyx_vtable_memoryview;
   33012           3 :   __pyx_vtable_memoryview.get_item_pointer = (char *(*)(struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_get_item_pointer;
   33013           3 :   __pyx_vtable_memoryview.is_slice = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_is_slice;
   33014           3 :   __pyx_vtable_memoryview.setitem_slice_assignment = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *, PyObject *))__pyx_memoryview_setitem_slice_assignment;
   33015           3 :   __pyx_vtable_memoryview.setitem_slice_assign_scalar = (PyObject *(*)(struct __pyx_memoryview_obj *, struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_setitem_slice_assign_scalar;
   33016           3 :   __pyx_vtable_memoryview.setitem_indexed = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *, PyObject *))__pyx_memoryview_setitem_indexed;
   33017           3 :   __pyx_vtable_memoryview.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryview_convert_item_to_object;
   33018           3 :   __pyx_vtable_memoryview.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryview_assign_item_from_object;
   33019           3 :   __pyx_vtable_memoryview._get_base = (PyObject *(*)(struct __pyx_memoryview_obj *))__pyx_memoryview__get_base;
   33020             :   #if CYTHON_USE_TYPE_SPECS
   33021             :   __pyx_memoryview_type = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type___pyx_memoryview_spec, NULL); if (unlikely(!__pyx_memoryview_type)) __PYX_ERR(1, 337, __pyx_L1_error)
   33022             :   #if !CYTHON_COMPILING_IN_LIMITED_API
   33023             :   __pyx_memoryview_type->tp_as_buffer = &__pyx_tp_as_buffer_memoryview;
   33024             :   if (!__pyx_memoryview_type->tp_as_buffer->bf_releasebuffer && __pyx_memoryview_type->tp_base->tp_as_buffer && __pyx_memoryview_type->tp_base->tp_as_buffer->bf_releasebuffer) {
   33025             :     __pyx_memoryview_type->tp_as_buffer->bf_releasebuffer = __pyx_memoryview_type->tp_base->tp_as_buffer->bf_releasebuffer;
   33026             :   }
   33027             :   #elif defined(Py_bf_getbuffer) && defined(Py_bf_releasebuffer)
   33028             :   /* PY_VERSION_HEX >= 0x03090000 || Py_LIMITED_API >= 0x030B0000 */
   33029             :   #elif defined(_MSC_VER)
   33030             :   #pragma message ("The buffer protocol is not supported in the Limited C-API < 3.11.")
   33031             :   #else
   33032             :   #warning "The buffer protocol is not supported in the Limited C-API < 3.11."
   33033             :   #endif
   33034             :   if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type___pyx_memoryview_spec, __pyx_memoryview_type) < 0) __PYX_ERR(1, 337, __pyx_L1_error)
   33035             :   #else
   33036           3 :   __pyx_memoryview_type = &__pyx_type___pyx_memoryview;
   33037             :   #endif
   33038             :   #if !CYTHON_COMPILING_IN_LIMITED_API
   33039             :   #endif
   33040             :   #if !CYTHON_USE_TYPE_SPECS
   33041           3 :   if (__Pyx_PyType_Ready(__pyx_memoryview_type) < 0) __PYX_ERR(1, 337, __pyx_L1_error)
   33042             :   #endif
   33043             :   #if PY_MAJOR_VERSION < 3
   33044             :   __pyx_memoryview_type->tp_print = 0;
   33045             :   #endif
   33046             :   #if !CYTHON_COMPILING_IN_LIMITED_API
   33047           3 :   if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_memoryview_type->tp_dictoffset && __pyx_memoryview_type->tp_getattro == PyObject_GenericGetAttr)) {
   33048           3 :     __pyx_memoryview_type->tp_getattro = __Pyx_PyObject_GenericGetAttr;
   33049             :   }
   33050             :   #endif
   33051           3 :   if (__Pyx_SetVtable(__pyx_memoryview_type, __pyx_vtabptr_memoryview) < 0) __PYX_ERR(1, 337, __pyx_L1_error)
   33052             :   #if !CYTHON_COMPILING_IN_LIMITED_API
   33053           3 :   if (__Pyx_MergeVtables(__pyx_memoryview_type) < 0) __PYX_ERR(1, 337, __pyx_L1_error)
   33054             :   #endif
   33055             :   #if !CYTHON_COMPILING_IN_LIMITED_API
   33056           3 :   if (__Pyx_setup_reduce((PyObject *) __pyx_memoryview_type) < 0) __PYX_ERR(1, 337, __pyx_L1_error)
   33057             :   #endif
   33058           3 :   __pyx_vtabptr__memoryviewslice = &__pyx_vtable__memoryviewslice;
   33059           3 :   __pyx_vtable__memoryviewslice.__pyx_base = *__pyx_vtabptr_memoryview;
   33060           3 :   __pyx_vtable__memoryviewslice.__pyx_base.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryviewslice_convert_item_to_object;
   33061           3 :   __pyx_vtable__memoryviewslice.__pyx_base.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryviewslice_assign_item_from_object;
   33062           3 :   __pyx_vtable__memoryviewslice.__pyx_base._get_base = (PyObject *(*)(struct __pyx_memoryview_obj *))__pyx_memoryviewslice__get_base;
   33063             :   #if CYTHON_USE_TYPE_SPECS
   33064             :   __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_memoryview_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 952, __pyx_L1_error)
   33065             :   __Pyx_GOTREF(__pyx_t_1);
   33066             :   __pyx_memoryviewslice_type = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type___pyx_memoryviewslice_spec, __pyx_t_1);
   33067             :   __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
   33068             :   if (unlikely(!__pyx_memoryviewslice_type)) __PYX_ERR(1, 952, __pyx_L1_error)
   33069             :   if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type___pyx_memoryviewslice_spec, __pyx_memoryviewslice_type) < 0) __PYX_ERR(1, 952, __pyx_L1_error)
   33070             :   #else
   33071           3 :   __pyx_memoryviewslice_type = &__pyx_type___pyx_memoryviewslice;
   33072             :   #endif
   33073             :   #if !CYTHON_COMPILING_IN_LIMITED_API
   33074           3 :   __pyx_memoryviewslice_type->tp_base = __pyx_memoryview_type;
   33075             :   #endif
   33076             :   #if !CYTHON_USE_TYPE_SPECS
   33077           3 :   if (__Pyx_PyType_Ready(__pyx_memoryviewslice_type) < 0) __PYX_ERR(1, 952, __pyx_L1_error)
   33078             :   #endif
   33079             :   #if PY_MAJOR_VERSION < 3
   33080             :   __pyx_memoryviewslice_type->tp_print = 0;
   33081             :   #endif
   33082             :   #if !CYTHON_COMPILING_IN_LIMITED_API
   33083           3 :   if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_memoryviewslice_type->tp_dictoffset && __pyx_memoryviewslice_type->tp_getattro == PyObject_GenericGetAttr)) {
   33084           3 :     __pyx_memoryviewslice_type->tp_getattro = __Pyx_PyObject_GenericGetAttr;
   33085             :   }
   33086             :   #endif
   33087           3 :   if (__Pyx_SetVtable(__pyx_memoryviewslice_type, __pyx_vtabptr__memoryviewslice) < 0) __PYX_ERR(1, 952, __pyx_L1_error)
   33088             :   #if !CYTHON_COMPILING_IN_LIMITED_API
   33089           3 :   if (__Pyx_MergeVtables(__pyx_memoryviewslice_type) < 0) __PYX_ERR(1, 952, __pyx_L1_error)
   33090             :   #endif
   33091             :   #if !CYTHON_COMPILING_IN_LIMITED_API
   33092           3 :   if (__Pyx_setup_reduce((PyObject *) __pyx_memoryviewslice_type) < 0) __PYX_ERR(1, 952, __pyx_L1_error)
   33093             :   #endif
   33094             :   __Pyx_RefNannyFinishContext();
   33095             :   return 0;
   33096           0 :   __pyx_L1_error:;
   33097           0 :   __Pyx_XDECREF(__pyx_t_1);
   33098           0 :   __Pyx_RefNannyFinishContext();
   33099           0 :   return -1;
   33100             : }
   33101             : 
   33102             : static int __Pyx_modinit_type_import_code(void) {
   33103             :   __Pyx_RefNannyDeclarations
   33104             :   __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
   33105             :   /*--- Type import code ---*/
   33106             :   __Pyx_RefNannyFinishContext();
   33107             :   return 0;
   33108             : }
   33109             : 
   33110             : static int __Pyx_modinit_variable_import_code(void) {
   33111             :   __Pyx_RefNannyDeclarations
   33112             :   __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
   33113             :   /*--- Variable import code ---*/
   33114             :   __Pyx_RefNannyFinishContext();
   33115             :   return 0;
   33116             : }
   33117             : 
   33118           3 : static int __Pyx_modinit_function_import_code(void) {
   33119             :   __Pyx_RefNannyDeclarations
   33120           3 :   PyObject *__pyx_t_1 = NULL;
   33121           3 :   int __pyx_lineno = 0;
   33122           3 :   const char *__pyx_filename = NULL;
   33123           3 :   int __pyx_clineno = 0;
   33124           3 :   __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
   33125             :   /*--- Function import code ---*/
   33126           3 :   __pyx_t_1 = PyImport_ImportModule("scipy.spatial._qhull"); if (!__pyx_t_1) __PYX_ERR(0, 1, __pyx_L1_error)
   33127           3 :   __Pyx_GOTREF(__pyx_t_1);
   33128           3 :   if (__Pyx_ImportFunction_3_0_11(__pyx_t_1, "_get_delaunay_info", (void (**)(void))&__pyx_f_5scipy_7spatial_6_qhull__get_delaunay_info, "int (__pyx_t_5scipy_7spatial_6_qhull_DelaunayInfo_t *, PyObject *, int, int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   33129           3 :   if (__Pyx_ImportFunction_3_0_11(__pyx_t_1, "_barycentric_coordinates", (void (**)(void))&__pyx_f_5scipy_7spatial_6_qhull__barycentric_coordinates, "void (int, double *, double const *, double *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   33130           3 :   if (__Pyx_ImportFunction_3_0_11(__pyx_t_1, "_find_simplex", (void (**)(void))&__pyx_f_5scipy_7spatial_6_qhull__find_simplex, "int (__pyx_t_5scipy_7spatial_6_qhull_DelaunayInfo_t *, double *, double const *, int *, double, double)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   33131           3 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   33132             :   __Pyx_RefNannyFinishContext();
   33133             :   return 0;
   33134           0 :   __pyx_L1_error:;
   33135           0 :   __Pyx_XDECREF(__pyx_t_1);
   33136           0 :   __Pyx_RefNannyFinishContext();
   33137           0 :   return -1;
   33138             : }
   33139             : 
   33140             : 
   33141             : #if PY_MAJOR_VERSION >= 3
   33142             : #if CYTHON_PEP489_MULTI_PHASE_INIT
   33143             : static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
   33144             : static int __pyx_pymod_exec__interpnd(PyObject* module); /*proto*/
   33145             : static PyModuleDef_Slot __pyx_moduledef_slots[] = {
   33146             :   {Py_mod_create, (void*)__pyx_pymod_create},
   33147             :   {Py_mod_exec, (void*)__pyx_pymod_exec__interpnd},
   33148             :   {0, NULL}
   33149             : };
   33150             : #endif
   33151             : 
   33152             : #ifdef __cplusplus
   33153             : namespace {
   33154             :   struct PyModuleDef __pyx_moduledef =
   33155             :   #else
   33156             :   static struct PyModuleDef __pyx_moduledef =
   33157             :   #endif
   33158             :   {
   33159             :       PyModuleDef_HEAD_INIT,
   33160             :       "_interpnd",
   33161             :       __pyx_k_Simple_N_D_interpolation_versio, /* m_doc */
   33162             :     #if CYTHON_PEP489_MULTI_PHASE_INIT
   33163             :       0, /* m_size */
   33164             :     #elif CYTHON_USE_MODULE_STATE
   33165             :       sizeof(__pyx_mstate), /* m_size */
   33166             :     #else
   33167             :       -1, /* m_size */
   33168             :     #endif
   33169             :       __pyx_methods /* m_methods */,
   33170             :     #if CYTHON_PEP489_MULTI_PHASE_INIT
   33171             :       __pyx_moduledef_slots, /* m_slots */
   33172             :     #else
   33173             :       NULL, /* m_reload */
   33174             :     #endif
   33175             :     #if CYTHON_USE_MODULE_STATE
   33176             :       __pyx_m_traverse, /* m_traverse */
   33177             :       __pyx_m_clear, /* m_clear */
   33178             :       NULL /* m_free */
   33179             :     #else
   33180             :       NULL, /* m_traverse */
   33181             :       NULL, /* m_clear */
   33182             :       NULL /* m_free */
   33183             :     #endif
   33184             :   };
   33185             :   #ifdef __cplusplus
   33186             : } /* anonymous namespace */
   33187             : #endif
   33188             : #endif
   33189             : 
   33190             : #ifndef CYTHON_NO_PYINIT_EXPORT
   33191             : #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
   33192             : #elif PY_MAJOR_VERSION < 3
   33193             : #ifdef __cplusplus
   33194             : #define __Pyx_PyMODINIT_FUNC extern "C" void
   33195             : #else
   33196             : #define __Pyx_PyMODINIT_FUNC void
   33197             : #endif
   33198             : #else
   33199             : #ifdef __cplusplus
   33200             : #define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
   33201             : #else
   33202             : #define __Pyx_PyMODINIT_FUNC PyObject *
   33203             : #endif
   33204             : #endif
   33205             : 
   33206             : 
   33207             : #if PY_MAJOR_VERSION < 3
   33208             : __Pyx_PyMODINIT_FUNC init_interpnd(void) CYTHON_SMALL_CODE; /*proto*/
   33209             : __Pyx_PyMODINIT_FUNC init_interpnd(void)
   33210             : #else
   33211             : __Pyx_PyMODINIT_FUNC PyInit__interpnd(void) CYTHON_SMALL_CODE; /*proto*/
   33212           3 : __Pyx_PyMODINIT_FUNC PyInit__interpnd(void)
   33213             : #if CYTHON_PEP489_MULTI_PHASE_INIT
   33214             : {
   33215           3 :   return PyModuleDef_Init(&__pyx_moduledef);
   33216             : }
   33217           3 : static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
   33218             :     #if PY_VERSION_HEX >= 0x030700A1
   33219           3 :     static PY_INT64_T main_interpreter_id = -1;
   33220           3 :     PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
   33221           3 :     if (main_interpreter_id == -1) {
   33222           3 :         main_interpreter_id = current_id;
   33223           6 :         return (unlikely(current_id == -1)) ? -1 : 0;
   33224           0 :     } else if (unlikely(main_interpreter_id != current_id))
   33225             :     #else
   33226             :     static PyInterpreterState *main_interpreter = NULL;
   33227             :     PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
   33228             :     if (!main_interpreter) {
   33229             :         main_interpreter = current_interpreter;
   33230             :     } else if (unlikely(main_interpreter != current_interpreter))
   33231             :     #endif
   33232             :     {
   33233           0 :         PyErr_SetString(
   33234             :             PyExc_ImportError,
   33235             :             "Interpreter change detected - this module can only be loaded into one interpreter per process.");
   33236           0 :         return -1;
   33237             :     }
   33238             :     return 0;
   33239             : }
   33240             : #if CYTHON_COMPILING_IN_LIMITED_API
   33241             : static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *module, const char* from_name, const char* to_name, int allow_none)
   33242             : #else
   33243          12 : static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none)
   33244             : #endif
   33245             : {
   33246          12 :     PyObject *value = PyObject_GetAttrString(spec, from_name);
   33247          12 :     int result = 0;
   33248          12 :     if (likely(value)) {
   33249          12 :         if (allow_none || value != Py_None) {
   33250             : #if CYTHON_COMPILING_IN_LIMITED_API
   33251             :             result = PyModule_AddObject(module, to_name, value);
   33252             : #else
   33253           9 :             result = PyDict_SetItemString(moddict, to_name, value);
   33254             : #endif
   33255             :         }
   33256          12 :         Py_DECREF(value);
   33257           0 :     } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
   33258           0 :         PyErr_Clear();
   33259             :     } else {
   33260             :         result = -1;
   33261             :     }
   33262          12 :     return result;
   33263             : }
   33264           3 : static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) {
   33265           3 :     PyObject *module = NULL, *moddict, *modname;
   33266           3 :     CYTHON_UNUSED_VAR(def);
   33267           3 :     if (__Pyx_check_single_interpreter())
   33268             :         return NULL;
   33269           3 :     if (__pyx_m)
   33270           0 :         return __Pyx_NewRef(__pyx_m);
   33271           3 :     modname = PyObject_GetAttrString(spec, "name");
   33272           3 :     if (unlikely(!modname)) goto bad;
   33273           3 :     module = PyModule_NewObject(modname);
   33274           3 :     Py_DECREF(modname);
   33275           3 :     if (unlikely(!module)) goto bad;
   33276             : #if CYTHON_COMPILING_IN_LIMITED_API
   33277             :     moddict = module;
   33278             : #else
   33279           3 :     moddict = PyModule_GetDict(module);
   33280           3 :     if (unlikely(!moddict)) goto bad;
   33281             : #endif
   33282           3 :     if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
   33283           3 :     if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
   33284           3 :     if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
   33285           3 :     if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
   33286             :     return module;
   33287           0 : bad:
   33288           0 :     Py_XDECREF(module);
   33289           0 :     return NULL;
   33290             : }
   33291             : 
   33292             : 
   33293           3 : static CYTHON_SMALL_CODE int __pyx_pymod_exec__interpnd(PyObject *__pyx_pyinit_module)
   33294             : #endif
   33295             : #endif
   33296             : {
   33297           3 :   int stringtab_initialized = 0;
   33298             :   #if CYTHON_USE_MODULE_STATE
   33299             :   int pystate_addmodule_run = 0;
   33300             :   #endif
   33301           3 :   PyObject *__pyx_t_1 = NULL;
   33302           3 :   PyObject *__pyx_t_2 = NULL;
   33303           3 :   PyObject *__pyx_t_3 = NULL;
   33304           3 :   PyObject *__pyx_t_4 = NULL;
   33305           3 :   PyObject *__pyx_t_5 = NULL;
   33306           3 :   int __pyx_t_6;
   33307           3 :   PyObject *__pyx_t_7 = NULL;
   33308           3 :   static PyThread_type_lock __pyx_t_8[8];
   33309           3 :   PyObject *__pyx_t_9 = NULL;
   33310           3 :   PyObject *__pyx_t_10 = NULL;
   33311           3 :   PyObject *__pyx_t_11 = NULL;
   33312           3 :   int __pyx_lineno = 0;
   33313           3 :   const char *__pyx_filename = NULL;
   33314           3 :   int __pyx_clineno = 0;
   33315             :   __Pyx_RefNannyDeclarations
   33316             :   #if CYTHON_PEP489_MULTI_PHASE_INIT
   33317           3 :   if (__pyx_m) {
   33318           0 :     if (__pyx_m == __pyx_pyinit_module) return 0;
   33319           0 :     PyErr_SetString(PyExc_RuntimeError, "Module '_interpnd' has already been imported. Re-initialisation is not supported.");
   33320           0 :     return -1;
   33321             :   }
   33322             :   #elif PY_MAJOR_VERSION >= 3
   33323             :   if (__pyx_m) return __Pyx_NewRef(__pyx_m);
   33324             :   #endif
   33325             :   /*--- Module creation code ---*/
   33326             :   #if CYTHON_PEP489_MULTI_PHASE_INIT
   33327           3 :   __pyx_m = __pyx_pyinit_module;
   33328           3 :   Py_INCREF(__pyx_m);
   33329             :   #else
   33330             :   #if PY_MAJOR_VERSION < 3
   33331             :   __pyx_m = Py_InitModule4("_interpnd", __pyx_methods, __pyx_k_Simple_N_D_interpolation_versio, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
   33332             :   if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
   33333             :   #elif CYTHON_USE_MODULE_STATE
   33334             :   __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
   33335             :   {
   33336             :     int add_module_result = PyState_AddModule(__pyx_t_1, &__pyx_moduledef);
   33337             :     __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "_interpnd" pseudovariable */
   33338             :     if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
   33339             :     pystate_addmodule_run = 1;
   33340             :   }
   33341             :   #else
   33342             :   __pyx_m = PyModule_Create(&__pyx_moduledef);
   33343             :   if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
   33344             :   #endif
   33345             :   #endif
   33346           3 :   CYTHON_UNUSED_VAR(__pyx_t_1);
   33347           3 :   __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
   33348           3 :   Py_INCREF(__pyx_d);
   33349           3 :   __pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
   33350           3 :   __pyx_cython_runtime = __Pyx_PyImport_AddModuleRef((const char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
   33351           3 :   if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   33352             :   #if CYTHON_REFNANNY
   33353             : __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
   33354             : if (!__Pyx_RefNanny) {
   33355             :   PyErr_Clear();
   33356             :   __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
   33357             :   if (!__Pyx_RefNanny)
   33358             :       Py_FatalError("failed to import 'refnanny' module");
   33359             : }
   33360             : #endif
   33361           3 :   __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit__interpnd(void)", 0);
   33362           3 :   if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   33363             :   #ifdef __Pxy_PyFrame_Initialize_Offsets
   33364             :   __Pxy_PyFrame_Initialize_Offsets();
   33365             :   #endif
   33366           3 :   __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
   33367           3 :   __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
   33368           3 :   __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
   33369             :   #ifdef __Pyx_CyFunction_USED
   33370           3 :   if (__pyx_CyFunction_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   33371             :   #endif
   33372             :   #ifdef __Pyx_FusedFunction_USED
   33373           3 :   if (__pyx_FusedFunction_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   33374             :   #endif
   33375             :   #ifdef __Pyx_Coroutine_USED
   33376             :   if (__pyx_Coroutine_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   33377             :   #endif
   33378             :   #ifdef __Pyx_Generator_USED
   33379             :   if (__pyx_Generator_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   33380             :   #endif
   33381             :   #ifdef __Pyx_AsyncGen_USED
   33382             :   if (__pyx_AsyncGen_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   33383             :   #endif
   33384             :   #ifdef __Pyx_StopAsyncIteration_USED
   33385             :   if (__pyx_StopAsyncIteration_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   33386             :   #endif
   33387             :   /*--- Library function declarations ---*/
   33388             :   /*--- Threads initialization code ---*/
   33389             :   #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
   33390             :   PyEval_InitThreads();
   33391             :   #endif
   33392             :   /*--- Initialize various global constants etc. ---*/
   33393           3 :   if (__Pyx_InitConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   33394           3 :   stringtab_initialized = 1;
   33395           3 :   if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   33396             :   #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
   33397             :   if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   33398             :   #endif
   33399           3 :   if (__pyx_module_is_main_scipy__interpolate___interpnd) {
   33400           0 :     if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name_2, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   33401             :   }
   33402             :   #if PY_MAJOR_VERSION >= 3
   33403             :   {
   33404           3 :     PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
   33405           3 :     if (!PyDict_GetItemString(modules, "scipy.interpolate._interpnd")) {
   33406           0 :       if (unlikely((PyDict_SetItemString(modules, "scipy.interpolate._interpnd", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
   33407             :     }
   33408             :   }
   33409             :   #endif
   33410             :   /*--- Builtin init code ---*/
   33411           3 :   if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   33412             :   /*--- Constants init code ---*/
   33413           3 :   if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   33414             :   /*--- Global type/function init code ---*/
   33415           3 :   (void)__Pyx_modinit_global_init_code();
   33416           3 :   (void)__Pyx_modinit_variable_export_code();
   33417           3 :   (void)__Pyx_modinit_function_export_code();
   33418           3 :   if (unlikely((__Pyx_modinit_type_init_code() < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
   33419           3 :   (void)__Pyx_modinit_type_import_code();
   33420           3 :   (void)__Pyx_modinit_variable_import_code();
   33421           3 :   if (unlikely((__Pyx_modinit_function_import_code() < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
   33422             :   /*--- Execution code ---*/
   33423             :   #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
   33424             :   if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   33425             :   #endif
   33426             : 
   33427             :   /* "View.MemoryView":99
   33428             :  * 
   33429             :  * cdef object __pyx_collections_abc_Sequence "__pyx_collections_abc_Sequence"
   33430             :  * try:             # <<<<<<<<<<<<<<
   33431             :  *     if __import__("sys").version_info >= (3, 3):
   33432             :  *         __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence
   33433             :  */
   33434             :   {
   33435           3 :     __Pyx_PyThreadState_declare
   33436           3 :     __Pyx_PyThreadState_assign
   33437           3 :     __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
   33438           3 :     __Pyx_XGOTREF(__pyx_t_1);
   33439           3 :     __Pyx_XGOTREF(__pyx_t_2);
   33440           3 :     __Pyx_XGOTREF(__pyx_t_3);
   33441             :     /*try:*/ {
   33442             : 
   33443             :       /* "View.MemoryView":100
   33444             :  * cdef object __pyx_collections_abc_Sequence "__pyx_collections_abc_Sequence"
   33445             :  * try:
   33446             :  *     if __import__("sys").version_info >= (3, 3):             # <<<<<<<<<<<<<<
   33447             :  *         __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence
   33448             :  *     else:
   33449             :  */
   33450           3 :       __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin___import__, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 100, __pyx_L2_error)
   33451           3 :       __Pyx_GOTREF(__pyx_t_4);
   33452           3 :       __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_version_info); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 100, __pyx_L2_error)
   33453           3 :       __Pyx_GOTREF(__pyx_t_5);
   33454           3 :       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   33455           3 :       __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_tuple__27, Py_GE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 100, __pyx_L2_error)
   33456           3 :       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   33457           3 :       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(1, 100, __pyx_L2_error)
   33458           3 :       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   33459           3 :       if (__pyx_t_6) {
   33460             : 
   33461             :         /* "View.MemoryView":101
   33462             :  * try:
   33463             :  *     if __import__("sys").version_info >= (3, 3):
   33464             :  *         __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence             # <<<<<<<<<<<<<<
   33465             :  *     else:
   33466             :  *         __pyx_collections_abc_Sequence = __import__("collections").Sequence
   33467             :  */
   33468           3 :         __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin___import__, __pyx_tuple__28, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 101, __pyx_L2_error)
   33469           3 :         __Pyx_GOTREF(__pyx_t_4);
   33470           3 :         __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_abc); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 101, __pyx_L2_error)
   33471           3 :         __Pyx_GOTREF(__pyx_t_5);
   33472           3 :         __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   33473           3 :         __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_Sequence); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 101, __pyx_L2_error)
   33474           3 :         __Pyx_GOTREF(__pyx_t_4);
   33475           3 :         __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   33476           3 :         __Pyx_XGOTREF(__pyx_collections_abc_Sequence);
   33477           3 :         __Pyx_DECREF_SET(__pyx_collections_abc_Sequence, __pyx_t_4);
   33478           3 :         __Pyx_GIVEREF(__pyx_t_4);
   33479           3 :         __pyx_t_4 = 0;
   33480             : 
   33481             :         /* "View.MemoryView":100
   33482             :  * cdef object __pyx_collections_abc_Sequence "__pyx_collections_abc_Sequence"
   33483             :  * try:
   33484             :  *     if __import__("sys").version_info >= (3, 3):             # <<<<<<<<<<<<<<
   33485             :  *         __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence
   33486             :  *     else:
   33487             :  */
   33488           3 :         goto __pyx_L8;
   33489             :       }
   33490             : 
   33491             :       /* "View.MemoryView":103
   33492             :  *         __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence
   33493             :  *     else:
   33494             :  *         __pyx_collections_abc_Sequence = __import__("collections").Sequence             # <<<<<<<<<<<<<<
   33495             :  * except:
   33496             :  * 
   33497             :  */
   33498             :       /*else*/ {
   33499           0 :         __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin___import__, __pyx_tuple__29, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 103, __pyx_L2_error)
   33500           0 :         __Pyx_GOTREF(__pyx_t_4);
   33501           0 :         __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_Sequence); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 103, __pyx_L2_error)
   33502           0 :         __Pyx_GOTREF(__pyx_t_5);
   33503           0 :         __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   33504           0 :         __Pyx_XGOTREF(__pyx_collections_abc_Sequence);
   33505           0 :         __Pyx_DECREF_SET(__pyx_collections_abc_Sequence, __pyx_t_5);
   33506           0 :         __Pyx_GIVEREF(__pyx_t_5);
   33507           0 :         __pyx_t_5 = 0;
   33508             :       }
   33509           3 :       __pyx_L8:;
   33510             : 
   33511             :       /* "View.MemoryView":99
   33512             :  * 
   33513             :  * cdef object __pyx_collections_abc_Sequence "__pyx_collections_abc_Sequence"
   33514             :  * try:             # <<<<<<<<<<<<<<
   33515             :  *     if __import__("sys").version_info >= (3, 3):
   33516             :  *         __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence
   33517             :  */
   33518             :     }
   33519           3 :     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
   33520           3 :     __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
   33521           3 :     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
   33522           3 :     goto __pyx_L7_try_end;
   33523           0 :     __pyx_L2_error:;
   33524           0 :     __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
   33525           0 :     __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
   33526             : 
   33527             :     /* "View.MemoryView":104
   33528             :  *     else:
   33529             :  *         __pyx_collections_abc_Sequence = __import__("collections").Sequence
   33530             :  * except:             # <<<<<<<<<<<<<<
   33531             :  * 
   33532             :  *     __pyx_collections_abc_Sequence = None
   33533             :  */
   33534             :     /*except:*/ {
   33535           0 :       __Pyx_AddTraceback("View.MemoryView", __pyx_clineno, __pyx_lineno, __pyx_filename);
   33536           0 :       if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_7) < 0) __PYX_ERR(1, 104, __pyx_L4_except_error)
   33537           0 :       __Pyx_XGOTREF(__pyx_t_5);
   33538           0 :       __Pyx_XGOTREF(__pyx_t_4);
   33539           0 :       __Pyx_XGOTREF(__pyx_t_7);
   33540             : 
   33541             :       /* "View.MemoryView":106
   33542             :  * except:
   33543             :  * 
   33544             :  *     __pyx_collections_abc_Sequence = None             # <<<<<<<<<<<<<<
   33545             :  * 
   33546             :  * 
   33547             :  */
   33548           0 :       __Pyx_INCREF(Py_None);
   33549           0 :       __Pyx_XGOTREF(__pyx_collections_abc_Sequence);
   33550           0 :       __Pyx_DECREF_SET(__pyx_collections_abc_Sequence, Py_None);
   33551           0 :       __Pyx_GIVEREF(Py_None);
   33552           0 :       __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
   33553           0 :       __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
   33554           0 :       __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
   33555           0 :       goto __pyx_L3_exception_handled;
   33556             :     }
   33557             : 
   33558             :     /* "View.MemoryView":99
   33559             :  * 
   33560             :  * cdef object __pyx_collections_abc_Sequence "__pyx_collections_abc_Sequence"
   33561             :  * try:             # <<<<<<<<<<<<<<
   33562             :  *     if __import__("sys").version_info >= (3, 3):
   33563             :  *         __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence
   33564             :  */
   33565           0 :     __pyx_L4_except_error:;
   33566           0 :     __Pyx_XGIVEREF(__pyx_t_1);
   33567           0 :     __Pyx_XGIVEREF(__pyx_t_2);
   33568           0 :     __Pyx_XGIVEREF(__pyx_t_3);
   33569           0 :     __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
   33570           0 :     goto __pyx_L1_error;
   33571           0 :     __pyx_L3_exception_handled:;
   33572           0 :     __Pyx_XGIVEREF(__pyx_t_1);
   33573           0 :     __Pyx_XGIVEREF(__pyx_t_2);
   33574           0 :     __Pyx_XGIVEREF(__pyx_t_3);
   33575           0 :     __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
   33576           3 :     __pyx_L7_try_end:;
   33577             :   }
   33578             : 
   33579             :   /* "View.MemoryView":241
   33580             :  * 
   33581             :  * 
   33582             :  *     try:             # <<<<<<<<<<<<<<
   33583             :  *         count = __pyx_collections_abc_Sequence.count
   33584             :  *         index = __pyx_collections_abc_Sequence.index
   33585             :  */
   33586             :   {
   33587           3 :     __Pyx_PyThreadState_declare
   33588           3 :     __Pyx_PyThreadState_assign
   33589           3 :     __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1);
   33590           3 :     __Pyx_XGOTREF(__pyx_t_3);
   33591           3 :     __Pyx_XGOTREF(__pyx_t_2);
   33592           3 :     __Pyx_XGOTREF(__pyx_t_1);
   33593             :     /*try:*/ {
   33594             : 
   33595             :       /* "View.MemoryView":242
   33596             :  * 
   33597             :  *     try:
   33598             :  *         count = __pyx_collections_abc_Sequence.count             # <<<<<<<<<<<<<<
   33599             :  *         index = __pyx_collections_abc_Sequence.index
   33600             :  *     except:
   33601             :  */
   33602           3 :       __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_collections_abc_Sequence, __pyx_n_s_count); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 242, __pyx_L11_error)
   33603           3 :       __Pyx_GOTREF(__pyx_t_7);
   33604           3 :       if (__Pyx_SetItemOnTypeDict(__pyx_array_type, __pyx_n_s_count, __pyx_t_7) < 0) __PYX_ERR(1, 242, __pyx_L11_error)
   33605           3 :       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   33606           3 :       PyType_Modified(__pyx_array_type);
   33607             : 
   33608             :       /* "View.MemoryView":243
   33609             :  *     try:
   33610             :  *         count = __pyx_collections_abc_Sequence.count
   33611             :  *         index = __pyx_collections_abc_Sequence.index             # <<<<<<<<<<<<<<
   33612             :  *     except:
   33613             :  *         pass
   33614             :  */
   33615           3 :       __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_collections_abc_Sequence, __pyx_n_s_index); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 243, __pyx_L11_error)
   33616           3 :       __Pyx_GOTREF(__pyx_t_7);
   33617           3 :       if (__Pyx_SetItemOnTypeDict(__pyx_array_type, __pyx_n_s_index, __pyx_t_7) < 0) __PYX_ERR(1, 243, __pyx_L11_error)
   33618           3 :       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   33619           3 :       PyType_Modified(__pyx_array_type);
   33620             : 
   33621             :       /* "View.MemoryView":241
   33622             :  * 
   33623             :  * 
   33624             :  *     try:             # <<<<<<<<<<<<<<
   33625             :  *         count = __pyx_collections_abc_Sequence.count
   33626             :  *         index = __pyx_collections_abc_Sequence.index
   33627             :  */
   33628             :     }
   33629           3 :     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
   33630           3 :     __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
   33631           3 :     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
   33632           3 :     goto __pyx_L16_try_end;
   33633           0 :     __pyx_L11_error:;
   33634           0 :     __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
   33635           0 :     __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
   33636           0 :     __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
   33637             : 
   33638             :     /* "View.MemoryView":244
   33639             :  *         count = __pyx_collections_abc_Sequence.count
   33640             :  *         index = __pyx_collections_abc_Sequence.index
   33641             :  *     except:             # <<<<<<<<<<<<<<
   33642             :  *         pass
   33643             :  * 
   33644             :  */
   33645             :     /*except:*/ {
   33646           0 :       __Pyx_ErrRestore(0,0,0);
   33647           0 :       goto __pyx_L12_exception_handled;
   33648             :     }
   33649           0 :     __pyx_L12_exception_handled:;
   33650           0 :     __Pyx_XGIVEREF(__pyx_t_3);
   33651           0 :     __Pyx_XGIVEREF(__pyx_t_2);
   33652           0 :     __Pyx_XGIVEREF(__pyx_t_1);
   33653           0 :     __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1);
   33654           3 :     __pyx_L16_try_end:;
   33655             :   }
   33656             : 
   33657             :   /* "View.MemoryView":309
   33658             :  *         return self.name
   33659             :  * 
   33660             :  * cdef generic = Enum("<strided and direct or indirect>")             # <<<<<<<<<<<<<<
   33661             :  * cdef strided = Enum("<strided and direct>") # default
   33662             :  * cdef indirect = Enum("<strided and indirect>")
   33663             :  */
   33664           3 :   __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 309, __pyx_L1_error)
   33665           3 :   __Pyx_GOTREF(__pyx_t_7);
   33666           3 :   __Pyx_XGOTREF(generic);
   33667           3 :   __Pyx_DECREF_SET(generic, __pyx_t_7);
   33668           3 :   __Pyx_GIVEREF(__pyx_t_7);
   33669           3 :   __pyx_t_7 = 0;
   33670             : 
   33671             :   /* "View.MemoryView":310
   33672             :  * 
   33673             :  * cdef generic = Enum("<strided and direct or indirect>")
   33674             :  * cdef strided = Enum("<strided and direct>") # default             # <<<<<<<<<<<<<<
   33675             :  * cdef indirect = Enum("<strided and indirect>")
   33676             :  * 
   33677             :  */
   33678           3 :   __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 310, __pyx_L1_error)
   33679           3 :   __Pyx_GOTREF(__pyx_t_7);
   33680           3 :   __Pyx_XGOTREF(strided);
   33681           3 :   __Pyx_DECREF_SET(strided, __pyx_t_7);
   33682           3 :   __Pyx_GIVEREF(__pyx_t_7);
   33683           3 :   __pyx_t_7 = 0;
   33684             : 
   33685             :   /* "View.MemoryView":311
   33686             :  * cdef generic = Enum("<strided and direct or indirect>")
   33687             :  * cdef strided = Enum("<strided and direct>") # default
   33688             :  * cdef indirect = Enum("<strided and indirect>")             # <<<<<<<<<<<<<<
   33689             :  * 
   33690             :  * 
   33691             :  */
   33692           3 :   __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__32, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 311, __pyx_L1_error)
   33693           3 :   __Pyx_GOTREF(__pyx_t_7);
   33694           3 :   __Pyx_XGOTREF(indirect);
   33695           3 :   __Pyx_DECREF_SET(indirect, __pyx_t_7);
   33696           3 :   __Pyx_GIVEREF(__pyx_t_7);
   33697           3 :   __pyx_t_7 = 0;
   33698             : 
   33699             :   /* "View.MemoryView":314
   33700             :  * 
   33701             :  * 
   33702             :  * cdef contiguous = Enum("<contiguous and direct>")             # <<<<<<<<<<<<<<
   33703             :  * cdef indirect_contiguous = Enum("<contiguous and indirect>")
   33704             :  * 
   33705             :  */
   33706           3 :   __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__33, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 314, __pyx_L1_error)
   33707           3 :   __Pyx_GOTREF(__pyx_t_7);
   33708           3 :   __Pyx_XGOTREF(contiguous);
   33709           3 :   __Pyx_DECREF_SET(contiguous, __pyx_t_7);
   33710           3 :   __Pyx_GIVEREF(__pyx_t_7);
   33711           3 :   __pyx_t_7 = 0;
   33712             : 
   33713             :   /* "View.MemoryView":315
   33714             :  * 
   33715             :  * cdef contiguous = Enum("<contiguous and direct>")
   33716             :  * cdef indirect_contiguous = Enum("<contiguous and indirect>")             # <<<<<<<<<<<<<<
   33717             :  * 
   33718             :  * 
   33719             :  */
   33720           3 :   __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__34, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 315, __pyx_L1_error)
   33721           3 :   __Pyx_GOTREF(__pyx_t_7);
   33722           3 :   __Pyx_XGOTREF(indirect_contiguous);
   33723           3 :   __Pyx_DECREF_SET(indirect_contiguous, __pyx_t_7);
   33724           3 :   __Pyx_GIVEREF(__pyx_t_7);
   33725           3 :   __pyx_t_7 = 0;
   33726             : 
   33727             :   /* "View.MemoryView":323
   33728             :  * 
   33729             :  * 
   33730             :  * cdef int __pyx_memoryview_thread_locks_used = 0             # <<<<<<<<<<<<<<
   33731             :  * cdef PyThread_type_lock[8] __pyx_memoryview_thread_locks = [
   33732             :  *     PyThread_allocate_lock(),
   33733             :  */
   33734           3 :   __pyx_memoryview_thread_locks_used = 0;
   33735             : 
   33736             :   /* "View.MemoryView":324
   33737             :  * 
   33738             :  * cdef int __pyx_memoryview_thread_locks_used = 0
   33739             :  * cdef PyThread_type_lock[8] __pyx_memoryview_thread_locks = [             # <<<<<<<<<<<<<<
   33740             :  *     PyThread_allocate_lock(),
   33741             :  *     PyThread_allocate_lock(),
   33742             :  */
   33743           3 :   __pyx_t_8[0] = PyThread_allocate_lock();
   33744           3 :   __pyx_t_8[1] = PyThread_allocate_lock();
   33745           3 :   __pyx_t_8[2] = PyThread_allocate_lock();
   33746           3 :   __pyx_t_8[3] = PyThread_allocate_lock();
   33747           3 :   __pyx_t_8[4] = PyThread_allocate_lock();
   33748           3 :   __pyx_t_8[5] = PyThread_allocate_lock();
   33749           3 :   __pyx_t_8[6] = PyThread_allocate_lock();
   33750           3 :   __pyx_t_8[7] = PyThread_allocate_lock();
   33751           3 :   memcpy(&(__pyx_memoryview_thread_locks[0]), __pyx_t_8, sizeof(__pyx_memoryview_thread_locks[0]) * (8));
   33752             : 
   33753             :   /* "View.MemoryView":982
   33754             :  * 
   33755             :  * 
   33756             :  *     try:             # <<<<<<<<<<<<<<
   33757             :  *         count = __pyx_collections_abc_Sequence.count
   33758             :  *         index = __pyx_collections_abc_Sequence.index
   33759             :  */
   33760             :   {
   33761           3 :     __Pyx_PyThreadState_declare
   33762           3 :     __Pyx_PyThreadState_assign
   33763           3 :     __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
   33764           3 :     __Pyx_XGOTREF(__pyx_t_1);
   33765           3 :     __Pyx_XGOTREF(__pyx_t_2);
   33766           3 :     __Pyx_XGOTREF(__pyx_t_3);
   33767             :     /*try:*/ {
   33768             : 
   33769             :       /* "View.MemoryView":983
   33770             :  * 
   33771             :  *     try:
   33772             :  *         count = __pyx_collections_abc_Sequence.count             # <<<<<<<<<<<<<<
   33773             :  *         index = __pyx_collections_abc_Sequence.index
   33774             :  *     except:
   33775             :  */
   33776           3 :       __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_collections_abc_Sequence, __pyx_n_s_count); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 983, __pyx_L17_error)
   33777           3 :       __Pyx_GOTREF(__pyx_t_7);
   33778           3 :       if (__Pyx_SetItemOnTypeDict(__pyx_memoryviewslice_type, __pyx_n_s_count, __pyx_t_7) < 0) __PYX_ERR(1, 983, __pyx_L17_error)
   33779           3 :       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   33780           3 :       PyType_Modified(__pyx_memoryviewslice_type);
   33781             : 
   33782             :       /* "View.MemoryView":984
   33783             :  *     try:
   33784             :  *         count = __pyx_collections_abc_Sequence.count
   33785             :  *         index = __pyx_collections_abc_Sequence.index             # <<<<<<<<<<<<<<
   33786             :  *     except:
   33787             :  *         pass
   33788             :  */
   33789           3 :       __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_collections_abc_Sequence, __pyx_n_s_index); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 984, __pyx_L17_error)
   33790           3 :       __Pyx_GOTREF(__pyx_t_7);
   33791           3 :       if (__Pyx_SetItemOnTypeDict(__pyx_memoryviewslice_type, __pyx_n_s_index, __pyx_t_7) < 0) __PYX_ERR(1, 984, __pyx_L17_error)
   33792           3 :       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   33793           3 :       PyType_Modified(__pyx_memoryviewslice_type);
   33794             : 
   33795             :       /* "View.MemoryView":982
   33796             :  * 
   33797             :  * 
   33798             :  *     try:             # <<<<<<<<<<<<<<
   33799             :  *         count = __pyx_collections_abc_Sequence.count
   33800             :  *         index = __pyx_collections_abc_Sequence.index
   33801             :  */
   33802             :     }
   33803           3 :     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
   33804           3 :     __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
   33805           3 :     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
   33806           3 :     goto __pyx_L22_try_end;
   33807           0 :     __pyx_L17_error:;
   33808           0 :     __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
   33809           0 :     __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
   33810           0 :     __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
   33811             : 
   33812             :     /* "View.MemoryView":985
   33813             :  *         count = __pyx_collections_abc_Sequence.count
   33814             :  *         index = __pyx_collections_abc_Sequence.index
   33815             :  *     except:             # <<<<<<<<<<<<<<
   33816             :  *         pass
   33817             :  * 
   33818             :  */
   33819             :     /*except:*/ {
   33820           0 :       __Pyx_ErrRestore(0,0,0);
   33821           0 :       goto __pyx_L18_exception_handled;
   33822             :     }
   33823           0 :     __pyx_L18_exception_handled:;
   33824           0 :     __Pyx_XGIVEREF(__pyx_t_1);
   33825           0 :     __Pyx_XGIVEREF(__pyx_t_2);
   33826           0 :     __Pyx_XGIVEREF(__pyx_t_3);
   33827           0 :     __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
   33828           3 :     __pyx_L22_try_end:;
   33829             :   }
   33830             : 
   33831             :   /* "View.MemoryView":988
   33832             :  *         pass
   33833             :  * 
   33834             :  * try:             # <<<<<<<<<<<<<<
   33835             :  *     if __pyx_collections_abc_Sequence:
   33836             :  * 
   33837             :  */
   33838             :   {
   33839           3 :     __Pyx_PyThreadState_declare
   33840           3 :     __Pyx_PyThreadState_assign
   33841           3 :     __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1);
   33842           3 :     __Pyx_XGOTREF(__pyx_t_3);
   33843           3 :     __Pyx_XGOTREF(__pyx_t_2);
   33844           3 :     __Pyx_XGOTREF(__pyx_t_1);
   33845             :     /*try:*/ {
   33846             : 
   33847             :       /* "View.MemoryView":989
   33848             :  * 
   33849             :  * try:
   33850             :  *     if __pyx_collections_abc_Sequence:             # <<<<<<<<<<<<<<
   33851             :  * 
   33852             :  * 
   33853             :  */
   33854           3 :       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_collections_abc_Sequence); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(1, 989, __pyx_L23_error)
   33855           3 :       if (__pyx_t_6) {
   33856             : 
   33857             :         /* "View.MemoryView":993
   33858             :  * 
   33859             :  * 
   33860             :  *         __pyx_collections_abc_Sequence.register(_memoryviewslice)             # <<<<<<<<<<<<<<
   33861             :  *         __pyx_collections_abc_Sequence.register(array)
   33862             :  * except:
   33863             :  */
   33864           3 :         __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_collections_abc_Sequence, __pyx_n_s_register); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 993, __pyx_L23_error)
   33865           3 :         __Pyx_GOTREF(__pyx_t_7);
   33866           3 :         __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_7, ((PyObject *)__pyx_memoryviewslice_type)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 993, __pyx_L23_error)
   33867           3 :         __Pyx_GOTREF(__pyx_t_4);
   33868           3 :         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   33869           3 :         __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   33870             : 
   33871             :         /* "View.MemoryView":994
   33872             :  * 
   33873             :  *         __pyx_collections_abc_Sequence.register(_memoryviewslice)
   33874             :  *         __pyx_collections_abc_Sequence.register(array)             # <<<<<<<<<<<<<<
   33875             :  * except:
   33876             :  *     pass  # ignore failure, it's a minor issue
   33877             :  */
   33878           3 :         __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_collections_abc_Sequence, __pyx_n_s_register); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 994, __pyx_L23_error)
   33879           3 :         __Pyx_GOTREF(__pyx_t_4);
   33880           3 :         __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_array_type)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 994, __pyx_L23_error)
   33881           3 :         __Pyx_GOTREF(__pyx_t_7);
   33882           3 :         __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   33883           6 :         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   33884             : 
   33885             :         /* "View.MemoryView":989
   33886             :  * 
   33887             :  * try:
   33888             :  *     if __pyx_collections_abc_Sequence:             # <<<<<<<<<<<<<<
   33889             :  * 
   33890             :  * 
   33891             :  */
   33892             :       }
   33893             : 
   33894             :       /* "View.MemoryView":988
   33895             :  *         pass
   33896             :  * 
   33897             :  * try:             # <<<<<<<<<<<<<<
   33898             :  *     if __pyx_collections_abc_Sequence:
   33899             :  * 
   33900             :  */
   33901             :     }
   33902           3 :     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
   33903           3 :     __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
   33904           3 :     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
   33905           3 :     goto __pyx_L28_try_end;
   33906           0 :     __pyx_L23_error:;
   33907           0 :     __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
   33908           0 :     __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
   33909           0 :     __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
   33910             : 
   33911             :     /* "View.MemoryView":995
   33912             :  *         __pyx_collections_abc_Sequence.register(_memoryviewslice)
   33913             :  *         __pyx_collections_abc_Sequence.register(array)
   33914             :  * except:             # <<<<<<<<<<<<<<
   33915             :  *     pass  # ignore failure, it's a minor issue
   33916             :  * 
   33917             :  */
   33918             :     /*except:*/ {
   33919           0 :       __Pyx_ErrRestore(0,0,0);
   33920           0 :       goto __pyx_L24_exception_handled;
   33921             :     }
   33922           0 :     __pyx_L24_exception_handled:;
   33923           0 :     __Pyx_XGIVEREF(__pyx_t_3);
   33924           0 :     __Pyx_XGIVEREF(__pyx_t_2);
   33925           0 :     __Pyx_XGIVEREF(__pyx_t_1);
   33926           0 :     __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1);
   33927           3 :     __pyx_L28_try_end:;
   33928             :   }
   33929             : 
   33930             :   /* "(tree fragment)":1
   33931             :  * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
   33932             :  *     cdef object __pyx_PickleError
   33933             :  *     cdef object __pyx_result
   33934             :  */
   33935           3 :   __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_15View_dot_MemoryView_1__pyx_unpickle_Enum, NULL, __pyx_n_s_View_MemoryView); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1, __pyx_L1_error)
   33936           3 :   __Pyx_GOTREF(__pyx_t_7);
   33937           3 :   if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Enum, __pyx_t_7) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
   33938           3 :   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   33939             : 
   33940             :   /* "scipy/interpolate/_interpnd.pyx":26
   33941             :  * from libc.math cimport fabs, sqrt
   33942             :  * 
   33943             :  * import numpy as np             # <<<<<<<<<<<<<<
   33944             :  * 
   33945             :  * import scipy.spatial._qhull as qhull
   33946             :  */
   33947           3 :   __pyx_t_7 = __Pyx_ImportDottedModule(__pyx_n_s_numpy, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26, __pyx_L1_error)
   33948           3 :   __Pyx_GOTREF(__pyx_t_7);
   33949           3 :   if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_7) < 0) __PYX_ERR(0, 26, __pyx_L1_error)
   33950           3 :   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   33951             : 
   33952             :   /* "scipy/interpolate/_interpnd.pyx":28
   33953             :  * import numpy as np
   33954             :  * 
   33955             :  * import scipy.spatial._qhull as qhull             # <<<<<<<<<<<<<<
   33956             :  * cimport scipy.spatial._qhull as qhull
   33957             :  * 
   33958             :  */
   33959           3 :   __pyx_t_7 = __Pyx_ImportDottedModule(__pyx_n_s_scipy_spatial__qhull, __pyx_tuple__37); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 28, __pyx_L1_error)
   33960           3 :   __Pyx_GOTREF(__pyx_t_7);
   33961           3 :   if (PyDict_SetItem(__pyx_d, __pyx_n_s_qhull, __pyx_t_7) < 0) __PYX_ERR(0, 28, __pyx_L1_error)
   33962           3 :   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   33963             : 
   33964             :   /* "scipy/interpolate/_interpnd.pyx":31
   33965             :  * cimport scipy.spatial._qhull as qhull
   33966             :  * 
   33967             :  * import warnings             # <<<<<<<<<<<<<<
   33968             :  * 
   33969             :  * #------------------------------------------------------------------------------
   33970             :  */
   33971           3 :   __pyx_t_7 = __Pyx_ImportDottedModule(__pyx_n_s_warnings, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 31, __pyx_L1_error)
   33972           3 :   __Pyx_GOTREF(__pyx_t_7);
   33973           3 :   if (PyDict_SetItem(__pyx_d, __pyx_n_s_warnings, __pyx_t_7) < 0) __PYX_ERR(0, 31, __pyx_L1_error)
   33974           3 :   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   33975             : 
   33976             :   /* "scipy/interpolate/_interpnd.pyx":50
   33977             :  * #------------------------------------------------------------------------------
   33978             :  * 
   33979             :  * class NDInterpolatorBase:             # <<<<<<<<<<<<<<
   33980             :  *     """
   33981             :  *     Common routines for interpolators.
   33982             :  */
   33983           3 :   __pyx_t_7 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_NDInterpolatorBase, __pyx_n_s_NDInterpolatorBase, (PyObject *) NULL, __pyx_n_s_scipy_interpolate__interpnd, __pyx_kp_s_Common_routines_for_interpolato); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 50, __pyx_L1_error)
   33984           3 :   __Pyx_GOTREF(__pyx_t_7);
   33985             : 
   33986             :   /* "scipy/interpolate/_interpnd.pyx":58
   33987             :  *     """
   33988             :  * 
   33989             :  *     def __init__(self, points, values, fill_value=np.nan, ndim=None,             # <<<<<<<<<<<<<<
   33990             :  *                  rescale=False, need_contiguous=True, need_values=True):
   33991             :  *         """
   33992             :  */
   33993           3 :   __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_5scipy_11interpolate_9_interpnd_18NDInterpolatorBase_1__init__, 0, __pyx_n_s_NDInterpolatorBase___init, NULL, __pyx_n_s_scipy_interpolate__interpnd, __pyx_d, ((PyObject *)__pyx_codeobj__39)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 58, __pyx_L1_error)
   33994           3 :   __Pyx_GOTREF(__pyx_t_4);
   33995           3 :   if (!__Pyx_CyFunction_InitDefaults(__pyx_t_4, sizeof(__pyx_defaults), 1)) __PYX_ERR(0, 58, __pyx_L1_error)
   33996           3 :   __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 58, __pyx_L1_error)
   33997           3 :   __Pyx_GOTREF(__pyx_t_5);
   33998           3 :   __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_nan); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 58, __pyx_L1_error)
   33999           3 :   __Pyx_GOTREF(__pyx_t_9);
   34000           3 :   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   34001           3 :   __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_t_4)->__pyx_arg_fill_value = __pyx_t_9;
   34002           3 :   __Pyx_GIVEREF(__pyx_t_9);
   34003           3 :   __pyx_t_9 = 0;
   34004           3 :   __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_4, __pyx_pf_5scipy_11interpolate_9_interpnd_4__defaults__);
   34005           3 :   if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 58, __pyx_L1_error)
   34006           3 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   34007             : 
   34008             :   /* "scipy/interpolate/_interpnd.pyx":100
   34009             :  *             self.values = None
   34010             :  * 
   34011             :  *     def _calculate_triangulation(self, points):             # <<<<<<<<<<<<<<
   34012             :  *         pass
   34013             :  * 
   34014             :  */
   34015           3 :   __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_5scipy_11interpolate_9_interpnd_18NDInterpolatorBase_3_calculate_triangulation, 0, __pyx_n_s_NDInterpolatorBase__calculate_tr, NULL, __pyx_n_s_scipy_interpolate__interpnd, __pyx_d, ((PyObject *)__pyx_codeobj__41)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 100, __pyx_L1_error)
   34016           3 :   __Pyx_GOTREF(__pyx_t_4);
   34017           3 :   if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_calculate_triangulation, __pyx_t_4) < 0) __PYX_ERR(0, 100, __pyx_L1_error)
   34018           3 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   34019             : 
   34020             :   /* "scipy/interpolate/_interpnd.pyx":103
   34021             :  *         pass
   34022             :  * 
   34023             :  *     def _set_values(self, values, fill_value=np.nan, need_contiguous=True, ndim=None):             # <<<<<<<<<<<<<<
   34024             :  *         values = np.asarray(values)
   34025             :  *         _check_init_shape(self.points, values, ndim=ndim)
   34026             :  */
   34027           3 :   __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_5scipy_11interpolate_9_interpnd_18NDInterpolatorBase_5_set_values, 0, __pyx_n_s_NDInterpolatorBase__set_values, NULL, __pyx_n_s_scipy_interpolate__interpnd, __pyx_d, ((PyObject *)__pyx_codeobj__43)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 103, __pyx_L1_error)
   34028           3 :   __Pyx_GOTREF(__pyx_t_4);
   34029           3 :   if (!__Pyx_CyFunction_InitDefaults(__pyx_t_4, sizeof(__pyx_defaults1), 1)) __PYX_ERR(0, 103, __pyx_L1_error)
   34030           3 :   __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 103, __pyx_L1_error)
   34031           3 :   __Pyx_GOTREF(__pyx_t_9);
   34032           3 :   __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_nan); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 103, __pyx_L1_error)
   34033           3 :   __Pyx_GOTREF(__pyx_t_5);
   34034           3 :   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
   34035           3 :   __Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_t_4)->__pyx_arg_fill_value = __pyx_t_5;
   34036           3 :   __Pyx_GIVEREF(__pyx_t_5);
   34037           3 :   __pyx_t_5 = 0;
   34038           3 :   __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_4, __pyx_pf_5scipy_11interpolate_9_interpnd_6__defaults__);
   34039           3 :   if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_set_values, __pyx_t_4) < 0) __PYX_ERR(0, 103, __pyx_L1_error)
   34040           3 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   34041             : 
   34042             :   /* "scipy/interpolate/_interpnd.pyx":130
   34043             :  *             self.fill_value = float(fill_value)
   34044             :  * 
   34045             :  *     def _check_call_shape(self, xi):             # <<<<<<<<<<<<<<
   34046             :  *         xi = np.asanyarray(xi)
   34047             :  *         if xi.shape[-1] != self.points.shape[1]:
   34048             :  */
   34049           3 :   __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_5scipy_11interpolate_9_interpnd_18NDInterpolatorBase_7_check_call_shape, 0, __pyx_n_s_NDInterpolatorBase__check_call_s, NULL, __pyx_n_s_scipy_interpolate__interpnd, __pyx_d, ((PyObject *)__pyx_codeobj__45)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 130, __pyx_L1_error)
   34050           3 :   __Pyx_GOTREF(__pyx_t_4);
   34051           3 :   if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_check_call_shape, __pyx_t_4) < 0) __PYX_ERR(0, 130, __pyx_L1_error)
   34052           3 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   34053             : 
   34054             :   /* "scipy/interpolate/_interpnd.pyx":136
   34055             :  *         return xi
   34056             :  * 
   34057             :  *     def _scale_x(self, xi):             # <<<<<<<<<<<<<<
   34058             :  *         if self.scale is None:
   34059             :  *             return xi
   34060             :  */
   34061           3 :   __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_5scipy_11interpolate_9_interpnd_18NDInterpolatorBase_9_scale_x, 0, __pyx_n_s_NDInterpolatorBase__scale_x, NULL, __pyx_n_s_scipy_interpolate__interpnd, __pyx_d, ((PyObject *)__pyx_codeobj__46)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 136, __pyx_L1_error)
   34062           3 :   __Pyx_GOTREF(__pyx_t_4);
   34063           3 :   if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_scale_x, __pyx_t_4) < 0) __PYX_ERR(0, 136, __pyx_L1_error)
   34064           3 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   34065             : 
   34066             :   /* "scipy/interpolate/_interpnd.pyx":142
   34067             :  *             return (xi - self.offset) / self.scale
   34068             :  * 
   34069             :  *     def _preprocess_xi(self, *args):             # <<<<<<<<<<<<<<
   34070             :  *         xi = _ndim_coords_from_arrays(args, ndim=self.points.shape[1])
   34071             :  *         xi = self._check_call_shape(xi)
   34072             :  */
   34073           3 :   __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_5scipy_11interpolate_9_interpnd_18NDInterpolatorBase_11_preprocess_xi, 0, __pyx_n_s_NDInterpolatorBase__preprocess_x, NULL, __pyx_n_s_scipy_interpolate__interpnd, __pyx_d, ((PyObject *)__pyx_codeobj__48)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 142, __pyx_L1_error)
   34074           3 :   __Pyx_GOTREF(__pyx_t_4);
   34075           3 :   if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_preprocess_xi, __pyx_t_4) < 0) __PYX_ERR(0, 142, __pyx_L1_error)
   34076           3 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   34077             : 
   34078             :   /* "scipy/interpolate/_interpnd.pyx":150
   34079             :  *         return self._scale_x(xi), interpolation_points_shape
   34080             :  * 
   34081             :  *     def __call__(self, *args):             # <<<<<<<<<<<<<<
   34082             :  *         """
   34083             :  *         interpolator(xi)
   34084             :  */
   34085           3 :   __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_5scipy_11interpolate_9_interpnd_18NDInterpolatorBase_13__call__, 0, __pyx_n_s_NDInterpolatorBase___call, NULL, __pyx_n_s_scipy_interpolate__interpnd, __pyx_d, ((PyObject *)__pyx_codeobj__50)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 150, __pyx_L1_error)
   34086           3 :   __Pyx_GOTREF(__pyx_t_4);
   34087           3 :   if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_call, __pyx_t_4) < 0) __PYX_ERR(0, 150, __pyx_L1_error)
   34088           3 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   34089             : 
   34090             :   /* "scipy/interpolate/_interpnd.pyx":50
   34091             :  * #------------------------------------------------------------------------------
   34092             :  * 
   34093             :  * class NDInterpolatorBase:             # <<<<<<<<<<<<<<
   34094             :  *     """
   34095             :  *     Common routines for interpolators.
   34096             :  */
   34097           3 :   __pyx_t_4 = __Pyx_Py3ClassCreate(((PyObject*)&PyType_Type), __pyx_n_s_NDInterpolatorBase, __pyx_empty_tuple, __pyx_t_7, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 50, __pyx_L1_error)
   34098           3 :   __Pyx_GOTREF(__pyx_t_4);
   34099           3 :   if (PyDict_SetItem(__pyx_d, __pyx_n_s_NDInterpolatorBase, __pyx_t_4) < 0) __PYX_ERR(0, 50, __pyx_L1_error)
   34100           3 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   34101           3 :   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   34102             : 
   34103             :   /* "scipy/interpolate/_interpnd.pyx":173
   34104             :  * 
   34105             :  * 
   34106             :  * cpdef _ndim_coords_from_arrays(points, ndim=None):             # <<<<<<<<<<<<<<
   34107             :  *     """
   34108             :  *     Convert a tuple of coordinate arrays to a (..., ndim)-shaped array.
   34109             :  */
   34110           3 :   __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_5scipy_11interpolate_9_interpnd_1_ndim_coords_from_arrays, 0, __pyx_n_s_ndim_coords_from_arrays, NULL, __pyx_n_s_scipy_interpolate__interpnd, __pyx_d, ((PyObject *)__pyx_codeobj__52)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 173, __pyx_L1_error)
   34111           3 :   __Pyx_GOTREF(__pyx_t_7);
   34112           6 :   __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_tuple__53);
   34113           3 :   if (PyDict_SetItem(__pyx_d, __pyx_n_s_ndim_coords_from_arrays, __pyx_t_7) < 0) __PYX_ERR(0, 173, __pyx_L1_error)
   34114           3 :   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   34115             : 
   34116             :   /* "scipy/interpolate/_interpnd.pyx":222
   34117             :  * #------------------------------------------------------------------------------
   34118             :  * 
   34119             :  * class LinearNDInterpolator(NDInterpolatorBase):             # <<<<<<<<<<<<<<
   34120             :  *     """
   34121             :  *     LinearNDInterpolator(points, values, fill_value=np.nan, rescale=False)
   34122             :  */
   34123           3 :   __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_NDInterpolatorBase); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 222, __pyx_L1_error)
   34124           3 :   __Pyx_GOTREF(__pyx_t_7);
   34125           3 :   __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 222, __pyx_L1_error)
   34126           3 :   __Pyx_GOTREF(__pyx_t_4);
   34127           3 :   __Pyx_GIVEREF(__pyx_t_7);
   34128           3 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_7)) __PYX_ERR(0, 222, __pyx_L1_error);
   34129           3 :   __pyx_t_7 = 0;
   34130           3 :   __pyx_t_7 = __Pyx_PEP560_update_bases(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 222, __pyx_L1_error)
   34131           3 :   __Pyx_GOTREF(__pyx_t_7);
   34132           3 :   __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 222, __pyx_L1_error)
   34133           3 :   __Pyx_GOTREF(__pyx_t_5);
   34134           3 :   __pyx_t_9 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_7, __pyx_n_s_LinearNDInterpolator, __pyx_n_s_LinearNDInterpolator, (PyObject *) NULL, __pyx_n_s_scipy_interpolate__interpnd, __pyx_kp_s_LinearNDInterpolator_points_val); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 222, __pyx_L1_error)
   34135           3 :   __Pyx_GOTREF(__pyx_t_9);
   34136           3 :   if (__pyx_t_7 != __pyx_t_4) {
   34137           0 :     if (unlikely((PyDict_SetItemString(__pyx_t_9, "__orig_bases__", __pyx_t_4) < 0))) __PYX_ERR(0, 222, __pyx_L1_error)
   34138             :   }
   34139           3 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   34140             : 
   34141             :   /* "scipy/interpolate/_interpnd.pyx":301
   34142             :  *     """
   34143             :  * 
   34144             :  *     def __init__(self, points, values, fill_value=np.nan, rescale=False):             # <<<<<<<<<<<<<<
   34145             :  *         NDInterpolatorBase.__init__(self, points, values, fill_value=fill_value,
   34146             :  *                 rescale=rescale)
   34147             :  */
   34148           3 :   __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_5scipy_11interpolate_9_interpnd_20LinearNDInterpolator_1__init__, 0, __pyx_n_s_LinearNDInterpolator___init, NULL, __pyx_n_s_scipy_interpolate__interpnd, __pyx_d, ((PyObject *)__pyx_codeobj__55)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 301, __pyx_L1_error)
   34149           3 :   __Pyx_GOTREF(__pyx_t_4);
   34150           3 :   if (!__Pyx_CyFunction_InitDefaults(__pyx_t_4, sizeof(__pyx_defaults2), 1)) __PYX_ERR(0, 301, __pyx_L1_error)
   34151           3 :   __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_np); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 301, __pyx_L1_error)
   34152           3 :   __Pyx_GOTREF(__pyx_t_10);
   34153           3 :   __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_nan); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 301, __pyx_L1_error)
   34154           3 :   __Pyx_GOTREF(__pyx_t_11);
   34155           3 :   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
   34156           3 :   __Pyx_CyFunction_Defaults(__pyx_defaults2, __pyx_t_4)->__pyx_arg_fill_value = __pyx_t_11;
   34157           3 :   __Pyx_GIVEREF(__pyx_t_11);
   34158           3 :   __pyx_t_11 = 0;
   34159           3 :   __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_4, __pyx_pf_5scipy_11interpolate_9_interpnd_8__defaults__);
   34160           3 :   if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 301, __pyx_L1_error)
   34161           3 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   34162             : 
   34163             :   /* "scipy/interpolate/_interpnd.pyx":305
   34164             :  *                 rescale=rescale)
   34165             :  * 
   34166             :  *     def _calculate_triangulation(self, points):             # <<<<<<<<<<<<<<
   34167             :  *         self.tri = qhull.Delaunay(points)
   34168             :  * 
   34169             :  */
   34170           3 :   __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_5scipy_11interpolate_9_interpnd_20LinearNDInterpolator_3_calculate_triangulation, 0, __pyx_n_s_LinearNDInterpolator__calculate, NULL, __pyx_n_s_scipy_interpolate__interpnd, __pyx_d, ((PyObject *)__pyx_codeobj__56)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 305, __pyx_L1_error)
   34171           3 :   __Pyx_GOTREF(__pyx_t_4);
   34172           3 :   if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_n_s_calculate_triangulation, __pyx_t_4) < 0) __PYX_ERR(0, 305, __pyx_L1_error)
   34173           3 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   34174             : 
   34175             :   /* "scipy/interpolate/_interpnd.pyx":308
   34176             :  *         self.tri = qhull.Delaunay(points)
   34177             :  * 
   34178             :  *     def _evaluate_double(self, xi):             # <<<<<<<<<<<<<<
   34179             :  *         return self._do_evaluate(xi, 1.0)
   34180             :  * 
   34181             :  */
   34182           3 :   __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_5scipy_11interpolate_9_interpnd_20LinearNDInterpolator_5_evaluate_double, 0, __pyx_n_s_LinearNDInterpolator__evaluate_d, NULL, __pyx_n_s_scipy_interpolate__interpnd, __pyx_d, ((PyObject *)__pyx_codeobj__57)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 308, __pyx_L1_error)
   34183           3 :   __Pyx_GOTREF(__pyx_t_4);
   34184           3 :   if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_n_s_evaluate_double, __pyx_t_4) < 0) __PYX_ERR(0, 308, __pyx_L1_error)
   34185           3 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   34186             : 
   34187             :   /* "scipy/interpolate/_interpnd.pyx":311
   34188             :  *         return self._do_evaluate(xi, 1.0)
   34189             :  * 
   34190             :  *     def _evaluate_complex(self, xi):             # <<<<<<<<<<<<<<
   34191             :  *         return self._do_evaluate(xi, 1.0j)
   34192             :  * 
   34193             :  */
   34194           3 :   __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_5scipy_11interpolate_9_interpnd_20LinearNDInterpolator_7_evaluate_complex, 0, __pyx_n_s_LinearNDInterpolator__evaluate_c, NULL, __pyx_n_s_scipy_interpolate__interpnd, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 311, __pyx_L1_error)
   34195           3 :   __Pyx_GOTREF(__pyx_t_4);
   34196           3 :   if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_n_s_evaluate_complex, __pyx_t_4) < 0) __PYX_ERR(0, 311, __pyx_L1_error)
   34197           3 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   34198             : 
   34199             :   /* "scipy/interpolate/_interpnd.pyx":314
   34200             :  *         return self._do_evaluate(xi, 1.0j)
   34201             :  * 
   34202             :  *     @cython.boundscheck(False)             # <<<<<<<<<<<<<<
   34203             :  *     @cython.wraparound(False)
   34204             :  *     def _do_evaluate(self, const double[:,::1] xi, const double_or_complex dummy):
   34205             :  */
   34206           3 :   __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 314, __pyx_L1_error)
   34207           3 :   __Pyx_GOTREF(__pyx_t_4);
   34208           3 :   __pyx_t_11 = __pyx_FusedFunction_New(&__pyx_fuse_0__pyx_mdef_5scipy_11interpolate_9_interpnd_20LinearNDInterpolator_11_do_evaluate, 0, __pyx_n_s_LinearNDInterpolator__do_evaluat, NULL, __pyx_n_s_scipy_interpolate__interpnd, __pyx_d, ((PyObject *)__pyx_codeobj__60)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 314, __pyx_L1_error)
   34209           3 :   __Pyx_GOTREF(__pyx_t_11);
   34210           6 :   __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_11, __pyx_empty_tuple);
   34211           3 :   if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_double, __pyx_t_11) < 0) __PYX_ERR(0, 314, __pyx_L1_error)
   34212           3 :   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
   34213           3 :   __pyx_t_11 = __pyx_FusedFunction_New(&__pyx_fuse_1__pyx_mdef_5scipy_11interpolate_9_interpnd_20LinearNDInterpolator_13_do_evaluate, 0, __pyx_n_s_LinearNDInterpolator__do_evaluat, NULL, __pyx_n_s_scipy_interpolate__interpnd, __pyx_d, ((PyObject *)__pyx_codeobj__60)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 314, __pyx_L1_error)
   34214           3 :   __Pyx_GOTREF(__pyx_t_11);
   34215           6 :   __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_11, __pyx_empty_tuple);
   34216           3 :   if (PyDict_SetItem(__pyx_t_4, __pyx_kp_s_double_complex, __pyx_t_11) < 0) __PYX_ERR(0, 314, __pyx_L1_error)
   34217           3 :   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
   34218           3 :   __pyx_t_11 = __pyx_FusedFunction_New(&__pyx_mdef_5scipy_11interpolate_9_interpnd_20LinearNDInterpolator_9_do_evaluate, 0, __pyx_n_s_LinearNDInterpolator__do_evaluat, NULL, __pyx_n_s_scipy_interpolate__interpnd, __pyx_d, ((PyObject *)__pyx_codeobj__60)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 314, __pyx_L1_error)
   34219           3 :   __Pyx_GOTREF(__pyx_t_11);
   34220           3 :   if (!__Pyx_CyFunction_InitDefaults(__pyx_t_11, sizeof(__pyx_defaults3), 1)) __PYX_ERR(0, 314, __pyx_L1_error)
   34221           3 :   __pyx_t_10 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 314, __pyx_L1_error)
   34222           3 :   __Pyx_GOTREF(__pyx_t_10);
   34223           3 :   __Pyx_CyFunction_Defaults(__pyx_defaults3, __pyx_t_11)->__pyx_arg__fused_sigindex = __pyx_t_10;
   34224           3 :   __Pyx_GIVEREF(__pyx_t_10);
   34225           3 :   __pyx_t_10 = 0;
   34226           6 :   __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_11, __pyx_empty_tuple);
   34227           3 :   ((__pyx_FusedFunctionObject *) __pyx_t_11)->__signatures__ = __pyx_t_4;
   34228           3 :   __Pyx_GIVEREF(__pyx_t_4);
   34229           3 :   __pyx_t_4 = 0;
   34230           3 :   if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_n_s_do_evaluate, __pyx_t_11) < 0) __PYX_ERR(0, 314, __pyx_L1_error)
   34231           3 :   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
   34232             : 
   34233             :   /* "scipy/interpolate/_interpnd.pyx":222
   34234             :  * #------------------------------------------------------------------------------
   34235             :  * 
   34236             :  * class LinearNDInterpolator(NDInterpolatorBase):             # <<<<<<<<<<<<<<
   34237             :  *     """
   34238             :  *     LinearNDInterpolator(points, values, fill_value=np.nan, rescale=False)
   34239             :  */
   34240           3 :   __pyx_t_11 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_n_s_LinearNDInterpolator, __pyx_t_7, __pyx_t_9, NULL, 0, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 222, __pyx_L1_error)
   34241           3 :   __Pyx_GOTREF(__pyx_t_11);
   34242           3 :   if (PyDict_SetItem(__pyx_d, __pyx_n_s_LinearNDInterpolator, __pyx_t_11) < 0) __PYX_ERR(0, 222, __pyx_L1_error)
   34243           3 :   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
   34244           3 :   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
   34245           3 :   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   34246           3 :   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   34247             : 
   34248             :   /* "scipy/interpolate/_interpnd.pyx":373
   34249             :  * #------------------------------------------------------------------------------
   34250             :  * 
   34251             :  * class GradientEstimationWarning(Warning):             # <<<<<<<<<<<<<<
   34252             :  *     pass
   34253             :  * 
   34254             :  */
   34255           3 :   __pyx_t_7 = __Pyx_PEP560_update_bases(__pyx_tuple__62); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 373, __pyx_L1_error)
   34256           3 :   __Pyx_GOTREF(__pyx_t_7);
   34257           3 :   __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 373, __pyx_L1_error)
   34258           3 :   __Pyx_GOTREF(__pyx_t_5);
   34259           3 :   __pyx_t_9 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_7, __pyx_n_s_GradientEstimationWarning, __pyx_n_s_GradientEstimationWarning, (PyObject *) NULL, __pyx_n_s_scipy_interpolate__interpnd, (PyObject *) NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 373, __pyx_L1_error)
   34260           3 :   __Pyx_GOTREF(__pyx_t_9);
   34261           3 :   if (__pyx_t_7 != __pyx_tuple__62) {
   34262           0 :     if (unlikely((PyDict_SetItemString(__pyx_t_9, "__orig_bases__", __pyx_tuple__62) < 0))) __PYX_ERR(0, 373, __pyx_L1_error)
   34263             :   }
   34264           3 :   __pyx_t_11 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_n_s_GradientEstimationWarning, __pyx_t_7, __pyx_t_9, NULL, 0, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 373, __pyx_L1_error)
   34265           3 :   __Pyx_GOTREF(__pyx_t_11);
   34266           3 :   if (PyDict_SetItem(__pyx_d, __pyx_n_s_GradientEstimationWarning, __pyx_t_11) < 0) __PYX_ERR(0, 373, __pyx_L1_error)
   34267           3 :   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
   34268           3 :   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
   34269           3 :   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   34270           3 :   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   34271             : 
   34272             :   /* "scipy/interpolate/_interpnd.pyx":553
   34273             :  * @cython.boundscheck(False)
   34274             :  * @cython.wraparound(False)
   34275             :  * cpdef estimate_gradients_2d_global(tri, y, int maxiter=400, double tol=1e-6):             # <<<<<<<<<<<<<<
   34276             :  *     cdef const double[:,::1] data
   34277             :  *     cdef double[:,:,::1] grad
   34278             :  */
   34279           3 :   __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_5scipy_11interpolate_9_interpnd_3estimate_gradients_2d_global, 0, __pyx_n_s_estimate_gradients_2d_global, NULL, __pyx_n_s_scipy_interpolate__interpnd, __pyx_d, ((PyObject *)__pyx_codeobj__64)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 553, __pyx_L1_error)
   34280           3 :   __Pyx_GOTREF(__pyx_t_7);
   34281           6 :   __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_tuple__65);
   34282           3 :   if (PyDict_SetItem(__pyx_d, __pyx_n_s_estimate_gradients_2d_global, __pyx_t_7) < 0) __PYX_ERR(0, 553, __pyx_L1_error)
   34283           3 :   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   34284             : 
   34285             :   /* "scipy/interpolate/_interpnd.pyx":824
   34286             :  *     return w
   34287             :  * 
   34288             :  * class CloughTocher2DInterpolator(NDInterpolatorBase):             # <<<<<<<<<<<<<<
   34289             :  *     """CloughTocher2DInterpolator(points, values, tol=1e-6).
   34290             :  * 
   34291             :  */
   34292           3 :   __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_NDInterpolatorBase); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 824, __pyx_L1_error)
   34293           3 :   __Pyx_GOTREF(__pyx_t_7);
   34294           3 :   __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 824, __pyx_L1_error)
   34295           3 :   __Pyx_GOTREF(__pyx_t_5);
   34296           3 :   __Pyx_GIVEREF(__pyx_t_7);
   34297           3 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7)) __PYX_ERR(0, 824, __pyx_L1_error);
   34298           3 :   __pyx_t_7 = 0;
   34299           3 :   __pyx_t_7 = __Pyx_PEP560_update_bases(__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 824, __pyx_L1_error)
   34300           3 :   __Pyx_GOTREF(__pyx_t_7);
   34301           3 :   __pyx_t_9 = __Pyx_CalculateMetaclass(NULL, __pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 824, __pyx_L1_error)
   34302           3 :   __Pyx_GOTREF(__pyx_t_9);
   34303           3 :   __pyx_t_11 = __Pyx_Py3MetaclassPrepare(__pyx_t_9, __pyx_t_7, __pyx_n_s_CloughTocher2DInterpolator, __pyx_n_s_CloughTocher2DInterpolator, (PyObject *) NULL, __pyx_n_s_scipy_interpolate__interpnd, __pyx_kp_s_CloughTocher2DInterpolator_point); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 824, __pyx_L1_error)
   34304           3 :   __Pyx_GOTREF(__pyx_t_11);
   34305           3 :   if (__pyx_t_7 != __pyx_t_5) {
   34306           0 :     if (unlikely((PyDict_SetItemString(__pyx_t_11, "__orig_bases__", __pyx_t_5) < 0))) __PYX_ERR(0, 824, __pyx_L1_error)
   34307             :   }
   34308           3 :   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   34309             : 
   34310             :   /* "scipy/interpolate/_interpnd.pyx":930
   34311             :  *     """
   34312             :  * 
   34313             :  *     def __init__(self, points, values, fill_value=np.nan,             # <<<<<<<<<<<<<<
   34314             :  *                  tol=1e-6, maxiter=400, rescale=False):
   34315             :  *         self._tol = tol
   34316             :  */
   34317           3 :   __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_5scipy_11interpolate_9_interpnd_26CloughTocher2DInterpolator_1__init__, 0, __pyx_n_s_CloughTocher2DInterpolator___ini, NULL, __pyx_n_s_scipy_interpolate__interpnd, __pyx_d, ((PyObject *)__pyx_codeobj__67)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 930, __pyx_L1_error)
   34318           3 :   __Pyx_GOTREF(__pyx_t_5);
   34319           3 :   if (!__Pyx_CyFunction_InitDefaults(__pyx_t_5, sizeof(__pyx_defaults4), 1)) __PYX_ERR(0, 930, __pyx_L1_error)
   34320           3 :   __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 930, __pyx_L1_error)
   34321           3 :   __Pyx_GOTREF(__pyx_t_4);
   34322           3 :   __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_nan); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 930, __pyx_L1_error)
   34323           3 :   __Pyx_GOTREF(__pyx_t_10);
   34324           3 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   34325           3 :   __Pyx_CyFunction_Defaults(__pyx_defaults4, __pyx_t_5)->__pyx_arg_fill_value = __pyx_t_10;
   34326           3 :   __Pyx_GIVEREF(__pyx_t_10);
   34327           3 :   __pyx_t_10 = 0;
   34328           3 :   __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_5, __pyx_pf_5scipy_11interpolate_9_interpnd_10__defaults__);
   34329           3 :   if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_n_s_init, __pyx_t_5) < 0) __PYX_ERR(0, 930, __pyx_L1_error)
   34330           3 :   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   34331             : 
   34332             :   /* "scipy/interpolate/_interpnd.pyx":938
   34333             :  *                                     need_values=False)
   34334             :  * 
   34335             :  *     def _set_values(self, values, fill_value=np.nan, need_contiguous=True, ndim=None):             # <<<<<<<<<<<<<<
   34336             :  *         """
   34337             :  *         Sets the values of the interpolation points.
   34338             :  */
   34339           3 :   __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_5scipy_11interpolate_9_interpnd_26CloughTocher2DInterpolator_3_set_values, 0, __pyx_n_s_CloughTocher2DInterpolator__set, NULL, __pyx_n_s_scipy_interpolate__interpnd, __pyx_d, ((PyObject *)__pyx_codeobj__68)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 938, __pyx_L1_error)
   34340           3 :   __Pyx_GOTREF(__pyx_t_5);
   34341           3 :   if (!__Pyx_CyFunction_InitDefaults(__pyx_t_5, sizeof(__pyx_defaults5), 1)) __PYX_ERR(0, 938, __pyx_L1_error)
   34342           3 :   __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_np); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 938, __pyx_L1_error)
   34343           3 :   __Pyx_GOTREF(__pyx_t_10);
   34344           3 :   __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_nan); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 938, __pyx_L1_error)
   34345           3 :   __Pyx_GOTREF(__pyx_t_4);
   34346           3 :   __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
   34347           3 :   __Pyx_CyFunction_Defaults(__pyx_defaults5, __pyx_t_5)->__pyx_arg_fill_value = __pyx_t_4;
   34348           3 :   __Pyx_GIVEREF(__pyx_t_4);
   34349           3 :   __pyx_t_4 = 0;
   34350           3 :   __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_5, __pyx_pf_5scipy_11interpolate_9_interpnd_12__defaults__);
   34351           3 :   if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_n_s_set_values, __pyx_t_5) < 0) __PYX_ERR(0, 938, __pyx_L1_error)
   34352           3 :   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   34353             : 
   34354             :   /* "scipy/interpolate/_interpnd.pyx":952
   34355             :  *                                                     tol=self._tol, maxiter=self._maxiter)
   34356             :  * 
   34357             :  *     def _calculate_triangulation(self, points):             # <<<<<<<<<<<<<<
   34358             :  *         self.tri = qhull.Delaunay(points)
   34359             :  * 
   34360             :  */
   34361           3 :   __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_5scipy_11interpolate_9_interpnd_26CloughTocher2DInterpolator_5_calculate_triangulation, 0, __pyx_n_s_CloughTocher2DInterpolator__calc, NULL, __pyx_n_s_scipy_interpolate__interpnd, __pyx_d, ((PyObject *)__pyx_codeobj__69)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 952, __pyx_L1_error)
   34362           3 :   __Pyx_GOTREF(__pyx_t_5);
   34363           3 :   if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_n_s_calculate_triangulation, __pyx_t_5) < 0) __PYX_ERR(0, 952, __pyx_L1_error)
   34364           3 :   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   34365             : 
   34366             :   /* "scipy/interpolate/_interpnd.pyx":955
   34367             :  *         self.tri = qhull.Delaunay(points)
   34368             :  * 
   34369             :  *     def _evaluate_double(self, xi):             # <<<<<<<<<<<<<<
   34370             :  *         return self._do_evaluate(xi, 1.0)
   34371             :  * 
   34372             :  */
   34373           3 :   __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_5scipy_11interpolate_9_interpnd_26CloughTocher2DInterpolator_7_evaluate_double, 0, __pyx_n_s_CloughTocher2DInterpolator__eval, NULL, __pyx_n_s_scipy_interpolate__interpnd, __pyx_d, ((PyObject *)__pyx_codeobj__70)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 955, __pyx_L1_error)
   34374           3 :   __Pyx_GOTREF(__pyx_t_5);
   34375           3 :   if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_n_s_evaluate_double, __pyx_t_5) < 0) __PYX_ERR(0, 955, __pyx_L1_error)
   34376           3 :   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   34377             : 
   34378             :   /* "scipy/interpolate/_interpnd.pyx":958
   34379             :  *         return self._do_evaluate(xi, 1.0)
   34380             :  * 
   34381             :  *     def _evaluate_complex(self, xi):             # <<<<<<<<<<<<<<
   34382             :  *         return self._do_evaluate(xi, 1.0j)
   34383             :  * 
   34384             :  */
   34385           3 :   __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_5scipy_11interpolate_9_interpnd_26CloughTocher2DInterpolator_9_evaluate_complex, 0, __pyx_n_s_CloughTocher2DInterpolator__eval_2, NULL, __pyx_n_s_scipy_interpolate__interpnd, __pyx_d, ((PyObject *)__pyx_codeobj__71)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 958, __pyx_L1_error)
   34386           3 :   __Pyx_GOTREF(__pyx_t_5);
   34387           3 :   if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_n_s_evaluate_complex, __pyx_t_5) < 0) __PYX_ERR(0, 958, __pyx_L1_error)
   34388           3 :   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   34389             : 
   34390             :   /* "scipy/interpolate/_interpnd.pyx":961
   34391             :  *         return self._do_evaluate(xi, 1.0j)
   34392             :  * 
   34393             :  *     @cython.boundscheck(False)             # <<<<<<<<<<<<<<
   34394             :  *     @cython.wraparound(False)
   34395             :  *     def _do_evaluate(self, const double[:,::1] xi, const double_or_complex dummy):
   34396             :  */
   34397           3 :   __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 961, __pyx_L1_error)
   34398           3 :   __Pyx_GOTREF(__pyx_t_5);
   34399           3 :   __pyx_t_4 = __pyx_FusedFunction_New(&__pyx_fuse_0__pyx_mdef_5scipy_11interpolate_9_interpnd_26CloughTocher2DInterpolator_13_do_evaluate, 0, __pyx_n_s_CloughTocher2DInterpolator__do_e, NULL, __pyx_n_s_scipy_interpolate__interpnd, __pyx_d, ((PyObject *)__pyx_codeobj__73)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 961, __pyx_L1_error)
   34400           3 :   __Pyx_GOTREF(__pyx_t_4);
   34401           6 :   __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_empty_tuple);
   34402           3 :   if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_double, __pyx_t_4) < 0) __PYX_ERR(0, 961, __pyx_L1_error)
   34403           3 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   34404           3 :   __pyx_t_4 = __pyx_FusedFunction_New(&__pyx_fuse_1__pyx_mdef_5scipy_11interpolate_9_interpnd_26CloughTocher2DInterpolator_15_do_evaluate, 0, __pyx_n_s_CloughTocher2DInterpolator__do_e, NULL, __pyx_n_s_scipy_interpolate__interpnd, __pyx_d, ((PyObject *)__pyx_codeobj__73)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 961, __pyx_L1_error)
   34405           3 :   __Pyx_GOTREF(__pyx_t_4);
   34406           6 :   __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_empty_tuple);
   34407           3 :   if (PyDict_SetItem(__pyx_t_5, __pyx_kp_s_double_complex, __pyx_t_4) < 0) __PYX_ERR(0, 961, __pyx_L1_error)
   34408           3 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   34409           3 :   __pyx_t_4 = __pyx_FusedFunction_New(&__pyx_mdef_5scipy_11interpolate_9_interpnd_26CloughTocher2DInterpolator_11_do_evaluate, 0, __pyx_n_s_CloughTocher2DInterpolator__do_e, NULL, __pyx_n_s_scipy_interpolate__interpnd, __pyx_d, ((PyObject *)__pyx_codeobj__73)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 961, __pyx_L1_error)
   34410           3 :   __Pyx_GOTREF(__pyx_t_4);
   34411           3 :   if (!__Pyx_CyFunction_InitDefaults(__pyx_t_4, sizeof(__pyx_defaults6), 1)) __PYX_ERR(0, 961, __pyx_L1_error)
   34412           3 :   __pyx_t_10 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 961, __pyx_L1_error)
   34413           3 :   __Pyx_GOTREF(__pyx_t_10);
   34414           3 :   __Pyx_CyFunction_Defaults(__pyx_defaults6, __pyx_t_4)->__pyx_arg__fused_sigindex = __pyx_t_10;
   34415           3 :   __Pyx_GIVEREF(__pyx_t_10);
   34416           3 :   __pyx_t_10 = 0;
   34417           6 :   __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_empty_tuple);
   34418           3 :   ((__pyx_FusedFunctionObject *) __pyx_t_4)->__signatures__ = __pyx_t_5;
   34419           3 :   __Pyx_GIVEREF(__pyx_t_5);
   34420           3 :   __pyx_t_5 = 0;
   34421           3 :   if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_n_s_do_evaluate, __pyx_t_4) < 0) __PYX_ERR(0, 961, __pyx_L1_error)
   34422           3 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   34423             : 
   34424             :   /* "scipy/interpolate/_interpnd.pyx":824
   34425             :  *     return w
   34426             :  * 
   34427             :  * class CloughTocher2DInterpolator(NDInterpolatorBase):             # <<<<<<<<<<<<<<
   34428             :  *     """CloughTocher2DInterpolator(points, values, tol=1e-6).
   34429             :  * 
   34430             :  */
   34431           3 :   __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_9, __pyx_n_s_CloughTocher2DInterpolator, __pyx_t_7, __pyx_t_11, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 824, __pyx_L1_error)
   34432           3 :   __Pyx_GOTREF(__pyx_t_4);
   34433           3 :   if (PyDict_SetItem(__pyx_d, __pyx_n_s_CloughTocher2DInterpolator, __pyx_t_4) < 0) __PYX_ERR(0, 824, __pyx_L1_error)
   34434           3 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   34435           3 :   __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
   34436           3 :   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
   34437           3 :   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   34438             : 
   34439             :   /* "scipy/interpolate/_interpnd.pyx":1
   34440             :  * # cython: cpow=True             # <<<<<<<<<<<<<<
   34441             :  * """
   34442             :  * Simple N-D interpolation
   34443             :  */
   34444           3 :   __pyx_t_7 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1, __pyx_L1_error)
   34445           3 :   __Pyx_GOTREF(__pyx_t_7);
   34446           3 :   if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_7) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   34447           3 :   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   34448             : 
   34449             :   /*--- Wrapped vars code ---*/
   34450             : 
   34451           3 :   goto __pyx_L0;
   34452           0 :   __pyx_L1_error:;
   34453           0 :   __Pyx_XDECREF(__pyx_t_4);
   34454           0 :   __Pyx_XDECREF(__pyx_t_5);
   34455           0 :   __Pyx_XDECREF(__pyx_t_7);
   34456           0 :   __Pyx_XDECREF(__pyx_t_9);
   34457           0 :   __Pyx_XDECREF(__pyx_t_10);
   34458           0 :   __Pyx_XDECREF(__pyx_t_11);
   34459           0 :   if (__pyx_m) {
   34460           0 :     if (__pyx_d && stringtab_initialized) {
   34461           0 :       __Pyx_AddTraceback("init scipy.interpolate._interpnd", __pyx_clineno, __pyx_lineno, __pyx_filename);
   34462             :     }
   34463             :     #if !CYTHON_USE_MODULE_STATE
   34464           0 :     Py_CLEAR(__pyx_m);
   34465             :     #else
   34466             :     Py_DECREF(__pyx_m);
   34467             :     if (pystate_addmodule_run) {
   34468             :       PyObject *tp, *value, *tb;
   34469             :       PyErr_Fetch(&tp, &value, &tb);
   34470             :       PyState_RemoveModule(&__pyx_moduledef);
   34471             :       PyErr_Restore(tp, value, tb);
   34472             :     }
   34473             :     #endif
   34474           0 :   } else if (!PyErr_Occurred()) {
   34475           0 :     PyErr_SetString(PyExc_ImportError, "init scipy.interpolate._interpnd");
   34476             :   }
   34477           0 :   __pyx_L0:;
   34478           3 :   __Pyx_RefNannyFinishContext();
   34479             :   #if CYTHON_PEP489_MULTI_PHASE_INIT
   34480           3 :   return (__pyx_m != NULL) ? 0 : -1;
   34481             :   #elif PY_MAJOR_VERSION >= 3
   34482             :   return __pyx_m;
   34483             :   #else
   34484             :   return;
   34485             :   #endif
   34486             : }
   34487             : /* #### Code section: cleanup_globals ### */
   34488             : /* #### Code section: cleanup_module ### */
   34489             : /* #### Code section: main_method ### */
   34490             : /* #### Code section: utility_code_pragmas ### */
   34491             : #ifdef _MSC_VER
   34492             : #pragma warning( push )
   34493             : /* Warning 4127: conditional expression is constant
   34494             :  * Cython uses constant conditional expressions to allow in inline functions to be optimized at
   34495             :  * compile-time, so this warning is not useful
   34496             :  */
   34497             : #pragma warning( disable : 4127 )
   34498             : #endif
   34499             : 
   34500             : 
   34501             : 
   34502             : /* #### Code section: utility_code_def ### */
   34503             : 
   34504             : /* --- Runtime support code --- */
   34505             : /* Refnanny */
   34506             : #if CYTHON_REFNANNY
   34507             : static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
   34508             :     PyObject *m = NULL, *p = NULL;
   34509             :     void *r = NULL;
   34510             :     m = PyImport_ImportModule(modname);
   34511             :     if (!m) goto end;
   34512             :     p = PyObject_GetAttrString(m, "RefNannyAPI");
   34513             :     if (!p) goto end;
   34514             :     r = PyLong_AsVoidPtr(p);
   34515             : end:
   34516             :     Py_XDECREF(p);
   34517             :     Py_XDECREF(m);
   34518             :     return (__Pyx_RefNannyAPIStruct *)r;
   34519             : }
   34520             : #endif
   34521             : 
   34522             : /* PyErrExceptionMatches */
   34523             : #if CYTHON_FAST_THREAD_STATE
   34524           0 : static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
   34525           0 :     Py_ssize_t i, n;
   34526           0 :     n = PyTuple_GET_SIZE(tuple);
   34527             : #if PY_MAJOR_VERSION >= 3
   34528           0 :     for (i=0; i<n; i++) {
   34529           0 :         if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
   34530             :     }
   34531             : #endif
   34532           0 :     for (i=0; i<n; i++) {
   34533           0 :         if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
   34534             :     }
   34535             :     return 0;
   34536             : }
   34537           9 : static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
   34538           9 :     int result;
   34539           9 :     PyObject *exc_type;
   34540             : #if PY_VERSION_HEX >= 0x030C00A6
   34541           9 :     PyObject *current_exception = tstate->current_exception;
   34542           9 :     if (unlikely(!current_exception)) return 0;
   34543           9 :     exc_type = (PyObject*) Py_TYPE(current_exception);
   34544           9 :     if (exc_type == err) return 1;
   34545             : #else
   34546             :     exc_type = tstate->curexc_type;
   34547             :     if (exc_type == err) return 1;
   34548             :     if (unlikely(!exc_type)) return 0;
   34549             : #endif
   34550             :     #if CYTHON_AVOID_BORROWED_REFS
   34551             :     Py_INCREF(exc_type);
   34552             :     #endif
   34553           0 :     if (unlikely(PyTuple_Check(err))) {
   34554           0 :         result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
   34555             :     } else {
   34556           0 :         result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
   34557             :     }
   34558             :     #if CYTHON_AVOID_BORROWED_REFS
   34559             :     Py_DECREF(exc_type);
   34560             :     #endif
   34561             :     return result;
   34562             : }
   34563             : #endif
   34564             : 
   34565             : /* PyErrFetchRestore */
   34566             : #if CYTHON_FAST_THREAD_STATE
   34567          45 : static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
   34568             : #if PY_VERSION_HEX >= 0x030C00A6
   34569          45 :     PyObject *tmp_value;
   34570          45 :     assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value)));
   34571          45 :     if (value) {
   34572             :         #if CYTHON_COMPILING_IN_CPYTHON
   34573          36 :         if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb))
   34574             :         #endif
   34575           0 :             PyException_SetTraceback(value, tb);
   34576             :     }
   34577          45 :     tmp_value = tstate->current_exception;
   34578          45 :     tstate->current_exception = value;
   34579          45 :     Py_XDECREF(tmp_value);
   34580          45 :     Py_XDECREF(type);
   34581          45 :     Py_XDECREF(tb);
   34582             : #else
   34583             :     PyObject *tmp_type, *tmp_value, *tmp_tb;
   34584             :     tmp_type = tstate->curexc_type;
   34585             :     tmp_value = tstate->curexc_value;
   34586             :     tmp_tb = tstate->curexc_traceback;
   34587             :     tstate->curexc_type = type;
   34588             :     tstate->curexc_value = value;
   34589             :     tstate->curexc_traceback = tb;
   34590             :     Py_XDECREF(tmp_type);
   34591             :     Py_XDECREF(tmp_value);
   34592             :     Py_XDECREF(tmp_tb);
   34593             : #endif
   34594          45 : }
   34595          36 : static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
   34596             : #if PY_VERSION_HEX >= 0x030C00A6
   34597          36 :     PyObject* exc_value;
   34598          36 :     exc_value = tstate->current_exception;
   34599          36 :     tstate->current_exception = 0;
   34600          36 :     *value = exc_value;
   34601          36 :     *type = NULL;
   34602          36 :     *tb = NULL;
   34603          36 :     if (exc_value) {
   34604          36 :         *type = (PyObject*) Py_TYPE(exc_value);
   34605          36 :         Py_INCREF(*type);
   34606             :         #if CYTHON_COMPILING_IN_CPYTHON
   34607          36 :         *tb = ((PyBaseExceptionObject*) exc_value)->traceback;
   34608          36 :         Py_XINCREF(*tb);
   34609             :         #else
   34610             :         *tb = PyException_GetTraceback(exc_value);
   34611             :         #endif
   34612             :     }
   34613             : #else
   34614             :     *type = tstate->curexc_type;
   34615             :     *value = tstate->curexc_value;
   34616             :     *tb = tstate->curexc_traceback;
   34617             :     tstate->curexc_type = 0;
   34618             :     tstate->curexc_value = 0;
   34619             :     tstate->curexc_traceback = 0;
   34620             : #endif
   34621          36 : }
   34622             : #endif
   34623             : 
   34624             : /* PyObjectGetAttrStr */
   34625             : #if CYTHON_USE_TYPE_SLOTS
   34626       35798 : static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
   34627       35798 :     PyTypeObject* tp = Py_TYPE(obj);
   34628       35798 :     if (likely(tp->tp_getattro))
   34629       35798 :         return tp->tp_getattro(obj, attr_name);
   34630             : #if PY_MAJOR_VERSION < 3
   34631             :     if (likely(tp->tp_getattr))
   34632             :         return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
   34633             : #endif
   34634           0 :     return PyObject_GetAttr(obj, attr_name);
   34635             : }
   34636             : #endif
   34637             : 
   34638             : /* PyObjectGetAttrStrNoError */
   34639             : #if __PYX_LIMITED_VERSION_HEX < 0x030d00A1
   34640           9 : static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {
   34641           9 :     __Pyx_PyThreadState_declare
   34642           9 :     __Pyx_PyThreadState_assign
   34643           9 :     if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
   34644           9 :         __Pyx_PyErr_Clear();
   34645           9 : }
   34646             : #endif
   34647         102 : static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
   34648         102 :     PyObject *result;
   34649             : #if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1
   34650             :     (void) PyObject_GetOptionalAttr(obj, attr_name, &result);
   34651             :     return result;
   34652             : #else
   34653             : #if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1
   34654         102 :     PyTypeObject* tp = Py_TYPE(obj);
   34655         102 :     if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) {
   34656          15 :         return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1);
   34657             :     }
   34658             : #endif
   34659          87 :     result = __Pyx_PyObject_GetAttrStr(obj, attr_name);
   34660          87 :     if (unlikely(!result)) {
   34661           9 :         __Pyx_PyObject_GetAttrStr_ClearAttributeError();
   34662             :     }
   34663             :     return result;
   34664             : #endif
   34665             : }
   34666             : 
   34667             : /* GetBuiltinName */
   34668          33 : static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
   34669          33 :     PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_b, name);
   34670          33 :     if (unlikely(!result) && !PyErr_Occurred()) {
   34671           0 :         PyErr_Format(PyExc_NameError,
   34672             : #if PY_MAJOR_VERSION >= 3
   34673             :             "name '%U' is not defined", name);
   34674             : #else
   34675             :             "name '%.200s' is not defined", PyString_AS_STRING(name));
   34676             : #endif
   34677             :     }
   34678          33 :     return result;
   34679             : }
   34680             : 
   34681             : /* TupleAndListFromArray */
   34682             : #if CYTHON_COMPILING_IN_CPYTHON
   34683         196 : static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) {
   34684         196 :     PyObject *v;
   34685         196 :     Py_ssize_t i;
   34686         426 :     for (i = 0; i < length; i++) {
   34687         230 :         v = dest[i] = src[i];
   34688         460 :         Py_INCREF(v);
   34689             :     }
   34690         196 : }
   34691             : static CYTHON_INLINE PyObject *
   34692         196 : __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n)
   34693             : {
   34694         196 :     PyObject *res;
   34695         196 :     if (n <= 0) {
   34696           0 :         Py_INCREF(__pyx_empty_tuple);
   34697           0 :         return __pyx_empty_tuple;
   34698             :     }
   34699         196 :     res = PyTuple_New(n);
   34700         196 :     if (unlikely(res == NULL)) return NULL;
   34701         196 :     __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n);
   34702         196 :     return res;
   34703             : }
   34704             : static CYTHON_INLINE PyObject *
   34705             : __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n)
   34706             : {
   34707             :     PyObject *res;
   34708             :     if (n <= 0) {
   34709             :         return PyList_New(0);
   34710             :     }
   34711             :     res = PyList_New(n);
   34712             :     if (unlikely(res == NULL)) return NULL;
   34713             :     __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n);
   34714             :     return res;
   34715             : }
   34716             : #endif
   34717             : 
   34718             : /* BytesEquals */
   34719             : static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
   34720             : #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API
   34721             :     return PyObject_RichCompareBool(s1, s2, equals);
   34722             : #else
   34723             :     if (s1 == s2) {
   34724             :         return (equals == Py_EQ);
   34725             :     } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
   34726             :         const char *ps1, *ps2;
   34727             :         Py_ssize_t length = PyBytes_GET_SIZE(s1);
   34728             :         if (length != PyBytes_GET_SIZE(s2))
   34729             :             return (equals == Py_NE);
   34730             :         ps1 = PyBytes_AS_STRING(s1);
   34731             :         ps2 = PyBytes_AS_STRING(s2);
   34732             :         if (ps1[0] != ps2[0]) {
   34733             :             return (equals == Py_NE);
   34734             :         } else if (length == 1) {
   34735             :             return (equals == Py_EQ);
   34736             :         } else {
   34737             :             int result;
   34738             : #if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000)
   34739             :             Py_hash_t hash1, hash2;
   34740             :             hash1 = ((PyBytesObject*)s1)->ob_shash;
   34741             :             hash2 = ((PyBytesObject*)s2)->ob_shash;
   34742             :             if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
   34743             :                 return (equals == Py_NE);
   34744             :             }
   34745             : #endif
   34746             :             result = memcmp(ps1, ps2, (size_t)length);
   34747             :             return (equals == Py_EQ) ? (result == 0) : (result != 0);
   34748             :         }
   34749             :     } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
   34750             :         return (equals == Py_NE);
   34751             :     } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
   34752             :         return (equals == Py_NE);
   34753             :     } else {
   34754             :         int result;
   34755             :         PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
   34756             :         if (!py_result)
   34757             :             return -1;
   34758             :         result = __Pyx_PyObject_IsTrue(py_result);
   34759             :         Py_DECREF(py_result);
   34760             :         return result;
   34761             :     }
   34762             : #endif
   34763             : }
   34764             : 
   34765             : /* UnicodeEquals */
   34766         644 : static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
   34767             : #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API
   34768             :     return PyObject_RichCompareBool(s1, s2, equals);
   34769             : #else
   34770             : #if PY_MAJOR_VERSION < 3
   34771             :     PyObject* owned_ref = NULL;
   34772             : #endif
   34773         644 :     int s1_is_unicode, s2_is_unicode;
   34774         644 :     if (s1 == s2) {
   34775           0 :         goto return_eq;
   34776             :     }
   34777         644 :     s1_is_unicode = PyUnicode_CheckExact(s1);
   34778         644 :     s2_is_unicode = PyUnicode_CheckExact(s2);
   34779             : #if PY_MAJOR_VERSION < 3
   34780             :     if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
   34781             :         owned_ref = PyUnicode_FromObject(s2);
   34782             :         if (unlikely(!owned_ref))
   34783             :             return -1;
   34784             :         s2 = owned_ref;
   34785             :         s2_is_unicode = 1;
   34786             :     } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
   34787             :         owned_ref = PyUnicode_FromObject(s1);
   34788             :         if (unlikely(!owned_ref))
   34789             :             return -1;
   34790             :         s1 = owned_ref;
   34791             :         s1_is_unicode = 1;
   34792             :     } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
   34793             :         return __Pyx_PyBytes_Equals(s1, s2, equals);
   34794             :     }
   34795             : #endif
   34796         644 :     if (s1_is_unicode & s2_is_unicode) {
   34797         644 :         Py_ssize_t length;
   34798         644 :         int kind;
   34799         644 :         void *data1, *data2;
   34800         644 :         if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
   34801             :             return -1;
   34802         644 :         length = __Pyx_PyUnicode_GET_LENGTH(s1);
   34803         644 :         if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
   34804         594 :             goto return_ne;
   34805             :         }
   34806             : #if CYTHON_USE_UNICODE_INTERNALS
   34807             :         {
   34808          50 :             Py_hash_t hash1, hash2;
   34809             :         #if CYTHON_PEP393_ENABLED
   34810          50 :             hash1 = ((PyASCIIObject*)s1)->hash;
   34811          50 :             hash2 = ((PyASCIIObject*)s2)->hash;
   34812             :         #else
   34813             :             hash1 = ((PyUnicodeObject*)s1)->hash;
   34814             :             hash2 = ((PyUnicodeObject*)s2)->hash;
   34815             :         #endif
   34816          50 :             if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
   34817          50 :                 goto return_ne;
   34818             :             }
   34819             :         }
   34820             : #endif
   34821           0 :         kind = __Pyx_PyUnicode_KIND(s1);
   34822           0 :         if (kind != __Pyx_PyUnicode_KIND(s2)) {
   34823           0 :             goto return_ne;
   34824             :         }
   34825           0 :         data1 = __Pyx_PyUnicode_DATA(s1);
   34826           0 :         data2 = __Pyx_PyUnicode_DATA(s2);
   34827           0 :         if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
   34828           0 :             goto return_ne;
   34829           0 :         } else if (length == 1) {
   34830           0 :             goto return_eq;
   34831             :         } else {
   34832           0 :             int result = memcmp(data1, data2, (size_t)(length * kind));
   34833             :             #if PY_MAJOR_VERSION < 3
   34834             :             Py_XDECREF(owned_ref);
   34835             :             #endif
   34836           0 :             return (equals == Py_EQ) ? (result == 0) : (result != 0);
   34837             :         }
   34838           0 :     } else if ((s1 == Py_None) & s2_is_unicode) {
   34839           0 :         goto return_ne;
   34840           0 :     } else if ((s2 == Py_None) & s1_is_unicode) {
   34841           0 :         goto return_ne;
   34842             :     } else {
   34843           0 :         int result;
   34844           0 :         PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
   34845             :         #if PY_MAJOR_VERSION < 3
   34846             :         Py_XDECREF(owned_ref);
   34847             :         #endif
   34848           0 :         if (!py_result)
   34849             :             return -1;
   34850           0 :         result = __Pyx_PyObject_IsTrue(py_result);
   34851           0 :         Py_DECREF(py_result);
   34852           0 :         return result;
   34853             :     }
   34854           0 : return_eq:
   34855             :     #if PY_MAJOR_VERSION < 3
   34856             :     Py_XDECREF(owned_ref);
   34857             :     #endif
   34858           0 :     return (equals == Py_EQ);
   34859         644 : return_ne:
   34860             :     #if PY_MAJOR_VERSION < 3
   34861             :     Py_XDECREF(owned_ref);
   34862             :     #endif
   34863         644 :     return (equals == Py_NE);
   34864             : #endif
   34865             : }
   34866             : 
   34867             : /* fastcall */
   34868             : #if CYTHON_METH_FASTCALL
   34869        1814 : static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s)
   34870             : {
   34871        1814 :     Py_ssize_t i, n = PyTuple_GET_SIZE(kwnames);
   34872        3144 :     for (i = 0; i < n; i++)
   34873             :     {
   34874        2897 :         if (s == PyTuple_GET_ITEM(kwnames, i)) return kwvalues[i];
   34875             :     }
   34876         891 :     for (i = 0; i < n; i++)
   34877             :     {
   34878         644 :         int eq = __Pyx_PyUnicode_Equals(s, PyTuple_GET_ITEM(kwnames, i), Py_EQ);
   34879         644 :         if (unlikely(eq != 0)) {
   34880           0 :             if (unlikely(eq < 0)) return NULL;
   34881           0 :             return kwvalues[i];
   34882             :         }
   34883             :     }
   34884             :     return NULL;
   34885             : }
   34886             : #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000
   34887             : CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) {
   34888             :     Py_ssize_t i, nkwargs = PyTuple_GET_SIZE(kwnames);
   34889             :     PyObject *dict;
   34890             :     dict = PyDict_New();
   34891             :     if (unlikely(!dict))
   34892             :         return NULL;
   34893             :     for (i=0; i<nkwargs; i++) {
   34894             :         PyObject *key = PyTuple_GET_ITEM(kwnames, i);
   34895             :         if (unlikely(PyDict_SetItem(dict, key, kwvalues[i]) < 0))
   34896             :             goto bad;
   34897             :     }
   34898             :     return dict;
   34899             : bad:
   34900             :     Py_DECREF(dict);
   34901             :     return NULL;
   34902             : }
   34903             : #endif
   34904             : #endif
   34905             : 
   34906             : /* RaiseArgTupleInvalid */
   34907           0 : static void __Pyx_RaiseArgtupleInvalid(
   34908             :     const char* func_name,
   34909             :     int exact,
   34910             :     Py_ssize_t num_min,
   34911             :     Py_ssize_t num_max,
   34912             :     Py_ssize_t num_found)
   34913             : {
   34914           0 :     Py_ssize_t num_expected;
   34915           0 :     const char *more_or_less;
   34916           0 :     if (num_found < num_min) {
   34917             :         num_expected = num_min;
   34918             :         more_or_less = "at least";
   34919             :     } else {
   34920           0 :         num_expected = num_max;
   34921           0 :         more_or_less = "at most";
   34922             :     }
   34923           0 :     if (exact) {
   34924           0 :         more_or_less = "exactly";
   34925             :     }
   34926           0 :     PyErr_Format(PyExc_TypeError,
   34927             :                  "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
   34928             :                  func_name, more_or_less, num_expected,
   34929             :                  (num_expected == 1) ? "" : "s", num_found);
   34930           0 : }
   34931             : 
   34932             : /* RaiseDoubleKeywords */
   34933           0 : static void __Pyx_RaiseDoubleKeywordsError(
   34934             :     const char* func_name,
   34935             :     PyObject* kw_name)
   34936             : {
   34937           0 :     PyErr_Format(PyExc_TypeError,
   34938             :         #if PY_MAJOR_VERSION >= 3
   34939             :         "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
   34940             :         #else
   34941             :         "%s() got multiple values for keyword argument '%s'", func_name,
   34942             :         PyString_AsString(kw_name));
   34943             :         #endif
   34944             : }
   34945             : 
   34946             : /* ParseKeywords */
   34947           0 : static int __Pyx_ParseOptionalKeywords(
   34948             :     PyObject *kwds,
   34949             :     PyObject *const *kwvalues,
   34950             :     PyObject **argnames[],
   34951             :     PyObject *kwds2,
   34952             :     PyObject *values[],
   34953             :     Py_ssize_t num_pos_args,
   34954             :     const char* function_name)
   34955             : {
   34956           0 :     PyObject *key = 0, *value = 0;
   34957           0 :     Py_ssize_t pos = 0;
   34958           0 :     PyObject*** name;
   34959           0 :     PyObject*** first_kw_arg = argnames + num_pos_args;
   34960           0 :     int kwds_is_tuple = CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds));
   34961           0 :     while (1) {
   34962           0 :         Py_XDECREF(key); key = NULL;
   34963           0 :         Py_XDECREF(value); value = NULL;
   34964           0 :         if (kwds_is_tuple) {
   34965           0 :             Py_ssize_t size;
   34966             : #if CYTHON_ASSUME_SAFE_MACROS
   34967           0 :             size = PyTuple_GET_SIZE(kwds);
   34968             : #else
   34969             :             size = PyTuple_Size(kwds);
   34970             :             if (size < 0) goto bad;
   34971             : #endif
   34972           0 :             if (pos >= size) break;
   34973             : #if CYTHON_AVOID_BORROWED_REFS
   34974             :             key = __Pyx_PySequence_ITEM(kwds, pos);
   34975             :             if (!key) goto bad;
   34976             : #elif CYTHON_ASSUME_SAFE_MACROS
   34977           0 :             key = PyTuple_GET_ITEM(kwds, pos);
   34978             : #else
   34979             :             key = PyTuple_GetItem(kwds, pos);
   34980             :             if (!key) goto bad;
   34981             : #endif
   34982           0 :             value = kwvalues[pos];
   34983           0 :             pos++;
   34984             :         }
   34985             :         else
   34986             :         {
   34987           0 :             if (!PyDict_Next(kwds, &pos, &key, &value)) break;
   34988             : #if CYTHON_AVOID_BORROWED_REFS
   34989             :             Py_INCREF(key);
   34990             : #endif
   34991             :         }
   34992           0 :         name = first_kw_arg;
   34993           0 :         while (*name && (**name != key)) name++;
   34994           0 :         if (*name) {
   34995           0 :             values[name-argnames] = value;
   34996             : #if CYTHON_AVOID_BORROWED_REFS
   34997             :             Py_INCREF(value);
   34998             :             Py_DECREF(key);
   34999             : #endif
   35000           0 :             key = NULL;
   35001           0 :             value = NULL;
   35002           0 :             continue;
   35003             :         }
   35004             : #if !CYTHON_AVOID_BORROWED_REFS
   35005           0 :         Py_INCREF(key);
   35006             : #endif
   35007           0 :         Py_INCREF(value);
   35008           0 :         name = first_kw_arg;
   35009             :         #if PY_MAJOR_VERSION < 3
   35010             :         if (likely(PyString_Check(key))) {
   35011             :             while (*name) {
   35012             :                 if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
   35013             :                         && _PyString_Eq(**name, key)) {
   35014             :                     values[name-argnames] = value;
   35015             : #if CYTHON_AVOID_BORROWED_REFS
   35016             :                     value = NULL;
   35017             : #endif
   35018             :                     break;
   35019             :                 }
   35020             :                 name++;
   35021             :             }
   35022             :             if (*name) continue;
   35023             :             else {
   35024             :                 PyObject*** argname = argnames;
   35025             :                 while (argname != first_kw_arg) {
   35026             :                     if ((**argname == key) || (
   35027             :                             (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
   35028             :                              && _PyString_Eq(**argname, key))) {
   35029             :                         goto arg_passed_twice;
   35030             :                     }
   35031             :                     argname++;
   35032             :                 }
   35033             :             }
   35034             :         } else
   35035             :         #endif
   35036           0 :         if (likely(PyUnicode_Check(key))) {
   35037           0 :             while (*name) {
   35038           0 :                 int cmp = (
   35039             :                 #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
   35040           0 :                     (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
   35041             :                 #endif
   35042           0 :                     PyUnicode_Compare(**name, key)
   35043             :                 );
   35044           0 :                 if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
   35045           0 :                 if (cmp == 0) {
   35046           0 :                     values[name-argnames] = value;
   35047             : #if CYTHON_AVOID_BORROWED_REFS
   35048             :                     value = NULL;
   35049             : #endif
   35050           0 :                     break;
   35051             :                 }
   35052           0 :                 name++;
   35053             :             }
   35054           0 :             if (*name) continue;
   35055             :             else {
   35056             :                 PyObject*** argname = argnames;
   35057           0 :                 while (argname != first_kw_arg) {
   35058           0 :                     int cmp = (**argname == key) ? 0 :
   35059             :                     #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
   35060           0 :                         (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
   35061             :                     #endif
   35062           0 :                         PyUnicode_Compare(**argname, key);
   35063           0 :                     if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
   35064           0 :                     if (cmp == 0) goto arg_passed_twice;
   35065           0 :                     argname++;
   35066             :                 }
   35067             :             }
   35068             :         } else
   35069           0 :             goto invalid_keyword_type;
   35070           0 :         if (kwds2) {
   35071           0 :             if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
   35072             :         } else {
   35073           0 :             goto invalid_keyword;
   35074             :         }
   35075             :     }
   35076           0 :     Py_XDECREF(key);
   35077           0 :     Py_XDECREF(value);
   35078           0 :     return 0;
   35079           0 : arg_passed_twice:
   35080           0 :     __Pyx_RaiseDoubleKeywordsError(function_name, key);
   35081           0 :     goto bad;
   35082           0 : invalid_keyword_type:
   35083           0 :     PyErr_Format(PyExc_TypeError,
   35084             :         "%.200s() keywords must be strings", function_name);
   35085           0 :     goto bad;
   35086           0 : invalid_keyword:
   35087             :     #if PY_MAJOR_VERSION < 3
   35088             :     PyErr_Format(PyExc_TypeError,
   35089             :         "%.200s() got an unexpected keyword argument '%.200s'",
   35090             :         function_name, PyString_AsString(key));
   35091             :     #else
   35092           0 :     PyErr_Format(PyExc_TypeError,
   35093             :         "%s() got an unexpected keyword argument '%U'",
   35094             :         function_name, key);
   35095             :     #endif
   35096           0 : bad:
   35097           0 :     Py_XDECREF(key);
   35098           0 :     Py_XDECREF(value);
   35099           0 :     return -1;
   35100             : }
   35101             : 
   35102             : /* ArgTypeTest */
   35103           0 : static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
   35104             : {
   35105           0 :     __Pyx_TypeName type_name;
   35106           0 :     __Pyx_TypeName obj_type_name;
   35107           0 :     if (unlikely(!type)) {
   35108           0 :         PyErr_SetString(PyExc_SystemError, "Missing type object");
   35109           0 :         return 0;
   35110             :     }
   35111           0 :     else if (exact) {
   35112             :         #if PY_MAJOR_VERSION == 2
   35113             :         if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
   35114             :         #endif
   35115             :     }
   35116             :     else {
   35117           0 :         if (likely(__Pyx_TypeCheck(obj, type))) return 1;
   35118             :     }
   35119           0 :     type_name = __Pyx_PyType_GetName(type);
   35120           0 :     obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
   35121           0 :     PyErr_Format(PyExc_TypeError,
   35122             :         "Argument '%.200s' has incorrect type (expected " __Pyx_FMT_TYPENAME
   35123             :         ", got " __Pyx_FMT_TYPENAME ")", name, type_name, obj_type_name);
   35124           0 :     __Pyx_DECREF_TypeName(type_name);
   35125           0 :     __Pyx_DECREF_TypeName(obj_type_name);
   35126           0 :     return 0;
   35127             : }
   35128             : 
   35129             : /* RaiseException */
   35130             : #if PY_MAJOR_VERSION < 3
   35131             : static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
   35132             :     __Pyx_PyThreadState_declare
   35133             :     CYTHON_UNUSED_VAR(cause);
   35134             :     Py_XINCREF(type);
   35135             :     if (!value || value == Py_None)
   35136             :         value = NULL;
   35137             :     else
   35138             :         Py_INCREF(value);
   35139             :     if (!tb || tb == Py_None)
   35140             :         tb = NULL;
   35141             :     else {
   35142             :         Py_INCREF(tb);
   35143             :         if (!PyTraceBack_Check(tb)) {
   35144             :             PyErr_SetString(PyExc_TypeError,
   35145             :                 "raise: arg 3 must be a traceback or None");
   35146             :             goto raise_error;
   35147             :         }
   35148             :     }
   35149             :     if (PyType_Check(type)) {
   35150             : #if CYTHON_COMPILING_IN_PYPY
   35151             :         if (!value) {
   35152             :             Py_INCREF(Py_None);
   35153             :             value = Py_None;
   35154             :         }
   35155             : #endif
   35156             :         PyErr_NormalizeException(&type, &value, &tb);
   35157             :     } else {
   35158             :         if (value) {
   35159             :             PyErr_SetString(PyExc_TypeError,
   35160             :                 "instance exception may not have a separate value");
   35161             :             goto raise_error;
   35162             :         }
   35163             :         value = type;
   35164             :         type = (PyObject*) Py_TYPE(type);
   35165             :         Py_INCREF(type);
   35166             :         if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
   35167             :             PyErr_SetString(PyExc_TypeError,
   35168             :                 "raise: exception class must be a subclass of BaseException");
   35169             :             goto raise_error;
   35170             :         }
   35171             :     }
   35172             :     __Pyx_PyThreadState_assign
   35173             :     __Pyx_ErrRestore(type, value, tb);
   35174             :     return;
   35175             : raise_error:
   35176             :     Py_XDECREF(value);
   35177             :     Py_XDECREF(type);
   35178             :     Py_XDECREF(tb);
   35179             :     return;
   35180             : }
   35181             : #else
   35182           3 : static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
   35183           3 :     PyObject* owned_instance = NULL;
   35184           3 :     if (tb == Py_None) {
   35185             :         tb = 0;
   35186           3 :     } else if (tb && !PyTraceBack_Check(tb)) {
   35187           0 :         PyErr_SetString(PyExc_TypeError,
   35188             :             "raise: arg 3 must be a traceback or None");
   35189           0 :         goto bad;
   35190             :     }
   35191           3 :     if (value == Py_None)
   35192           0 :         value = 0;
   35193           3 :     if (PyExceptionInstance_Check(type)) {
   35194           3 :         if (value) {
   35195           0 :             PyErr_SetString(PyExc_TypeError,
   35196             :                 "instance exception may not have a separate value");
   35197           0 :             goto bad;
   35198             :         }
   35199             :         value = type;
   35200             :         type = (PyObject*) Py_TYPE(value);
   35201           0 :     } else if (PyExceptionClass_Check(type)) {
   35202           0 :         PyObject *instance_class = NULL;
   35203           0 :         if (value && PyExceptionInstance_Check(value)) {
   35204           0 :             instance_class = (PyObject*) Py_TYPE(value);
   35205           0 :             if (instance_class != type) {
   35206           0 :                 int is_subclass = PyObject_IsSubclass(instance_class, type);
   35207           0 :                 if (!is_subclass) {
   35208             :                     instance_class = NULL;
   35209           0 :                 } else if (unlikely(is_subclass == -1)) {
   35210           0 :                     goto bad;
   35211             :                 } else {
   35212             :                     type = instance_class;
   35213             :                 }
   35214             :             }
   35215             :         }
   35216             :         if (!instance_class) {
   35217           0 :             PyObject *args;
   35218           0 :             if (!value)
   35219           0 :                 args = PyTuple_New(0);
   35220           0 :             else if (PyTuple_Check(value)) {
   35221           0 :                 Py_INCREF(value);
   35222           0 :                 args = value;
   35223             :             } else
   35224           0 :                 args = PyTuple_Pack(1, value);
   35225           0 :             if (!args)
   35226           0 :                 goto bad;
   35227           0 :             owned_instance = PyObject_Call(type, args, NULL);
   35228           0 :             Py_DECREF(args);
   35229           0 :             if (!owned_instance)
   35230           0 :                 goto bad;
   35231           0 :             value = owned_instance;
   35232           0 :             if (!PyExceptionInstance_Check(value)) {
   35233           0 :                 PyErr_Format(PyExc_TypeError,
   35234             :                              "calling %R should have returned an instance of "
   35235             :                              "BaseException, not %R",
   35236             :                              type, Py_TYPE(value));
   35237           0 :                 goto bad;
   35238             :             }
   35239             :         }
   35240             :     } else {
   35241           0 :         PyErr_SetString(PyExc_TypeError,
   35242             :             "raise: exception class must be a subclass of BaseException");
   35243           0 :         goto bad;
   35244             :     }
   35245           3 :     if (cause) {
   35246           0 :         PyObject *fixed_cause;
   35247           0 :         if (cause == Py_None) {
   35248             :             fixed_cause = NULL;
   35249           0 :         } else if (PyExceptionClass_Check(cause)) {
   35250           0 :             fixed_cause = PyObject_CallObject(cause, NULL);
   35251           0 :             if (fixed_cause == NULL)
   35252           0 :                 goto bad;
   35253           0 :         } else if (PyExceptionInstance_Check(cause)) {
   35254           0 :             fixed_cause = cause;
   35255           0 :             Py_INCREF(fixed_cause);
   35256             :         } else {
   35257           0 :             PyErr_SetString(PyExc_TypeError,
   35258             :                             "exception causes must derive from "
   35259             :                             "BaseException");
   35260           0 :             goto bad;
   35261             :         }
   35262           0 :         PyException_SetCause(value, fixed_cause);
   35263             :     }
   35264           3 :     PyErr_SetObject(type, value);
   35265           3 :     if (tb) {
   35266             :       #if PY_VERSION_HEX >= 0x030C00A6
   35267           0 :         PyException_SetTraceback(value, tb);
   35268             :       #elif CYTHON_FAST_THREAD_STATE
   35269             :         PyThreadState *tstate = __Pyx_PyThreadState_Current;
   35270             :         PyObject* tmp_tb = tstate->curexc_traceback;
   35271             :         if (tb != tmp_tb) {
   35272             :             Py_INCREF(tb);
   35273             :             tstate->curexc_traceback = tb;
   35274             :             Py_XDECREF(tmp_tb);
   35275             :         }
   35276             : #else
   35277             :         PyObject *tmp_type, *tmp_value, *tmp_tb;
   35278             :         PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
   35279             :         Py_INCREF(tb);
   35280             :         PyErr_Restore(tmp_type, tmp_value, tb);
   35281             :         Py_XDECREF(tmp_tb);
   35282             : #endif
   35283             :     }
   35284           3 : bad:
   35285           3 :     Py_XDECREF(owned_instance);
   35286           3 :     return;
   35287             : }
   35288             : #endif
   35289             : 
   35290             : /* PyFunctionFastCall */
   35291             : #if CYTHON_FAST_PYCALL && !CYTHON_VECTORCALL
   35292             : static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
   35293             :                                                PyObject *globals) {
   35294             :     PyFrameObject *f;
   35295             :     PyThreadState *tstate = __Pyx_PyThreadState_Current;
   35296             :     PyObject **fastlocals;
   35297             :     Py_ssize_t i;
   35298             :     PyObject *result;
   35299             :     assert(globals != NULL);
   35300             :     /* XXX Perhaps we should create a specialized
   35301             :        PyFrame_New() that doesn't take locals, but does
   35302             :        take builtins without sanity checking them.
   35303             :        */
   35304             :     assert(tstate != NULL);
   35305             :     f = PyFrame_New(tstate, co, globals, NULL);
   35306             :     if (f == NULL) {
   35307             :         return NULL;
   35308             :     }
   35309             :     fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
   35310             :     for (i = 0; i < na; i++) {
   35311             :         Py_INCREF(*args);
   35312             :         fastlocals[i] = *args++;
   35313             :     }
   35314             :     result = PyEval_EvalFrameEx(f,0);
   35315             :     ++tstate->recursion_depth;
   35316             :     Py_DECREF(f);
   35317             :     --tstate->recursion_depth;
   35318             :     return result;
   35319             : }
   35320             : static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
   35321             :     PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
   35322             :     PyObject *globals = PyFunction_GET_GLOBALS(func);
   35323             :     PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
   35324             :     PyObject *closure;
   35325             : #if PY_MAJOR_VERSION >= 3
   35326             :     PyObject *kwdefs;
   35327             : #endif
   35328             :     PyObject *kwtuple, **k;
   35329             :     PyObject **d;
   35330             :     Py_ssize_t nd;
   35331             :     Py_ssize_t nk;
   35332             :     PyObject *result;
   35333             :     assert(kwargs == NULL || PyDict_Check(kwargs));
   35334             :     nk = kwargs ? PyDict_Size(kwargs) : 0;
   35335             :     #if PY_MAJOR_VERSION < 3
   35336             :     if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) {
   35337             :         return NULL;
   35338             :     }
   35339             :     #else
   35340             :     if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) {
   35341             :         return NULL;
   35342             :     }
   35343             :     #endif
   35344             :     if (
   35345             : #if PY_MAJOR_VERSION >= 3
   35346             :             co->co_kwonlyargcount == 0 &&
   35347             : #endif
   35348             :             likely(kwargs == NULL || nk == 0) &&
   35349             :             co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
   35350             :         if (argdefs == NULL && co->co_argcount == nargs) {
   35351             :             result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
   35352             :             goto done;
   35353             :         }
   35354             :         else if (nargs == 0 && argdefs != NULL
   35355             :                  && co->co_argcount == Py_SIZE(argdefs)) {
   35356             :             /* function called with no arguments, but all parameters have
   35357             :                a default value: use default values as arguments .*/
   35358             :             args = &PyTuple_GET_ITEM(argdefs, 0);
   35359             :             result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
   35360             :             goto done;
   35361             :         }
   35362             :     }
   35363             :     if (kwargs != NULL) {
   35364             :         Py_ssize_t pos, i;
   35365             :         kwtuple = PyTuple_New(2 * nk);
   35366             :         if (kwtuple == NULL) {
   35367             :             result = NULL;
   35368             :             goto done;
   35369             :         }
   35370             :         k = &PyTuple_GET_ITEM(kwtuple, 0);
   35371             :         pos = i = 0;
   35372             :         while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
   35373             :             Py_INCREF(k[i]);
   35374             :             Py_INCREF(k[i+1]);
   35375             :             i += 2;
   35376             :         }
   35377             :         nk = i / 2;
   35378             :     }
   35379             :     else {
   35380             :         kwtuple = NULL;
   35381             :         k = NULL;
   35382             :     }
   35383             :     closure = PyFunction_GET_CLOSURE(func);
   35384             : #if PY_MAJOR_VERSION >= 3
   35385             :     kwdefs = PyFunction_GET_KW_DEFAULTS(func);
   35386             : #endif
   35387             :     if (argdefs != NULL) {
   35388             :         d = &PyTuple_GET_ITEM(argdefs, 0);
   35389             :         nd = Py_SIZE(argdefs);
   35390             :     }
   35391             :     else {
   35392             :         d = NULL;
   35393             :         nd = 0;
   35394             :     }
   35395             : #if PY_MAJOR_VERSION >= 3
   35396             :     result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
   35397             :                                args, (int)nargs,
   35398             :                                k, (int)nk,
   35399             :                                d, (int)nd, kwdefs, closure);
   35400             : #else
   35401             :     result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
   35402             :                                args, (int)nargs,
   35403             :                                k, (int)nk,
   35404             :                                d, (int)nd, closure);
   35405             : #endif
   35406             :     Py_XDECREF(kwtuple);
   35407             : done:
   35408             :     Py_LeaveRecursiveCall();
   35409             :     return result;
   35410             : }
   35411             : #endif
   35412             : 
   35413             : /* PyObjectCall */
   35414             : #if CYTHON_COMPILING_IN_CPYTHON
   35415       11544 : static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
   35416       11544 :     PyObject *result;
   35417       11544 :     ternaryfunc call = Py_TYPE(func)->tp_call;
   35418       11544 :     if (unlikely(!call))
   35419           0 :         return PyObject_Call(func, arg, kw);
   35420             :     #if PY_MAJOR_VERSION < 3
   35421             :     if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
   35422             :         return NULL;
   35423             :     #else
   35424       11544 :     if (unlikely(Py_EnterRecursiveCall(" while calling a Python object")))
   35425             :         return NULL;
   35426             :     #endif
   35427       11544 :     result = (*call)(func, arg, kw);
   35428       11544 :     Py_LeaveRecursiveCall();
   35429       11544 :     if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
   35430           0 :         PyErr_SetString(
   35431             :             PyExc_SystemError,
   35432             :             "NULL result without error in PyObject_Call");
   35433             :     }
   35434             :     return result;
   35435             : }
   35436             : #endif
   35437             : 
   35438             : /* PyObjectCallMethO */
   35439             : #if CYTHON_COMPILING_IN_CPYTHON
   35440           0 : static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
   35441           0 :     PyObject *self, *result;
   35442           0 :     PyCFunction cfunc;
   35443           0 :     cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func);
   35444           0 :     self = __Pyx_CyOrPyCFunction_GET_SELF(func);
   35445             :     #if PY_MAJOR_VERSION < 3
   35446             :     if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
   35447             :         return NULL;
   35448             :     #else
   35449           0 :     if (unlikely(Py_EnterRecursiveCall(" while calling a Python object")))
   35450             :         return NULL;
   35451             :     #endif
   35452           0 :     result = cfunc(self, arg);
   35453           0 :     Py_LeaveRecursiveCall();
   35454           0 :     if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
   35455           0 :         PyErr_SetString(
   35456             :             PyExc_SystemError,
   35457             :             "NULL result without error in PyObject_Call");
   35458             :     }
   35459             :     return result;
   35460             : }
   35461             : #endif
   35462             : 
   35463             : /* PyObjectFastCall */
   35464             : #if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API
   35465             : static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject **args, size_t nargs, PyObject *kwargs) {
   35466             :     PyObject *argstuple;
   35467             :     PyObject *result = 0;
   35468             :     size_t i;
   35469             :     argstuple = PyTuple_New((Py_ssize_t)nargs);
   35470             :     if (unlikely(!argstuple)) return NULL;
   35471             :     for (i = 0; i < nargs; i++) {
   35472             :         Py_INCREF(args[i]);
   35473             :         if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) < 0) goto bad;
   35474             :     }
   35475             :     result = __Pyx_PyObject_Call(func, argstuple, kwargs);
   35476             :   bad:
   35477             :     Py_DECREF(argstuple);
   35478             :     return result;
   35479             : }
   35480             : #endif
   35481        3089 : static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject **args, size_t _nargs, PyObject *kwargs) {
   35482        3089 :     Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs);
   35483             : #if CYTHON_COMPILING_IN_CPYTHON
   35484        3089 :     if (nargs == 0 && kwargs == NULL) {
   35485           0 :         if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS))
   35486           0 :             return __Pyx_PyObject_CallMethO(func, NULL);
   35487             :     }
   35488        3089 :     else if (nargs == 1 && kwargs == NULL) {
   35489        1886 :         if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O))
   35490           0 :             return __Pyx_PyObject_CallMethO(func, args[0]);
   35491             :     }
   35492             : #endif
   35493             :     #if PY_VERSION_HEX < 0x030800B1
   35494             :     #if CYTHON_FAST_PYCCALL
   35495             :     if (PyCFunction_Check(func)) {
   35496             :         if (kwargs) {
   35497             :             return _PyCFunction_FastCallDict(func, args, nargs, kwargs);
   35498             :         } else {
   35499             :             return _PyCFunction_FastCallKeywords(func, args, nargs, NULL);
   35500             :         }
   35501             :     }
   35502             :     #if PY_VERSION_HEX >= 0x030700A1
   35503             :     if (!kwargs && __Pyx_IS_TYPE(func, &PyMethodDescr_Type)) {
   35504             :         return _PyMethodDescr_FastCallKeywords(func, args, nargs, NULL);
   35505             :     }
   35506             :     #endif
   35507             :     #endif
   35508             :     #if CYTHON_FAST_PYCALL
   35509             :     if (PyFunction_Check(func)) {
   35510             :         return __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs);
   35511             :     }
   35512             :     #endif
   35513             :     #endif
   35514        3089 :     if (kwargs == NULL) {
   35515             :         #if CYTHON_VECTORCALL
   35516             :         #if PY_VERSION_HEX < 0x03090000
   35517             :         vectorcallfunc f = _PyVectorcall_Function(func);
   35518             :         #else
   35519        3089 :         vectorcallfunc f = PyVectorcall_Function(func);
   35520             :         #endif
   35521        3089 :         if (f) {
   35522        2323 :             return f(func, args, (size_t)nargs, NULL);
   35523             :         }
   35524             :         #elif defined(__Pyx_CyFunction_USED) && CYTHON_BACKPORT_VECTORCALL
   35525             :         if (__Pyx_CyFunction_CheckExact(func)) {
   35526             :             __pyx_vectorcallfunc f = __Pyx_CyFunction_func_vectorcall(func);
   35527             :             if (f) return f(func, args, (size_t)nargs, NULL);
   35528             :         }
   35529             :         #endif
   35530             :     }
   35531         766 :     if (nargs == 0) {
   35532           0 :         return __Pyx_PyObject_Call(func, __pyx_empty_tuple, kwargs);
   35533             :     }
   35534             :     #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API
   35535         766 :     return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs);
   35536             :     #else
   35537             :     return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs);
   35538             :     #endif
   35539             : }
   35540             : 
   35541             : /* RaiseUnexpectedTypeError */
   35542             : static int
   35543           0 : __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj)
   35544             : {
   35545           0 :     __Pyx_TypeName obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
   35546           0 :     PyErr_Format(PyExc_TypeError, "Expected %s, got " __Pyx_FMT_TYPENAME,
   35547             :                  expected, obj_type_name);
   35548           0 :     __Pyx_DECREF_TypeName(obj_type_name);
   35549           0 :     return 0;
   35550             : }
   35551             : 
   35552             : /* CIntToDigits */
   35553             : static const char DIGIT_PAIRS_10[2*10*10+1] = {
   35554             :     "00010203040506070809"
   35555             :     "10111213141516171819"
   35556             :     "20212223242526272829"
   35557             :     "30313233343536373839"
   35558             :     "40414243444546474849"
   35559             :     "50515253545556575859"
   35560             :     "60616263646566676869"
   35561             :     "70717273747576777879"
   35562             :     "80818283848586878889"
   35563             :     "90919293949596979899"
   35564             : };
   35565             : static const char DIGIT_PAIRS_8[2*8*8+1] = {
   35566             :     "0001020304050607"
   35567             :     "1011121314151617"
   35568             :     "2021222324252627"
   35569             :     "3031323334353637"
   35570             :     "4041424344454647"
   35571             :     "5051525354555657"
   35572             :     "6061626364656667"
   35573             :     "7071727374757677"
   35574             : };
   35575             : static const char DIGITS_HEX[2*16+1] = {
   35576             :     "0123456789abcdef"
   35577             :     "0123456789ABCDEF"
   35578             : };
   35579             : 
   35580             : /* BuildPyUnicode */
   35581           0 : static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, char* chars, int clength,
   35582             :                                                 int prepend_sign, char padding_char) {
   35583           0 :     PyObject *uval;
   35584           0 :     Py_ssize_t uoffset = ulength - clength;
   35585             : #if CYTHON_USE_UNICODE_INTERNALS
   35586           0 :     Py_ssize_t i;
   35587             : #if CYTHON_PEP393_ENABLED
   35588           0 :     void *udata;
   35589           0 :     uval = PyUnicode_New(ulength, 127);
   35590           0 :     if (unlikely(!uval)) return NULL;
   35591           0 :     udata = PyUnicode_DATA(uval);
   35592             : #else
   35593             :     Py_UNICODE *udata;
   35594             :     uval = PyUnicode_FromUnicode(NULL, ulength);
   35595             :     if (unlikely(!uval)) return NULL;
   35596             :     udata = PyUnicode_AS_UNICODE(uval);
   35597             : #endif
   35598           0 :     if (uoffset > 0) {
   35599           0 :         i = 0;
   35600           0 :         if (prepend_sign) {
   35601           0 :             __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, 0, '-');
   35602           0 :             i++;
   35603             :         }
   35604           0 :         for (; i < uoffset; i++) {
   35605           0 :             __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, i, padding_char);
   35606             :         }
   35607             :     }
   35608           0 :     for (i=0; i < clength; i++) {
   35609           0 :         __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, uoffset+i, chars[i]);
   35610             :     }
   35611             : #else
   35612             :     {
   35613             :         PyObject *sign = NULL, *padding = NULL;
   35614             :         uval = NULL;
   35615             :         if (uoffset > 0) {
   35616             :             prepend_sign = !!prepend_sign;
   35617             :             if (uoffset > prepend_sign) {
   35618             :                 padding = PyUnicode_FromOrdinal(padding_char);
   35619             :                 if (likely(padding) && uoffset > prepend_sign + 1) {
   35620             :                     PyObject *tmp;
   35621             :                     PyObject *repeat = PyInt_FromSsize_t(uoffset - prepend_sign);
   35622             :                     if (unlikely(!repeat)) goto done_or_error;
   35623             :                     tmp = PyNumber_Multiply(padding, repeat);
   35624             :                     Py_DECREF(repeat);
   35625             :                     Py_DECREF(padding);
   35626             :                     padding = tmp;
   35627             :                 }
   35628             :                 if (unlikely(!padding)) goto done_or_error;
   35629             :             }
   35630             :             if (prepend_sign) {
   35631             :                 sign = PyUnicode_FromOrdinal('-');
   35632             :                 if (unlikely(!sign)) goto done_or_error;
   35633             :             }
   35634             :         }
   35635             :         uval = PyUnicode_DecodeASCII(chars, clength, NULL);
   35636             :         if (likely(uval) && padding) {
   35637             :             PyObject *tmp = PyNumber_Add(padding, uval);
   35638             :             Py_DECREF(uval);
   35639             :             uval = tmp;
   35640             :         }
   35641             :         if (likely(uval) && sign) {
   35642             :             PyObject *tmp = PyNumber_Add(sign, uval);
   35643             :             Py_DECREF(uval);
   35644             :             uval = tmp;
   35645             :         }
   35646             : done_or_error:
   35647             :         Py_XDECREF(padding);
   35648             :         Py_XDECREF(sign);
   35649             :     }
   35650             : #endif
   35651             :     return uval;
   35652             : }
   35653             : 
   35654             : /* CIntToPyUnicode */
   35655           0 : static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char, char format_char) {
   35656           0 :     char digits[sizeof(int)*3+2];
   35657           0 :     char *dpos, *end = digits + sizeof(int)*3+2;
   35658           0 :     const char *hex_digits = DIGITS_HEX;
   35659           0 :     Py_ssize_t length, ulength;
   35660           0 :     int prepend_sign, last_one_off;
   35661           0 :     int remaining;
   35662             : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
   35663             : #pragma GCC diagnostic push
   35664             : #pragma GCC diagnostic ignored "-Wconversion"
   35665             : #endif
   35666           0 :     const int neg_one = (int) -1, const_zero = (int) 0;
   35667             : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
   35668             : #pragma GCC diagnostic pop
   35669             : #endif
   35670           0 :     const int is_unsigned = neg_one > const_zero;
   35671           0 :     if (format_char == 'X') {
   35672           0 :         hex_digits += 16;
   35673           0 :         format_char = 'x';
   35674             :     }
   35675           0 :     remaining = value;
   35676           0 :     last_one_off = 0;
   35677           0 :     dpos = end;
   35678           0 :     do {
   35679           0 :         int digit_pos;
   35680           0 :         switch (format_char) {
   35681           0 :         case 'o':
   35682           0 :             digit_pos = abs((int)(remaining % (8*8)));
   35683           0 :             remaining = (int) (remaining / (8*8));
   35684           0 :             dpos -= 2;
   35685           0 :             memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2);
   35686           0 :             last_one_off = (digit_pos < 8);
   35687           0 :             break;
   35688           0 :         case 'd':
   35689           0 :             digit_pos = abs((int)(remaining % (10*10)));
   35690           0 :             remaining = (int) (remaining / (10*10));
   35691           0 :             dpos -= 2;
   35692           0 :             memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2);
   35693           0 :             last_one_off = (digit_pos < 10);
   35694           0 :             break;
   35695           0 :         case 'x':
   35696           0 :             *(--dpos) = hex_digits[abs((int)(remaining % 16))];
   35697           0 :             remaining = (int) (remaining / 16);
   35698           0 :             break;
   35699             :         default:
   35700             :             assert(0);
   35701             :             break;
   35702             :         }
   35703           0 :     } while (unlikely(remaining != 0));
   35704           0 :     assert(!last_one_off || *dpos == '0');
   35705           0 :     dpos += last_one_off;
   35706           0 :     length = end - dpos;
   35707           0 :     ulength = length;
   35708           0 :     prepend_sign = 0;
   35709           0 :     if (!is_unsigned && value <= neg_one) {
   35710           0 :         if (padding_char == ' ' || width <= length + 1) {
   35711           0 :             *(--dpos) = '-';
   35712           0 :             ++length;
   35713             :         } else {
   35714             :             prepend_sign = 1;
   35715             :         }
   35716           0 :         ++ulength;
   35717             :     }
   35718           0 :     if (width > ulength) {
   35719             :         ulength = width;
   35720             :     }
   35721           0 :     if (ulength == 1) {
   35722           0 :         return PyUnicode_FromOrdinal(*dpos);
   35723             :     }
   35724           0 :     return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char);
   35725             : }
   35726             : 
   35727             : /* CIntToPyUnicode */
   35728           0 : static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char, char format_char) {
   35729           0 :     char digits[sizeof(Py_ssize_t)*3+2];
   35730           0 :     char *dpos, *end = digits + sizeof(Py_ssize_t)*3+2;
   35731           0 :     const char *hex_digits = DIGITS_HEX;
   35732           0 :     Py_ssize_t length, ulength;
   35733           0 :     int prepend_sign, last_one_off;
   35734           0 :     Py_ssize_t remaining;
   35735             : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
   35736             : #pragma GCC diagnostic push
   35737             : #pragma GCC diagnostic ignored "-Wconversion"
   35738             : #endif
   35739           0 :     const Py_ssize_t neg_one = (Py_ssize_t) -1, const_zero = (Py_ssize_t) 0;
   35740             : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
   35741             : #pragma GCC diagnostic pop
   35742             : #endif
   35743           0 :     const int is_unsigned = neg_one > const_zero;
   35744           0 :     if (format_char == 'X') {
   35745           0 :         hex_digits += 16;
   35746           0 :         format_char = 'x';
   35747             :     }
   35748           0 :     remaining = value;
   35749           0 :     last_one_off = 0;
   35750           0 :     dpos = end;
   35751           0 :     do {
   35752           0 :         int digit_pos;
   35753           0 :         switch (format_char) {
   35754           0 :         case 'o':
   35755           0 :             digit_pos = abs((int)(remaining % (8*8)));
   35756           0 :             remaining = (Py_ssize_t) (remaining / (8*8));
   35757           0 :             dpos -= 2;
   35758           0 :             memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2);
   35759           0 :             last_one_off = (digit_pos < 8);
   35760           0 :             break;
   35761           0 :         case 'd':
   35762           0 :             digit_pos = abs((int)(remaining % (10*10)));
   35763           0 :             remaining = (Py_ssize_t) (remaining / (10*10));
   35764           0 :             dpos -= 2;
   35765           0 :             memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2);
   35766           0 :             last_one_off = (digit_pos < 10);
   35767           0 :             break;
   35768           0 :         case 'x':
   35769           0 :             *(--dpos) = hex_digits[abs((int)(remaining % 16))];
   35770           0 :             remaining = (Py_ssize_t) (remaining / 16);
   35771           0 :             break;
   35772             :         default:
   35773             :             assert(0);
   35774             :             break;
   35775             :         }
   35776           0 :     } while (unlikely(remaining != 0));
   35777           0 :     assert(!last_one_off || *dpos == '0');
   35778           0 :     dpos += last_one_off;
   35779           0 :     length = end - dpos;
   35780           0 :     ulength = length;
   35781           0 :     prepend_sign = 0;
   35782           0 :     if (!is_unsigned && value <= neg_one) {
   35783           0 :         if (padding_char == ' ' || width <= length + 1) {
   35784           0 :             *(--dpos) = '-';
   35785           0 :             ++length;
   35786             :         } else {
   35787             :             prepend_sign = 1;
   35788             :         }
   35789           0 :         ++ulength;
   35790             :     }
   35791           0 :     if (width > ulength) {
   35792             :         ulength = width;
   35793             :     }
   35794           0 :     if (ulength == 1) {
   35795           0 :         return PyUnicode_FromOrdinal(*dpos);
   35796             :     }
   35797           0 :     return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char);
   35798             : }
   35799             : 
   35800             : /* JoinPyUnicode */
   35801           0 : static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength,
   35802             :                                       Py_UCS4 max_char) {
   35803             : #if CYTHON_USE_UNICODE_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
   35804           0 :     PyObject *result_uval;
   35805           0 :     int result_ukind, kind_shift;
   35806           0 :     Py_ssize_t i, char_pos;
   35807           0 :     void *result_udata;
   35808           0 :     CYTHON_MAYBE_UNUSED_VAR(max_char);
   35809             : #if CYTHON_PEP393_ENABLED
   35810           0 :     result_uval = PyUnicode_New(result_ulength, max_char);
   35811           0 :     if (unlikely(!result_uval)) return NULL;
   35812           0 :     result_ukind = (max_char <= 255) ? PyUnicode_1BYTE_KIND : (max_char <= 65535) ? PyUnicode_2BYTE_KIND : PyUnicode_4BYTE_KIND;
   35813           0 :     kind_shift = (result_ukind == PyUnicode_4BYTE_KIND) ? 2 : result_ukind - 1;
   35814           0 :     result_udata = PyUnicode_DATA(result_uval);
   35815             : #else
   35816             :     result_uval = PyUnicode_FromUnicode(NULL, result_ulength);
   35817             :     if (unlikely(!result_uval)) return NULL;
   35818             :     result_ukind = sizeof(Py_UNICODE);
   35819             :     kind_shift = (result_ukind == 4) ? 2 : result_ukind - 1;
   35820             :     result_udata = PyUnicode_AS_UNICODE(result_uval);
   35821             : #endif
   35822           0 :     assert(kind_shift == 2 || kind_shift == 1 || kind_shift == 0);
   35823           0 :     char_pos = 0;
   35824           0 :     for (i=0; i < value_count; i++) {
   35825           0 :         int ukind;
   35826           0 :         Py_ssize_t ulength;
   35827           0 :         void *udata;
   35828           0 :         PyObject *uval = PyTuple_GET_ITEM(value_tuple, i);
   35829           0 :         if (unlikely(__Pyx_PyUnicode_READY(uval)))
   35830             :             goto bad;
   35831           0 :         ulength = __Pyx_PyUnicode_GET_LENGTH(uval);
   35832           0 :         if (unlikely(!ulength))
   35833           0 :             continue;
   35834           0 :         if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - ulength < char_pos))
   35835           0 :             goto overflow;
   35836           0 :         ukind = __Pyx_PyUnicode_KIND(uval);
   35837           0 :         udata = __Pyx_PyUnicode_DATA(uval);
   35838           0 :         if (!CYTHON_PEP393_ENABLED || ukind == result_ukind) {
   35839           0 :             memcpy((char *)result_udata + (char_pos << kind_shift), udata, (size_t) (ulength << kind_shift));
   35840             :         } else {
   35841             :             #if PY_VERSION_HEX >= 0x030d0000
   35842             :             if (unlikely(PyUnicode_CopyCharacters(result_uval, char_pos, uval, 0, ulength) < 0)) goto bad;
   35843             :             #elif CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030300F0 || defined(_PyUnicode_FastCopyCharacters)
   35844           0 :             _PyUnicode_FastCopyCharacters(result_uval, char_pos, uval, 0, ulength);
   35845             :             #else
   35846             :             Py_ssize_t j;
   35847             :             for (j=0; j < ulength; j++) {
   35848             :                 Py_UCS4 uchar = __Pyx_PyUnicode_READ(ukind, udata, j);
   35849             :                 __Pyx_PyUnicode_WRITE(result_ukind, result_udata, char_pos+j, uchar);
   35850             :             }
   35851             :             #endif
   35852             :         }
   35853           0 :         char_pos += ulength;
   35854             :     }
   35855             :     return result_uval;
   35856           0 : overflow:
   35857           0 :     PyErr_SetString(PyExc_OverflowError, "join() result is too long for a Python string");
   35858           0 : bad:
   35859           0 :     Py_DECREF(result_uval);
   35860             :     return NULL;
   35861             : #else
   35862             :     CYTHON_UNUSED_VAR(max_char);
   35863             :     CYTHON_UNUSED_VAR(result_ulength);
   35864             :     CYTHON_UNUSED_VAR(value_count);
   35865             :     return PyUnicode_Join(__pyx_empty_unicode, value_tuple);
   35866             : #endif
   35867             : }
   35868             : 
   35869             : /* GetAttr */
   35870           0 : static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
   35871             : #if CYTHON_USE_TYPE_SLOTS
   35872             : #if PY_MAJOR_VERSION >= 3
   35873           0 :     if (likely(PyUnicode_Check(n)))
   35874             : #else
   35875             :     if (likely(PyString_Check(n)))
   35876             : #endif
   35877           0 :         return __Pyx_PyObject_GetAttrStr(o, n);
   35878             : #endif
   35879           0 :     return PyObject_GetAttr(o, n);
   35880             : }
   35881             : 
   35882             : /* GetItemInt */
   35883           0 : static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
   35884           0 :     PyObject *r;
   35885           0 :     if (unlikely(!j)) return NULL;
   35886           0 :     r = PyObject_GetItem(o, j);
   35887           0 :     Py_DECREF(j);
   35888             :     return r;
   35889             : }
   35890             : static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
   35891             :                                                               CYTHON_NCP_UNUSED int wraparound,
   35892             :                                                               CYTHON_NCP_UNUSED int boundscheck) {
   35893             : #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
   35894             :     Py_ssize_t wrapped_i = i;
   35895             :     if (wraparound & unlikely(i < 0)) {
   35896             :         wrapped_i += PyList_GET_SIZE(o);
   35897             :     }
   35898             :     if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
   35899             :         PyObject *r = PyList_GET_ITEM(o, wrapped_i);
   35900             :         Py_INCREF(r);
   35901             :         return r;
   35902             :     }
   35903             :     return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
   35904             : #else
   35905             :     return PySequence_GetItem(o, i);
   35906             : #endif
   35907             : }
   35908           0 : static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
   35909             :                                                               CYTHON_NCP_UNUSED int wraparound,
   35910             :                                                               CYTHON_NCP_UNUSED int boundscheck) {
   35911             : #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
   35912           0 :     Py_ssize_t wrapped_i = i;
   35913           0 :     if (wraparound & unlikely(i < 0)) {
   35914           0 :         wrapped_i += PyTuple_GET_SIZE(o);
   35915             :     }
   35916           0 :     if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {
   35917           0 :         PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
   35918           0 :         Py_INCREF(r);
   35919           0 :         return r;
   35920             :     }
   35921           0 :     return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
   35922             : #else
   35923             :     return PySequence_GetItem(o, i);
   35924             : #endif
   35925             : }
   35926       16490 : static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
   35927             :                                                      CYTHON_NCP_UNUSED int wraparound,
   35928             :                                                      CYTHON_NCP_UNUSED int boundscheck) {
   35929             : #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
   35930       16490 :     if (is_list || PyList_CheckExact(o)) {
   35931           0 :         Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
   35932           0 :         if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
   35933           0 :             PyObject *r = PyList_GET_ITEM(o, n);
   35934           0 :             Py_INCREF(r);
   35935           0 :             return r;
   35936             :         }
   35937             :     }
   35938       16490 :     else if (PyTuple_CheckExact(o)) {
   35939       16490 :         Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
   35940       16490 :         if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) {
   35941       16490 :             PyObject *r = PyTuple_GET_ITEM(o, n);
   35942       16490 :             Py_INCREF(r);
   35943       16490 :             return r;
   35944             :         }
   35945             :     } else {
   35946           0 :         PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping;
   35947           0 :         PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence;
   35948           0 :         if (mm && mm->mp_subscript) {
   35949           0 :             PyObject *r, *key = PyInt_FromSsize_t(i);
   35950           0 :             if (unlikely(!key)) return NULL;
   35951           0 :             r = mm->mp_subscript(o, key);
   35952           0 :             Py_DECREF(key);
   35953           0 :             return r;
   35954             :         }
   35955           0 :         if (likely(sm && sm->sq_item)) {
   35956           0 :             if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) {
   35957           0 :                 Py_ssize_t l = sm->sq_length(o);
   35958           0 :                 if (likely(l >= 0)) {
   35959           0 :                     i += l;
   35960             :                 } else {
   35961           0 :                     if (!PyErr_ExceptionMatches(PyExc_OverflowError))
   35962             :                         return NULL;
   35963           0 :                     PyErr_Clear();
   35964             :                 }
   35965             :             }
   35966           0 :             return sm->sq_item(o, i);
   35967             :         }
   35968             :     }
   35969             : #else
   35970             :     if (is_list || !PyMapping_Check(o)) {
   35971             :         return PySequence_GetItem(o, i);
   35972             :     }
   35973             : #endif
   35974           0 :     return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
   35975             : }
   35976             : 
   35977             : /* PyObjectCallOneArg */
   35978          34 : static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
   35979          34 :     PyObject *args[2] = {NULL, arg};
   35980          34 :     return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
   35981             : }
   35982             : 
   35983             : /* ObjectGetItem */
   35984             : #if CYTHON_USE_TYPE_SLOTS
   35985           0 : static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject *index) {
   35986           0 :     PyObject *runerr = NULL;
   35987           0 :     Py_ssize_t key_value;
   35988           0 :     key_value = __Pyx_PyIndex_AsSsize_t(index);
   35989           0 :     if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) {
   35990           0 :         return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1);
   35991             :     }
   35992           0 :     if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) {
   35993           0 :         __Pyx_TypeName index_type_name = __Pyx_PyType_GetName(Py_TYPE(index));
   35994           0 :         PyErr_Clear();
   35995           0 :         PyErr_Format(PyExc_IndexError,
   35996             :             "cannot fit '" __Pyx_FMT_TYPENAME "' into an index-sized integer", index_type_name);
   35997             :         __Pyx_DECREF_TypeName(index_type_name);
   35998             :     }
   35999             :     return NULL;
   36000             : }
   36001           0 : static PyObject *__Pyx_PyObject_GetItem_Slow(PyObject *obj, PyObject *key) {
   36002           0 :     __Pyx_TypeName obj_type_name;
   36003           0 :     if (likely(PyType_Check(obj))) {
   36004           0 :         PyObject *meth = __Pyx_PyObject_GetAttrStrNoError(obj, __pyx_n_s_class_getitem);
   36005           0 :         if (!meth) {
   36006           0 :             PyErr_Clear();
   36007             :         } else {
   36008           0 :             PyObject *result = __Pyx_PyObject_CallOneArg(meth, key);
   36009           0 :             Py_DECREF(meth);
   36010           0 :             return result;
   36011             :         }
   36012             :     }
   36013           0 :     obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
   36014           0 :     PyErr_Format(PyExc_TypeError,
   36015             :         "'" __Pyx_FMT_TYPENAME "' object is not subscriptable", obj_type_name);
   36016           0 :     __Pyx_DECREF_TypeName(obj_type_name);
   36017           0 :     return NULL;
   36018             : }
   36019         103 : static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key) {
   36020         103 :     PyTypeObject *tp = Py_TYPE(obj);
   36021         103 :     PyMappingMethods *mm = tp->tp_as_mapping;
   36022         103 :     PySequenceMethods *sm = tp->tp_as_sequence;
   36023         103 :     if (likely(mm && mm->mp_subscript)) {
   36024         103 :         return mm->mp_subscript(obj, key);
   36025             :     }
   36026           0 :     if (likely(sm && sm->sq_item)) {
   36027           0 :         return __Pyx_PyObject_GetIndex(obj, key);
   36028             :     }
   36029           0 :     return __Pyx_PyObject_GetItem_Slow(obj, key);
   36030             : }
   36031             : #endif
   36032             : 
   36033             : /* KeywordStringCheck */
   36034           0 : static int __Pyx_CheckKeywordStrings(
   36035             :     PyObject *kw,
   36036             :     const char* function_name,
   36037             :     int kw_allowed)
   36038             : {
   36039           0 :     PyObject* key = 0;
   36040           0 :     Py_ssize_t pos = 0;
   36041             : #if CYTHON_COMPILING_IN_PYPY
   36042             :     if (!kw_allowed && PyDict_Next(kw, &pos, &key, 0))
   36043             :         goto invalid_keyword;
   36044             :     return 1;
   36045             : #else
   36046           0 :     if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kw))) {
   36047           0 :         Py_ssize_t kwsize;
   36048             : #if CYTHON_ASSUME_SAFE_MACROS
   36049           0 :         kwsize = PyTuple_GET_SIZE(kw);
   36050             : #else
   36051             :         kwsize = PyTuple_Size(kw);
   36052             :         if (kwsize < 0) return 0;
   36053             : #endif
   36054           0 :         if (unlikely(kwsize == 0))
   36055             :             return 1;
   36056           0 :         if (!kw_allowed) {
   36057             : #if CYTHON_ASSUME_SAFE_MACROS
   36058           0 :             key = PyTuple_GET_ITEM(kw, 0);
   36059             : #else
   36060             :             key = PyTuple_GetItem(kw, pos);
   36061             :             if (!key) return 0;
   36062             : #endif
   36063           0 :             goto invalid_keyword;
   36064             :         }
   36065             : #if PY_VERSION_HEX < 0x03090000
   36066             :         for (pos = 0; pos < kwsize; pos++) {
   36067             : #if CYTHON_ASSUME_SAFE_MACROS
   36068             :             key = PyTuple_GET_ITEM(kw, pos);
   36069             : #else
   36070             :             key = PyTuple_GetItem(kw, pos);
   36071             :             if (!key) return 0;
   36072             : #endif
   36073             :             if (unlikely(!PyUnicode_Check(key)))
   36074             :                 goto invalid_keyword_type;
   36075             :         }
   36076             : #endif
   36077             :         return 1;
   36078             :     }
   36079           0 :     while (PyDict_Next(kw, &pos, &key, 0)) {
   36080             :         #if PY_MAJOR_VERSION < 3
   36081             :         if (unlikely(!PyString_Check(key)))
   36082             :         #endif
   36083           0 :             if (unlikely(!PyUnicode_Check(key)))
   36084           0 :                 goto invalid_keyword_type;
   36085             :     }
   36086           0 :     if (!kw_allowed && unlikely(key))
   36087           0 :         goto invalid_keyword;
   36088             :     return 1;
   36089           0 : invalid_keyword_type:
   36090           0 :     PyErr_Format(PyExc_TypeError,
   36091             :         "%.200s() keywords must be strings", function_name);
   36092           0 :     return 0;
   36093             : #endif
   36094           0 : invalid_keyword:
   36095             :     #if PY_MAJOR_VERSION < 3
   36096             :     PyErr_Format(PyExc_TypeError,
   36097             :         "%.200s() got an unexpected keyword argument '%.200s'",
   36098             :         function_name, PyString_AsString(key));
   36099             :     #else
   36100           0 :     PyErr_Format(PyExc_TypeError,
   36101             :         "%s() got an unexpected keyword argument '%U'",
   36102             :         function_name, key);
   36103             :     #endif
   36104           0 :     return 0;
   36105             : }
   36106             : 
   36107             : /* DivInt[Py_ssize_t] */
   36108           0 : static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t a, Py_ssize_t b) {
   36109           0 :     Py_ssize_t q = a / b;
   36110           0 :     Py_ssize_t r = a - q*b;
   36111           0 :     q -= ((r != 0) & ((r ^ b) < 0));
   36112           0 :     return q;
   36113             : }
   36114             : 
   36115             : /* GetAttr3 */
   36116             : #if __PYX_LIMITED_VERSION_HEX < 0x030d00A1
   36117           0 : static PyObject *__Pyx_GetAttr3Default(PyObject *d) {
   36118           0 :     __Pyx_PyThreadState_declare
   36119           0 :     __Pyx_PyThreadState_assign
   36120           0 :     if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
   36121             :         return NULL;
   36122           0 :     __Pyx_PyErr_Clear();
   36123           0 :     Py_INCREF(d);
   36124             :     return d;
   36125             : }
   36126             : #endif
   36127           0 : static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
   36128           0 :     PyObject *r;
   36129             : #if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1
   36130             :     int res = PyObject_GetOptionalAttr(o, n, &r);
   36131             :     return (res != 0) ? r : __Pyx_NewRef(d);
   36132             : #else
   36133             :   #if CYTHON_USE_TYPE_SLOTS
   36134           0 :     if (likely(PyString_Check(n))) {
   36135           0 :         r = __Pyx_PyObject_GetAttrStrNoError(o, n);
   36136           0 :         if (unlikely(!r) && likely(!PyErr_Occurred())) {
   36137           0 :             r = __Pyx_NewRef(d);
   36138             :         }
   36139           0 :         return r;
   36140             :     }
   36141             :   #endif
   36142           0 :     r = PyObject_GetAttr(o, n);
   36143           0 :     return (likely(r)) ? r : __Pyx_GetAttr3Default(d);
   36144             : #endif
   36145             : }
   36146             : 
   36147             : /* PyDictVersioning */
   36148             : #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
   36149             : static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
   36150             :     PyObject *dict = Py_TYPE(obj)->tp_dict;
   36151             :     return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
   36152             : }
   36153             : static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
   36154             :     PyObject **dictptr = NULL;
   36155             :     Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
   36156             :     if (offset) {
   36157             : #if CYTHON_COMPILING_IN_CPYTHON
   36158             :         dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
   36159             : #else
   36160             :         dictptr = _PyObject_GetDictPtr(obj);
   36161             : #endif
   36162             :     }
   36163             :     return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
   36164             : }
   36165             : static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
   36166             :     PyObject *dict = Py_TYPE(obj)->tp_dict;
   36167             :     if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
   36168             :         return 0;
   36169             :     return obj_dict_version == __Pyx_get_object_dict_version(obj);
   36170             : }
   36171             : #endif
   36172             : 
   36173             : /* GetModuleGlobalName */
   36174             : #if CYTHON_USE_DICT_VERSIONS
   36175             : static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
   36176             : #else
   36177       13293 : static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
   36178             : #endif
   36179             : {
   36180       13293 :     PyObject *result;
   36181             : #if !CYTHON_AVOID_BORROWED_REFS
   36182             : #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && PY_VERSION_HEX < 0x030d0000
   36183       13293 :     result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
   36184             :     __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
   36185       13293 :     if (likely(result)) {
   36186       26586 :         return __Pyx_NewRef(result);
   36187           0 :     } else if (unlikely(PyErr_Occurred())) {
   36188             :         return NULL;
   36189             :     }
   36190             : #elif CYTHON_COMPILING_IN_LIMITED_API
   36191             :     if (unlikely(!__pyx_m)) {
   36192             :         return NULL;
   36193             :     }
   36194             :     result = PyObject_GetAttr(__pyx_m, name);
   36195             :     if (likely(result)) {
   36196             :         return result;
   36197             :     }
   36198             : #else
   36199             :     result = PyDict_GetItem(__pyx_d, name);
   36200             :     __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
   36201             :     if (likely(result)) {
   36202             :         return __Pyx_NewRef(result);
   36203             :     }
   36204             : #endif
   36205             : #else
   36206             :     result = PyObject_GetItem(__pyx_d, name);
   36207             :     __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
   36208             :     if (likely(result)) {
   36209             :         return __Pyx_NewRef(result);
   36210             :     }
   36211             :     PyErr_Clear();
   36212             : #endif
   36213           0 :     return __Pyx_GetBuiltinName(name);
   36214             : }
   36215             : 
   36216             : /* RaiseTooManyValuesToUnpack */
   36217           0 : static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
   36218           0 :     PyErr_Format(PyExc_ValueError,
   36219             :                  "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
   36220           0 : }
   36221             : 
   36222             : /* RaiseNeedMoreValuesToUnpack */
   36223           0 : static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
   36224           0 :     PyErr_Format(PyExc_ValueError,
   36225             :                  "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
   36226             :                  index, (index == 1) ? "" : "s");
   36227           0 : }
   36228             : 
   36229             : /* RaiseNoneIterError */
   36230           0 : static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
   36231           0 :     PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
   36232           0 : }
   36233             : 
   36234             : /* ExtTypeTest */
   36235           0 : static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
   36236           0 :     __Pyx_TypeName obj_type_name;
   36237           0 :     __Pyx_TypeName type_name;
   36238           0 :     if (unlikely(!type)) {
   36239           0 :         PyErr_SetString(PyExc_SystemError, "Missing type object");
   36240           0 :         return 0;
   36241             :     }
   36242           0 :     if (likely(__Pyx_TypeCheck(obj, type)))
   36243             :         return 1;
   36244           0 :     obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
   36245           0 :     type_name = __Pyx_PyType_GetName(type);
   36246           0 :     PyErr_Format(PyExc_TypeError,
   36247             :                  "Cannot convert " __Pyx_FMT_TYPENAME " to " __Pyx_FMT_TYPENAME,
   36248             :                  obj_type_name, type_name);
   36249           0 :     __Pyx_DECREF_TypeName(obj_type_name);
   36250           0 :     __Pyx_DECREF_TypeName(type_name);
   36251           0 :     return 0;
   36252             : }
   36253             : 
   36254             : /* GetTopmostException */
   36255             : #if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE
   36256             : static _PyErr_StackItem *
   36257          12 : __Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
   36258             : {
   36259          12 :     _PyErr_StackItem *exc_info = tstate->exc_info;
   36260          56 :     while ((exc_info->exc_value == NULL || exc_info->exc_value == Py_None) &&
   36261          56 :            exc_info->previous_item != NULL)
   36262             :     {
   36263             :         exc_info = exc_info->previous_item;
   36264             :     }
   36265          12 :     return exc_info;
   36266             : }
   36267             : #endif
   36268             : 
   36269             : /* SaveResetException */
   36270             : #if CYTHON_FAST_THREAD_STATE
   36271          12 : static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
   36272             :   #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
   36273          12 :     _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
   36274          12 :     PyObject *exc_value = exc_info->exc_value;
   36275          12 :     if (exc_value == NULL || exc_value == Py_None) {
   36276          12 :         *value = NULL;
   36277          12 :         *type = NULL;
   36278          12 :         *tb = NULL;
   36279             :     } else {
   36280           0 :         *value = exc_value;
   36281           0 :         Py_INCREF(*value);
   36282           0 :         *type = (PyObject*) Py_TYPE(exc_value);
   36283           0 :         Py_INCREF(*type);
   36284           0 :         *tb = PyException_GetTraceback(exc_value);
   36285             :     }
   36286             :   #elif CYTHON_USE_EXC_INFO_STACK
   36287             :     _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
   36288             :     *type = exc_info->exc_type;
   36289             :     *value = exc_info->exc_value;
   36290             :     *tb = exc_info->exc_traceback;
   36291             :     Py_XINCREF(*type);
   36292             :     Py_XINCREF(*value);
   36293             :     Py_XINCREF(*tb);
   36294             :   #else
   36295             :     *type = tstate->exc_type;
   36296             :     *value = tstate->exc_value;
   36297             :     *tb = tstate->exc_traceback;
   36298             :     Py_XINCREF(*type);
   36299             :     Py_XINCREF(*value);
   36300             :     Py_XINCREF(*tb);
   36301             :   #endif
   36302          12 : }
   36303           0 : static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
   36304             :   #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
   36305           0 :     _PyErr_StackItem *exc_info = tstate->exc_info;
   36306           0 :     PyObject *tmp_value = exc_info->exc_value;
   36307           0 :     exc_info->exc_value = value;
   36308           0 :     Py_XDECREF(tmp_value);
   36309           0 :     Py_XDECREF(type);
   36310           0 :     Py_XDECREF(tb);
   36311             :   #else
   36312             :     PyObject *tmp_type, *tmp_value, *tmp_tb;
   36313             :     #if CYTHON_USE_EXC_INFO_STACK
   36314             :     _PyErr_StackItem *exc_info = tstate->exc_info;
   36315             :     tmp_type = exc_info->exc_type;
   36316             :     tmp_value = exc_info->exc_value;
   36317             :     tmp_tb = exc_info->exc_traceback;
   36318             :     exc_info->exc_type = type;
   36319             :     exc_info->exc_value = value;
   36320             :     exc_info->exc_traceback = tb;
   36321             :     #else
   36322             :     tmp_type = tstate->exc_type;
   36323             :     tmp_value = tstate->exc_value;
   36324             :     tmp_tb = tstate->exc_traceback;
   36325             :     tstate->exc_type = type;
   36326             :     tstate->exc_value = value;
   36327             :     tstate->exc_traceback = tb;
   36328             :     #endif
   36329             :     Py_XDECREF(tmp_type);
   36330             :     Py_XDECREF(tmp_value);
   36331             :     Py_XDECREF(tmp_tb);
   36332             :   #endif
   36333           0 : }
   36334             : #endif
   36335             : 
   36336             : /* GetException */
   36337             : #if CYTHON_FAST_THREAD_STATE
   36338           0 : static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
   36339             : #else
   36340             : static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
   36341             : #endif
   36342             : {
   36343           0 :     PyObject *local_type = NULL, *local_value, *local_tb = NULL;
   36344             : #if CYTHON_FAST_THREAD_STATE
   36345           0 :     PyObject *tmp_type, *tmp_value, *tmp_tb;
   36346             :   #if PY_VERSION_HEX >= 0x030C00A6
   36347           0 :     local_value = tstate->current_exception;
   36348           0 :     tstate->current_exception = 0;
   36349           0 :     if (likely(local_value)) {
   36350           0 :         local_type = (PyObject*) Py_TYPE(local_value);
   36351           0 :         Py_INCREF(local_type);
   36352           0 :         local_tb = PyException_GetTraceback(local_value);
   36353             :     }
   36354             :   #else
   36355             :     local_type = tstate->curexc_type;
   36356             :     local_value = tstate->curexc_value;
   36357             :     local_tb = tstate->curexc_traceback;
   36358             :     tstate->curexc_type = 0;
   36359             :     tstate->curexc_value = 0;
   36360             :     tstate->curexc_traceback = 0;
   36361             :   #endif
   36362             : #else
   36363             :     PyErr_Fetch(&local_type, &local_value, &local_tb);
   36364             : #endif
   36365           0 :     PyErr_NormalizeException(&local_type, &local_value, &local_tb);
   36366             : #if CYTHON_FAST_THREAD_STATE && PY_VERSION_HEX >= 0x030C00A6
   36367           0 :     if (unlikely(tstate->current_exception))
   36368             : #elif CYTHON_FAST_THREAD_STATE
   36369             :     if (unlikely(tstate->curexc_type))
   36370             : #else
   36371             :     if (unlikely(PyErr_Occurred()))
   36372             : #endif
   36373           0 :         goto bad;
   36374             :     #if PY_MAJOR_VERSION >= 3
   36375           0 :     if (local_tb) {
   36376           0 :         if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
   36377           0 :             goto bad;
   36378             :     }
   36379             :     #endif
   36380           0 :     Py_XINCREF(local_tb);
   36381           0 :     Py_XINCREF(local_type);
   36382           0 :     Py_XINCREF(local_value);
   36383           0 :     *type = local_type;
   36384           0 :     *value = local_value;
   36385           0 :     *tb = local_tb;
   36386             : #if CYTHON_FAST_THREAD_STATE
   36387             :     #if CYTHON_USE_EXC_INFO_STACK
   36388             :     {
   36389           0 :         _PyErr_StackItem *exc_info = tstate->exc_info;
   36390             :       #if PY_VERSION_HEX >= 0x030B00a4
   36391           0 :         tmp_value = exc_info->exc_value;
   36392           0 :         exc_info->exc_value = local_value;
   36393           0 :         tmp_type = NULL;
   36394           0 :         tmp_tb = NULL;
   36395           0 :         Py_XDECREF(local_type);
   36396           0 :         Py_XDECREF(local_tb);
   36397             :       #else
   36398             :         tmp_type = exc_info->exc_type;
   36399             :         tmp_value = exc_info->exc_value;
   36400             :         tmp_tb = exc_info->exc_traceback;
   36401             :         exc_info->exc_type = local_type;
   36402             :         exc_info->exc_value = local_value;
   36403             :         exc_info->exc_traceback = local_tb;
   36404             :       #endif
   36405             :     }
   36406             :     #else
   36407             :     tmp_type = tstate->exc_type;
   36408             :     tmp_value = tstate->exc_value;
   36409             :     tmp_tb = tstate->exc_traceback;
   36410             :     tstate->exc_type = local_type;
   36411             :     tstate->exc_value = local_value;
   36412             :     tstate->exc_traceback = local_tb;
   36413             :     #endif
   36414           0 :     Py_XDECREF(tmp_type);
   36415           0 :     Py_XDECREF(tmp_value);
   36416           0 :     Py_XDECREF(tmp_tb);
   36417             : #else
   36418             :     PyErr_SetExcInfo(local_type, local_value, local_tb);
   36419             : #endif
   36420           0 :     return 0;
   36421           0 : bad:
   36422           0 :     *type = 0;
   36423           0 :     *value = 0;
   36424           0 :     *tb = 0;
   36425           0 :     Py_XDECREF(local_type);
   36426           0 :     Py_XDECREF(local_value);
   36427           0 :     Py_XDECREF(local_tb);
   36428           0 :     return -1;
   36429             : }
   36430             : 
   36431             : /* SwapException */
   36432             : #if CYTHON_FAST_THREAD_STATE
   36433           0 : static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
   36434           0 :     PyObject *tmp_type, *tmp_value, *tmp_tb;
   36435             :   #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
   36436           0 :     _PyErr_StackItem *exc_info = tstate->exc_info;
   36437           0 :     tmp_value = exc_info->exc_value;
   36438           0 :     exc_info->exc_value = *value;
   36439           0 :     if (tmp_value == NULL || tmp_value == Py_None) {
   36440           0 :         Py_XDECREF(tmp_value);
   36441           0 :         tmp_value = NULL;
   36442           0 :         tmp_type = NULL;
   36443           0 :         tmp_tb = NULL;
   36444             :     } else {
   36445           0 :         tmp_type = (PyObject*) Py_TYPE(tmp_value);
   36446           0 :         Py_INCREF(tmp_type);
   36447             :         #if CYTHON_COMPILING_IN_CPYTHON
   36448           0 :         tmp_tb = ((PyBaseExceptionObject*) tmp_value)->traceback;
   36449           0 :         Py_XINCREF(tmp_tb);
   36450             :         #else
   36451             :         tmp_tb = PyException_GetTraceback(tmp_value);
   36452             :         #endif
   36453             :     }
   36454             :   #elif CYTHON_USE_EXC_INFO_STACK
   36455             :     _PyErr_StackItem *exc_info = tstate->exc_info;
   36456             :     tmp_type = exc_info->exc_type;
   36457             :     tmp_value = exc_info->exc_value;
   36458             :     tmp_tb = exc_info->exc_traceback;
   36459             :     exc_info->exc_type = *type;
   36460             :     exc_info->exc_value = *value;
   36461             :     exc_info->exc_traceback = *tb;
   36462             :   #else
   36463             :     tmp_type = tstate->exc_type;
   36464             :     tmp_value = tstate->exc_value;
   36465             :     tmp_tb = tstate->exc_traceback;
   36466             :     tstate->exc_type = *type;
   36467             :     tstate->exc_value = *value;
   36468             :     tstate->exc_traceback = *tb;
   36469             :   #endif
   36470           0 :     *type = tmp_type;
   36471           0 :     *value = tmp_value;
   36472           0 :     *tb = tmp_tb;
   36473           0 : }
   36474             : #else
   36475             : static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
   36476             :     PyObject *tmp_type, *tmp_value, *tmp_tb;
   36477             :     PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
   36478             :     PyErr_SetExcInfo(*type, *value, *tb);
   36479             :     *type = tmp_type;
   36480             :     *value = tmp_value;
   36481             :     *tb = tmp_tb;
   36482             : }
   36483             : #endif
   36484             : 
   36485             : /* Import */
   36486           0 : static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
   36487           0 :     PyObject *module = 0;
   36488           0 :     PyObject *empty_dict = 0;
   36489           0 :     PyObject *empty_list = 0;
   36490             :     #if PY_MAJOR_VERSION < 3
   36491             :     PyObject *py_import;
   36492             :     py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
   36493             :     if (unlikely(!py_import))
   36494             :         goto bad;
   36495             :     if (!from_list) {
   36496             :         empty_list = PyList_New(0);
   36497             :         if (unlikely(!empty_list))
   36498             :             goto bad;
   36499             :         from_list = empty_list;
   36500             :     }
   36501             :     #endif
   36502           0 :     empty_dict = PyDict_New();
   36503           0 :     if (unlikely(!empty_dict))
   36504           0 :         goto bad;
   36505             :     {
   36506             :         #if PY_MAJOR_VERSION >= 3
   36507           0 :         if (level == -1) {
   36508           0 :             if (strchr(__Pyx_MODULE_NAME, '.') != NULL) {
   36509           0 :                 module = PyImport_ImportModuleLevelObject(
   36510           0 :                     name, __pyx_d, empty_dict, from_list, 1);
   36511           0 :                 if (unlikely(!module)) {
   36512           0 :                     if (unlikely(!PyErr_ExceptionMatches(PyExc_ImportError)))
   36513           0 :                         goto bad;
   36514           0 :                     PyErr_Clear();
   36515             :                 }
   36516             :             }
   36517           0 :             level = 0;
   36518             :         }
   36519             :         #endif
   36520           0 :         if (!module) {
   36521             :             #if PY_MAJOR_VERSION < 3
   36522             :             PyObject *py_level = PyInt_FromLong(level);
   36523             :             if (unlikely(!py_level))
   36524             :                 goto bad;
   36525             :             module = PyObject_CallFunctionObjArgs(py_import,
   36526             :                 name, __pyx_d, empty_dict, from_list, py_level, (PyObject *)NULL);
   36527             :             Py_DECREF(py_level);
   36528             :             #else
   36529           0 :             module = PyImport_ImportModuleLevelObject(
   36530           0 :                 name, __pyx_d, empty_dict, from_list, level);
   36531             :             #endif
   36532             :         }
   36533             :     }
   36534           0 : bad:
   36535           0 :     Py_XDECREF(empty_dict);
   36536           0 :     Py_XDECREF(empty_list);
   36537             :     #if PY_MAJOR_VERSION < 3
   36538             :     Py_XDECREF(py_import);
   36539             :     #endif
   36540           0 :     return module;
   36541             : }
   36542             : 
   36543             : /* ImportDottedModule */
   36544             : #if PY_MAJOR_VERSION >= 3
   36545           0 : static PyObject *__Pyx__ImportDottedModule_Error(PyObject *name, PyObject *parts_tuple, Py_ssize_t count) {
   36546           0 :     PyObject *partial_name = NULL, *slice = NULL, *sep = NULL;
   36547           0 :     if (unlikely(PyErr_Occurred())) {
   36548           0 :         PyErr_Clear();
   36549             :     }
   36550           0 :     if (likely(PyTuple_GET_SIZE(parts_tuple) == count)) {
   36551             :         partial_name = name;
   36552             :     } else {
   36553           0 :         slice = PySequence_GetSlice(parts_tuple, 0, count);
   36554           0 :         if (unlikely(!slice))
   36555           0 :             goto bad;
   36556           0 :         sep = PyUnicode_FromStringAndSize(".", 1);
   36557           0 :         if (unlikely(!sep))
   36558           0 :             goto bad;
   36559           0 :         partial_name = PyUnicode_Join(sep, slice);
   36560             :     }
   36561           0 :     PyErr_Format(
   36562             : #if PY_MAJOR_VERSION < 3
   36563             :         PyExc_ImportError,
   36564             :         "No module named '%s'", PyString_AS_STRING(partial_name));
   36565             : #else
   36566             : #if PY_VERSION_HEX >= 0x030600B1
   36567             :         PyExc_ModuleNotFoundError,
   36568             : #else
   36569             :         PyExc_ImportError,
   36570             : #endif
   36571             :         "No module named '%U'", partial_name);
   36572             : #endif
   36573           0 : bad:
   36574           0 :     Py_XDECREF(sep);
   36575           0 :     Py_XDECREF(slice);
   36576           0 :     Py_XDECREF(partial_name);
   36577           0 :     return NULL;
   36578             : }
   36579             : #endif
   36580             : #if PY_MAJOR_VERSION >= 3
   36581           9 : static PyObject *__Pyx__ImportDottedModule_Lookup(PyObject *name) {
   36582           9 :     PyObject *imported_module;
   36583             : #if PY_VERSION_HEX < 0x030700A1 || (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM  < 0x07030400)
   36584             :     PyObject *modules = PyImport_GetModuleDict();
   36585             :     if (unlikely(!modules))
   36586             :         return NULL;
   36587             :     imported_module = __Pyx_PyDict_GetItemStr(modules, name);
   36588             :     Py_XINCREF(imported_module);
   36589             : #else
   36590          18 :     imported_module = PyImport_GetModule(name);
   36591             : #endif
   36592           9 :     return imported_module;
   36593             : }
   36594             : #endif
   36595             : #if PY_MAJOR_VERSION >= 3
   36596           0 : static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject *name, PyObject *parts_tuple) {
   36597           0 :     Py_ssize_t i, nparts;
   36598           0 :     nparts = PyTuple_GET_SIZE(parts_tuple);
   36599           0 :     for (i=1; i < nparts && module; i++) {
   36600           0 :         PyObject *part, *submodule;
   36601             : #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
   36602           0 :         part = PyTuple_GET_ITEM(parts_tuple, i);
   36603             : #else
   36604             :         part = PySequence_ITEM(parts_tuple, i);
   36605             : #endif
   36606           0 :         submodule = __Pyx_PyObject_GetAttrStrNoError(module, part);
   36607             : #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
   36608             :         Py_DECREF(part);
   36609             : #endif
   36610           0 :         Py_DECREF(module);
   36611           0 :         module = submodule;
   36612             :     }
   36613           0 :     if (unlikely(!module)) {
   36614           0 :         return __Pyx__ImportDottedModule_Error(name, parts_tuple, i);
   36615             :     }
   36616             :     return module;
   36617             : }
   36618             : #endif
   36619           0 : static PyObject *__Pyx__ImportDottedModule(PyObject *name, PyObject *parts_tuple) {
   36620             : #if PY_MAJOR_VERSION < 3
   36621             :     PyObject *module, *from_list, *star = __pyx_n_s__3;
   36622             :     CYTHON_UNUSED_VAR(parts_tuple);
   36623             :     from_list = PyList_New(1);
   36624             :     if (unlikely(!from_list))
   36625             :         return NULL;
   36626             :     Py_INCREF(star);
   36627             :     PyList_SET_ITEM(from_list, 0, star);
   36628             :     module = __Pyx_Import(name, from_list, 0);
   36629             :     Py_DECREF(from_list);
   36630             :     return module;
   36631             : #else
   36632           0 :     PyObject *imported_module;
   36633           0 :     PyObject *module = __Pyx_Import(name, NULL, 0);
   36634           0 :     if (!parts_tuple || unlikely(!module))
   36635             :         return module;
   36636           0 :     imported_module = __Pyx__ImportDottedModule_Lookup(name);
   36637           0 :     if (likely(imported_module)) {
   36638           0 :         Py_DECREF(module);
   36639           0 :         return imported_module;
   36640             :     }
   36641           0 :     PyErr_Clear();
   36642           0 :     return __Pyx_ImportDottedModule_WalkParts(module, name, parts_tuple);
   36643             : #endif
   36644             : }
   36645           9 : static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple) {
   36646             : #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030400B1
   36647           9 :     PyObject *module = __Pyx__ImportDottedModule_Lookup(name);
   36648           9 :     if (likely(module)) {
   36649           9 :         PyObject *spec = __Pyx_PyObject_GetAttrStrNoError(module, __pyx_n_s_spec);
   36650           9 :         if (likely(spec)) {
   36651           9 :             PyObject *unsafe = __Pyx_PyObject_GetAttrStrNoError(spec, __pyx_n_s_initializing);
   36652           9 :             if (likely(!unsafe || !__Pyx_PyObject_IsTrue(unsafe))) {
   36653           9 :                 Py_DECREF(spec);
   36654             :                 spec = NULL;
   36655             :             }
   36656           9 :             Py_XDECREF(unsafe);
   36657             :         }
   36658           9 :         if (likely(!spec)) {
   36659           9 :             PyErr_Clear();
   36660           9 :             return module;
   36661             :         }
   36662           0 :         Py_DECREF(spec);
   36663           0 :         Py_DECREF(module);
   36664           0 :     } else if (PyErr_Occurred()) {
   36665           0 :         PyErr_Clear();
   36666             :     }
   36667             : #endif
   36668           0 :     return __Pyx__ImportDottedModule(name, parts_tuple);
   36669             : }
   36670             : 
   36671             : /* FastTypeChecks */
   36672             : #if CYTHON_COMPILING_IN_CPYTHON
   36673             : static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
   36674           0 :     while (a) {
   36675           0 :         a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*);
   36676           0 :         if (a == b)
   36677             :             return 1;
   36678             :     }
   36679           0 :     return b == &PyBaseObject_Type;
   36680             : }
   36681         579 : static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
   36682         579 :     PyObject *mro;
   36683         579 :     if (a == b) return 1;
   36684         579 :     mro = a->tp_mro;
   36685         579 :     if (likely(mro)) {
   36686         579 :         Py_ssize_t i, n;
   36687         579 :         n = PyTuple_GET_SIZE(mro);
   36688        1737 :         for (i = 0; i < n; i++) {
   36689        1158 :             if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
   36690             :                 return 1;
   36691             :         }
   36692             :         return 0;
   36693             :     }
   36694         579 :     return __Pyx_InBases(a, b);
   36695             : }
   36696        1886 : static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) {
   36697        1886 :     PyObject *mro;
   36698        1886 :     if (cls == a || cls == b) return 1;
   36699         119 :     mro = cls->tp_mro;
   36700         119 :     if (likely(mro)) {
   36701         119 :         Py_ssize_t i, n;
   36702         119 :         n = PyTuple_GET_SIZE(mro);
   36703         357 :         for (i = 0; i < n; i++) {
   36704         238 :             PyObject *base = PyTuple_GET_ITEM(mro, i);
   36705         238 :             if (base == (PyObject *)a || base == (PyObject *)b)
   36706             :                 return 1;
   36707             :         }
   36708             :         return 0;
   36709             :     }
   36710           0 :     return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b);
   36711             : }
   36712             : #if PY_MAJOR_VERSION == 2
   36713             : static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
   36714             :     PyObject *exception, *value, *tb;
   36715             :     int res;
   36716             :     __Pyx_PyThreadState_declare
   36717             :     __Pyx_PyThreadState_assign
   36718             :     __Pyx_ErrFetch(&exception, &value, &tb);
   36719             :     res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
   36720             :     if (unlikely(res == -1)) {
   36721             :         PyErr_WriteUnraisable(err);
   36722             :         res = 0;
   36723             :     }
   36724             :     if (!res) {
   36725             :         res = PyObject_IsSubclass(err, exc_type2);
   36726             :         if (unlikely(res == -1)) {
   36727             :             PyErr_WriteUnraisable(err);
   36728             :             res = 0;
   36729             :         }
   36730             :     }
   36731             :     __Pyx_ErrRestore(exception, value, tb);
   36732             :     return res;
   36733             : }
   36734             : #else
   36735           0 : static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
   36736           0 :     if (exc_type1) {
   36737             :         return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2);
   36738             :     } else {
   36739           0 :         return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
   36740             :     }
   36741             : }
   36742             : #endif
   36743           0 : static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
   36744           0 :     Py_ssize_t i, n;
   36745           0 :     assert(PyExceptionClass_Check(exc_type));
   36746           0 :     n = PyTuple_GET_SIZE(tuple);
   36747             : #if PY_MAJOR_VERSION >= 3
   36748           0 :     for (i=0; i<n; i++) {
   36749           0 :         if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
   36750             :     }
   36751             : #endif
   36752           0 :     for (i=0; i<n; i++) {
   36753           0 :         PyObject *t = PyTuple_GET_ITEM(tuple, i);
   36754             :         #if PY_MAJOR_VERSION < 3
   36755             :         if (likely(exc_type == t)) return 1;
   36756             :         #endif
   36757           0 :         if (likely(PyExceptionClass_Check(t))) {
   36758           0 :             if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
   36759             :         } else {
   36760           0 :         }
   36761             :     }
   36762             :     return 0;
   36763             : }
   36764           0 : static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
   36765           0 :     if (likely(err == exc_type)) return 1;
   36766           0 :     if (likely(PyExceptionClass_Check(err))) {
   36767           0 :         if (likely(PyExceptionClass_Check(exc_type))) {
   36768           0 :             return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
   36769           0 :         } else if (likely(PyTuple_Check(exc_type))) {
   36770           0 :             return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
   36771             :         } else {
   36772           0 :         }
   36773             :     }
   36774           0 :     return PyErr_GivenExceptionMatches(err, exc_type);
   36775             : }
   36776             : static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
   36777             :     assert(PyExceptionClass_Check(exc_type1));
   36778             :     assert(PyExceptionClass_Check(exc_type2));
   36779             :     if (likely(err == exc_type1 || err == exc_type2)) return 1;
   36780             :     if (likely(PyExceptionClass_Check(err))) {
   36781             :         return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
   36782             :     }
   36783             :     return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
   36784             : }
   36785             : #endif
   36786             : 
   36787             : /* PySequenceMultiply */
   36788           0 : static PyObject* __Pyx_PySequence_Multiply_Generic(PyObject *seq, Py_ssize_t mul) {
   36789           0 :     PyObject *result, *pymul = PyInt_FromSsize_t(mul);
   36790           0 :     if (unlikely(!pymul))
   36791             :         return NULL;
   36792           0 :     result = PyNumber_Multiply(seq, pymul);
   36793           0 :     Py_DECREF(pymul);
   36794             :     return result;
   36795             : }
   36796           0 : static CYTHON_INLINE PyObject* __Pyx_PySequence_Multiply(PyObject *seq, Py_ssize_t mul) {
   36797             : #if CYTHON_USE_TYPE_SLOTS
   36798           0 :     PyTypeObject *type = Py_TYPE(seq);
   36799           0 :     if (likely(type->tp_as_sequence && type->tp_as_sequence->sq_repeat)) {
   36800           0 :         return type->tp_as_sequence->sq_repeat(seq, mul);
   36801             :     } else
   36802             : #endif
   36803             :     {
   36804           0 :         return __Pyx_PySequence_Multiply_Generic(seq, mul);
   36805             :     }
   36806             : }
   36807             : 
   36808             : /* SetItemInt */
   36809           0 : static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
   36810           0 :     int r;
   36811           0 :     if (unlikely(!j)) return -1;
   36812           0 :     r = PyObject_SetItem(o, j, v);
   36813           0 :     Py_DECREF(j);
   36814             :     return r;
   36815             : }
   36816          94 : static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list,
   36817             :                                                CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) {
   36818             : #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
   36819          94 :     if (is_list || PyList_CheckExact(o)) {
   36820          94 :         Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o));
   36821          94 :         if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o)))) {
   36822          94 :             PyObject* old = PyList_GET_ITEM(o, n);
   36823          94 :             Py_INCREF(v);
   36824          94 :             PyList_SET_ITEM(o, n, v);
   36825          94 :             Py_DECREF(old);
   36826          94 :             return 1;
   36827             :         }
   36828             :     } else {
   36829           0 :         PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping;
   36830           0 :         PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence;
   36831           0 :         if (mm && mm->mp_ass_subscript) {
   36832           0 :             int r;
   36833           0 :             PyObject *key = PyInt_FromSsize_t(i);
   36834           0 :             if (unlikely(!key)) return -1;
   36835           0 :             r = mm->mp_ass_subscript(o, key, v);
   36836           0 :             Py_DECREF(key);
   36837           0 :             return r;
   36838             :         }
   36839           0 :         if (likely(sm && sm->sq_ass_item)) {
   36840           0 :             if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) {
   36841           0 :                 Py_ssize_t l = sm->sq_length(o);
   36842           0 :                 if (likely(l >= 0)) {
   36843           0 :                     i += l;
   36844             :                 } else {
   36845           0 :                     if (!PyErr_ExceptionMatches(PyExc_OverflowError))
   36846             :                         return -1;
   36847           0 :                     PyErr_Clear();
   36848             :                 }
   36849             :             }
   36850           0 :             return sm->sq_ass_item(o, i, v);
   36851             :         }
   36852             :     }
   36853             : #else
   36854             :     if (is_list || !PyMapping_Check(o))
   36855             :     {
   36856             :         return PySequence_SetItem(o, i, v);
   36857             :     }
   36858             : #endif
   36859           0 :     return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v);
   36860             : }
   36861             : 
   36862             : /* RaiseUnboundLocalError */
   36863           0 : static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) {
   36864           0 :     PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname);
   36865             : }
   36866             : 
   36867             : /* DivInt[long] */
   36868           0 : static CYTHON_INLINE long __Pyx_div_long(long a, long b) {
   36869           0 :     long q = a / b;
   36870           0 :     long r = a - q*b;
   36871           0 :     q -= ((r != 0) & ((r ^ b) < 0));
   36872           0 :     return q;
   36873             : }
   36874             : 
   36875             : /* ImportFrom */
   36876           0 : static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
   36877           0 :     PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
   36878           0 :     if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
   36879           0 :         const char* module_name_str = 0;
   36880           0 :         PyObject* module_name = 0;
   36881           0 :         PyObject* module_dot = 0;
   36882           0 :         PyObject* full_name = 0;
   36883           0 :         PyErr_Clear();
   36884           0 :         module_name_str = PyModule_GetName(module);
   36885           0 :         if (unlikely(!module_name_str)) { goto modbad; }
   36886           0 :         module_name = PyUnicode_FromString(module_name_str);
   36887           0 :         if (unlikely(!module_name)) { goto modbad; }
   36888           0 :         module_dot = PyUnicode_Concat(module_name, __pyx_kp_u__2);
   36889           0 :         if (unlikely(!module_dot)) { goto modbad; }
   36890           0 :         full_name = PyUnicode_Concat(module_dot, name);
   36891           0 :         if (unlikely(!full_name)) { goto modbad; }
   36892             :         #if PY_VERSION_HEX < 0x030700A1 || (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM  < 0x07030400)
   36893             :         {
   36894             :             PyObject *modules = PyImport_GetModuleDict();
   36895             :             if (unlikely(!modules))
   36896             :                 goto modbad;
   36897             :             value = PyObject_GetItem(modules, full_name);
   36898             :         }
   36899             :         #else
   36900           0 :         value = PyImport_GetModule(full_name);
   36901             :         #endif
   36902           0 :       modbad:
   36903           0 :         Py_XDECREF(full_name);
   36904           0 :         Py_XDECREF(module_dot);
   36905           0 :         Py_XDECREF(module_name);
   36906             :     }
   36907           0 :     if (unlikely(!value)) {
   36908           0 :         PyErr_Format(PyExc_ImportError,
   36909             :         #if PY_MAJOR_VERSION < 3
   36910             :             "cannot import name %.230s", PyString_AS_STRING(name));
   36911             :         #else
   36912             :             "cannot import name %S", name);
   36913             :         #endif
   36914             :     }
   36915           0 :     return value;
   36916             : }
   36917             : 
   36918             : /* HasAttr */
   36919           0 : static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
   36920           0 :     PyObject *r;
   36921           0 :     if (unlikely(!__Pyx_PyBaseString_Check(n))) {
   36922           0 :         PyErr_SetString(PyExc_TypeError,
   36923             :                         "hasattr(): attribute name must be string");
   36924           0 :         return -1;
   36925             :     }
   36926           0 :     r = __Pyx_GetAttr(o, n);
   36927           0 :     if (!r) {
   36928           0 :         PyErr_Clear();
   36929           0 :         return 0;
   36930             :     } else {
   36931           0 :         Py_DECREF(r);
   36932           0 :         return 1;
   36933             :     }
   36934             : }
   36935             : 
   36936             : /* PyObjectSetAttrStr */
   36937             : #if CYTHON_USE_TYPE_SLOTS
   36938        1208 : static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
   36939        1208 :     PyTypeObject* tp = Py_TYPE(obj);
   36940        1208 :     if (likely(tp->tp_setattro))
   36941        1208 :         return tp->tp_setattro(obj, attr_name, value);
   36942             : #if PY_MAJOR_VERSION < 3
   36943             :     if (likely(tp->tp_setattr))
   36944             :         return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value);
   36945             : #endif
   36946           0 :     return PyObject_SetAttr(obj, attr_name, value);
   36947             : }
   36948             : #endif
   36949             : 
   36950             : /* SliceObject */
   36951         204 : static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj,
   36952             :         Py_ssize_t cstart, Py_ssize_t cstop,
   36953             :         PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
   36954             :         int has_cstart, int has_cstop, int wraparound) {
   36955         204 :     __Pyx_TypeName obj_type_name;
   36956             : #if CYTHON_USE_TYPE_SLOTS
   36957         204 :     PyMappingMethods* mp;
   36958             : #if PY_MAJOR_VERSION < 3
   36959             :     PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence;
   36960             :     if (likely(ms && ms->sq_slice)) {
   36961             :         if (!has_cstart) {
   36962             :             if (_py_start && (*_py_start != Py_None)) {
   36963             :                 cstart = __Pyx_PyIndex_AsSsize_t(*_py_start);
   36964             :                 if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
   36965             :             } else
   36966             :                 cstart = 0;
   36967             :         }
   36968             :         if (!has_cstop) {
   36969             :             if (_py_stop && (*_py_stop != Py_None)) {
   36970             :                 cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop);
   36971             :                 if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
   36972             :             } else
   36973             :                 cstop = PY_SSIZE_T_MAX;
   36974             :         }
   36975             :         if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) {
   36976             :             Py_ssize_t l = ms->sq_length(obj);
   36977             :             if (likely(l >= 0)) {
   36978             :                 if (cstop < 0) {
   36979             :                     cstop += l;
   36980             :                     if (cstop < 0) cstop = 0;
   36981             :                 }
   36982             :                 if (cstart < 0) {
   36983             :                     cstart += l;
   36984             :                     if (cstart < 0) cstart = 0;
   36985             :                 }
   36986             :             } else {
   36987             :                 if (!PyErr_ExceptionMatches(PyExc_OverflowError))
   36988             :                     goto bad;
   36989             :                 PyErr_Clear();
   36990             :             }
   36991             :         }
   36992             :         return ms->sq_slice(obj, cstart, cstop);
   36993             :     }
   36994             : #else
   36995         204 :     CYTHON_UNUSED_VAR(wraparound);
   36996             : #endif
   36997         204 :     mp = Py_TYPE(obj)->tp_as_mapping;
   36998         204 :     if (likely(mp && mp->mp_subscript))
   36999             : #else
   37000             :     CYTHON_UNUSED_VAR(wraparound);
   37001             : #endif
   37002             :     {
   37003         204 :         PyObject* result;
   37004         204 :         PyObject *py_slice, *py_start, *py_stop;
   37005         204 :         if (_py_slice) {
   37006         204 :             py_slice = *_py_slice;
   37007             :         } else {
   37008           0 :             PyObject* owned_start = NULL;
   37009           0 :             PyObject* owned_stop = NULL;
   37010           0 :             if (_py_start) {
   37011           0 :                 py_start = *_py_start;
   37012             :             } else {
   37013           0 :                 if (has_cstart) {
   37014           0 :                     owned_start = py_start = PyInt_FromSsize_t(cstart);
   37015           0 :                     if (unlikely(!py_start)) goto bad;
   37016             :                 } else
   37017             :                     py_start = Py_None;
   37018             :             }
   37019           0 :             if (_py_stop) {
   37020           0 :                 py_stop = *_py_stop;
   37021             :             } else {
   37022           0 :                 if (has_cstop) {
   37023           0 :                     owned_stop = py_stop = PyInt_FromSsize_t(cstop);
   37024           0 :                     if (unlikely(!py_stop)) {
   37025           0 :                         Py_XDECREF(owned_start);
   37026           0 :                         goto bad;
   37027             :                     }
   37028             :                 } else
   37029             :                     py_stop = Py_None;
   37030             :             }
   37031           0 :             py_slice = PySlice_New(py_start, py_stop, Py_None);
   37032           0 :             Py_XDECREF(owned_start);
   37033           0 :             Py_XDECREF(owned_stop);
   37034           0 :             if (unlikely(!py_slice)) goto bad;
   37035             :         }
   37036             : #if CYTHON_USE_TYPE_SLOTS
   37037         204 :         result = mp->mp_subscript(obj, py_slice);
   37038             : #else
   37039             :         result = PyObject_GetItem(obj, py_slice);
   37040             : #endif
   37041         204 :         if (!_py_slice) {
   37042           0 :             Py_DECREF(py_slice);
   37043             :         }
   37044         204 :         return result;
   37045             :     }
   37046           0 :     obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
   37047           0 :     PyErr_Format(PyExc_TypeError,
   37048             :         "'" __Pyx_FMT_TYPENAME "' object is unsliceable", obj_type_name);
   37049             :     __Pyx_DECREF_TypeName(obj_type_name);
   37050             : bad:
   37051             :     return NULL;
   37052             : }
   37053             : 
   37054             : /* PyIntCompare */
   37055        1299 : static CYTHON_INLINE int __Pyx_PyInt_BoolEqObjC(PyObject *op1, PyObject *op2, long intval, long inplace) {
   37056        1299 :     CYTHON_MAYBE_UNUSED_VAR(intval);
   37057        1299 :     CYTHON_UNUSED_VAR(inplace);
   37058        1299 :     if (op1 == op2) {
   37059             :         return 1;
   37060             :     }
   37061             :     #if PY_MAJOR_VERSION < 3
   37062             :     if (likely(PyInt_CheckExact(op1))) {
   37063             :         const long b = intval;
   37064             :         long a = PyInt_AS_LONG(op1);
   37065             :         return (a == b);
   37066             :     }
   37067             :     #endif
   37068             :     #if CYTHON_USE_PYLONG_INTERNALS
   37069         940 :     if (likely(PyLong_CheckExact(op1))) {
   37070         940 :         int unequal;
   37071         940 :         unsigned long uintval;
   37072         940 :         Py_ssize_t size = __Pyx_PyLong_DigitCount(op1);
   37073         940 :         const digit* digits = __Pyx_PyLong_Digits(op1);
   37074         940 :         if (intval == 0) {
   37075           0 :             return (__Pyx_PyLong_IsZero(op1) == 1);
   37076         940 :         } else if (intval < 0) {
   37077           0 :             if (__Pyx_PyLong_IsNonNeg(op1))
   37078             :                 return 0;
   37079           0 :             intval = -intval;
   37080             :         } else {
   37081         940 :             if (__Pyx_PyLong_IsNeg(op1))
   37082             :                 return 0;
   37083             :         }
   37084         940 :         uintval = (unsigned long) intval;
   37085             : #if PyLong_SHIFT * 4 < SIZEOF_LONG*8
   37086             :         if (uintval >> (PyLong_SHIFT * 4)) {
   37087             :             unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
   37088             :                  | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
   37089             :         } else
   37090             : #endif
   37091             : #if PyLong_SHIFT * 3 < SIZEOF_LONG*8
   37092             :         if (uintval >> (PyLong_SHIFT * 3)) {
   37093             :             unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
   37094             :                  | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
   37095             :         } else
   37096             : #endif
   37097             : #if PyLong_SHIFT * 2 < SIZEOF_LONG*8
   37098         940 :         if (uintval >> (PyLong_SHIFT * 2)) {
   37099           0 :             unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
   37100           0 :                  | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
   37101             :         } else
   37102             : #endif
   37103             : #if PyLong_SHIFT * 1 < SIZEOF_LONG*8
   37104         940 :         if (uintval >> (PyLong_SHIFT * 1)) {
   37105           0 :             unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
   37106           0 :                  | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
   37107             :         } else
   37108             : #endif
   37109         940 :             unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK));
   37110         940 :         return (unequal == 0);
   37111             :     }
   37112             :     #endif
   37113           0 :     if (PyFloat_CheckExact(op1)) {
   37114           0 :         const long b = intval;
   37115             : #if CYTHON_COMPILING_IN_LIMITED_API
   37116             :         double a = __pyx_PyFloat_AsDouble(op1);
   37117             : #else
   37118           0 :         double a = PyFloat_AS_DOUBLE(op1);
   37119             : #endif
   37120           0 :         return ((double)a == (double)b);
   37121             :     }
   37122           0 :     return __Pyx_PyObject_IsTrueAndDecref(
   37123             :         PyObject_RichCompare(op1, op2, Py_EQ));
   37124             : }
   37125             : 
   37126             : /* pybytes_as_double */
   37127           0 : static double __Pyx_SlowPyString_AsDouble(PyObject *obj) {
   37128           0 :     PyObject *float_value;
   37129             : #if PY_MAJOR_VERSION >= 3
   37130           0 :     float_value = PyFloat_FromString(obj);
   37131             : #else
   37132             :     float_value = PyFloat_FromString(obj, 0);
   37133             : #endif
   37134           0 :     if (likely(float_value)) {
   37135             : #if CYTHON_ASSUME_SAFE_MACROS
   37136           0 :         double value = PyFloat_AS_DOUBLE(float_value);
   37137             : #else
   37138             :         double value = PyFloat_AsDouble(float_value);
   37139             : #endif
   37140           0 :         Py_DECREF(float_value);
   37141           0 :         return value;
   37142             :     }
   37143             :     return (double)-1;
   37144             : }
   37145           0 : static const char* __Pyx__PyBytes_AsDouble_Copy(const char* start, char* buffer, Py_ssize_t length) {
   37146           0 :     int last_was_punctuation = 1;
   37147           0 :     Py_ssize_t i;
   37148           0 :     for (i=0; i < length; i++) {
   37149           0 :         char chr = start[i];
   37150           0 :         int is_punctuation = (chr == '_') | (chr == '.') | (chr == 'e') | (chr == 'E');
   37151           0 :         *buffer = chr;
   37152           0 :         buffer += (chr != '_');
   37153           0 :         if (unlikely(last_was_punctuation & is_punctuation)) goto parse_failure;
   37154           0 :         last_was_punctuation = is_punctuation;
   37155             :     }
   37156           0 :     if (unlikely(last_was_punctuation)) goto parse_failure;
   37157           0 :     *buffer = '\0';
   37158           0 :     return buffer;
   37159             : parse_failure:
   37160             :     return NULL;
   37161             : }
   37162           0 : static double __Pyx__PyBytes_AsDouble_inf_nan(const char* start, Py_ssize_t length) {
   37163           0 :     int matches = 1;
   37164           0 :     char sign = start[0];
   37165           0 :     int is_signed = (sign == '+') | (sign == '-');
   37166           0 :     start += is_signed;
   37167           0 :     length -= is_signed;
   37168           0 :     switch (start[0]) {
   37169             :         #ifdef Py_NAN
   37170           0 :         case 'n':
   37171             :         case 'N':
   37172           0 :             if (unlikely(length != 3)) goto parse_failure;
   37173           0 :             matches &= (start[1] == 'a' || start[1] == 'A');
   37174           0 :             matches &= (start[2] == 'n' || start[2] == 'N');
   37175           0 :             if (unlikely(!matches)) goto parse_failure;
   37176           0 :             return (sign == '-') ? -Py_NAN : Py_NAN;
   37177             :         #endif
   37178           0 :         case 'i':
   37179             :         case 'I':
   37180           0 :             if (unlikely(length < 3)) goto parse_failure;
   37181           0 :             matches &= (start[1] == 'n' || start[1] == 'N');
   37182           0 :             matches &= (start[2] == 'f' || start[2] == 'F');
   37183           0 :             if (likely(length == 3 && matches))
   37184           0 :                 return (sign == '-') ? -Py_HUGE_VAL : Py_HUGE_VAL;
   37185           0 :             if (unlikely(length != 8)) goto parse_failure;
   37186           0 :             matches &= (start[3] == 'i' || start[3] == 'I');
   37187           0 :             matches &= (start[4] == 'n' || start[4] == 'N');
   37188           0 :             matches &= (start[5] == 'i' || start[5] == 'I');
   37189           0 :             matches &= (start[6] == 't' || start[6] == 'T');
   37190           0 :             matches &= (start[7] == 'y' || start[7] == 'Y');
   37191           0 :             if (unlikely(!matches)) goto parse_failure;
   37192           0 :             return (sign == '-') ? -Py_HUGE_VAL : Py_HUGE_VAL;
   37193             :         case '.': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9':
   37194             :             break;
   37195           0 :         default:
   37196           0 :             goto parse_failure;
   37197             :     }
   37198             :     return 0.0;
   37199           0 : parse_failure:
   37200             :     return -1.0;
   37201             : }
   37202           0 : static CYTHON_INLINE int __Pyx__PyBytes_AsDouble_IsSpace(char ch) {
   37203           0 :     return (ch == 0x20) | !((ch < 0x9) | (ch > 0xd));
   37204             : }
   37205           0 : CYTHON_UNUSED static double __Pyx__PyBytes_AsDouble(PyObject *obj, const char* start, Py_ssize_t length) {
   37206           0 :     double value;
   37207           0 :     Py_ssize_t i, digits;
   37208           0 :     const char *last = start + length;
   37209           0 :     char *end;
   37210           0 :     while (__Pyx__PyBytes_AsDouble_IsSpace(*start))
   37211           0 :         start++;
   37212           0 :     while (start < last - 1 && __Pyx__PyBytes_AsDouble_IsSpace(last[-1]))
   37213             :         last--;
   37214           0 :     length = last - start;
   37215           0 :     if (unlikely(length <= 0)) goto fallback;
   37216           0 :     value = __Pyx__PyBytes_AsDouble_inf_nan(start, length);
   37217           0 :     if (unlikely(value == -1.0)) goto fallback;
   37218           0 :     if (value != 0.0) return value;
   37219             :     digits = 0;
   37220           0 :     for (i=0; i < length; digits += start[i++] != '_');
   37221           0 :     if (likely(digits == length)) {
   37222           0 :         value = PyOS_string_to_double(start, &end, NULL);
   37223           0 :     } else if (digits < 40) {
   37224           0 :         char number[40];
   37225           0 :         last = __Pyx__PyBytes_AsDouble_Copy(start, number, length);
   37226           0 :         if (unlikely(!last)) goto fallback;
   37227           0 :         value = PyOS_string_to_double(number, &end, NULL);
   37228             :     } else {
   37229           0 :         char *number = (char*) PyMem_Malloc((digits + 1) * sizeof(char));
   37230           0 :         if (unlikely(!number)) goto fallback;
   37231           0 :         last = __Pyx__PyBytes_AsDouble_Copy(start, number, length);
   37232           0 :         if (unlikely(!last)) {
   37233           0 :             PyMem_Free(number);
   37234           0 :             goto fallback;
   37235             :         }
   37236           0 :         value = PyOS_string_to_double(number, &end, NULL);
   37237           0 :         PyMem_Free(number);
   37238             :     }
   37239           0 :     if (likely(end == last) || (value == (double)-1 && PyErr_Occurred())) {
   37240           0 :         return value;
   37241             :     }
   37242           0 : fallback:
   37243           0 :     return __Pyx_SlowPyString_AsDouble(obj);
   37244             : }
   37245             : 
   37246             : /* pynumber_float */
   37247           1 : static CYTHON_INLINE PyObject* __Pyx__PyNumber_Float(PyObject* obj) {
   37248           1 :     double val;
   37249           1 :     if (PyLong_CheckExact(obj)) {
   37250             : #if CYTHON_USE_PYLONG_INTERNALS
   37251           1 :         if (likely(__Pyx_PyLong_IsCompact(obj))) {
   37252           1 :             val = (double) __Pyx_PyLong_CompactValue(obj);
   37253           1 :             goto no_error;
   37254             :         }
   37255             : #endif
   37256           0 :         val = PyLong_AsDouble(obj);
   37257           0 :     } else if (PyUnicode_CheckExact(obj)) {
   37258           0 :         val = __Pyx_PyUnicode_AsDouble(obj);
   37259           0 :     } else if (PyBytes_CheckExact(obj)) {
   37260           0 :         val = __Pyx_PyBytes_AsDouble(obj);
   37261           0 :     } else if (PyByteArray_CheckExact(obj)) {
   37262           0 :         val = __Pyx_PyByteArray_AsDouble(obj);
   37263             :     } else {
   37264           0 :         return PyNumber_Float(obj);
   37265             :     }
   37266           0 :     if (unlikely(val == -1 && PyErr_Occurred())) {
   37267             :         return NULL;
   37268             :     }
   37269             : #if CYTHON_USE_PYLONG_INTERNALS
   37270           0 : no_error:
   37271             : #endif
   37272           1 :     return PyFloat_FromDouble(val);
   37273             : }
   37274             : 
   37275             : /* IterFinish */
   37276           0 : static CYTHON_INLINE int __Pyx_IterFinish(void) {
   37277           0 :     PyObject* exc_type;
   37278           0 :     __Pyx_PyThreadState_declare
   37279           0 :     __Pyx_PyThreadState_assign
   37280           0 :     exc_type = __Pyx_PyErr_CurrentExceptionType();
   37281           0 :     if (unlikely(exc_type)) {
   37282           0 :         if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))
   37283             :             return -1;
   37284           0 :         __Pyx_PyErr_Clear();
   37285           0 :         return 0;
   37286             :     }
   37287             :     return 0;
   37288             : }
   37289             : 
   37290             : /* UnpackItemEndCheck */
   37291           0 : static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
   37292           0 :     if (unlikely(retval)) {
   37293           0 :         Py_DECREF(retval);
   37294           0 :         __Pyx_RaiseTooManyValuesError(expected);
   37295           0 :         return -1;
   37296             :     }
   37297           0 :     return __Pyx_IterFinish();
   37298             : }
   37299             : 
   37300             : /* PyIntCompare */
   37301         111 : static CYTHON_INLINE int __Pyx_PyInt_BoolNeObjC(PyObject *op1, PyObject *op2, long intval, long inplace) {
   37302         111 :     CYTHON_MAYBE_UNUSED_VAR(intval);
   37303         111 :     CYTHON_UNUSED_VAR(inplace);
   37304         111 :     if (op1 == op2) {
   37305             :         return 0;
   37306             :     }
   37307             :     #if PY_MAJOR_VERSION < 3
   37308             :     if (likely(PyInt_CheckExact(op1))) {
   37309             :         const long b = intval;
   37310             :         long a = PyInt_AS_LONG(op1);
   37311             :         return (a != b);
   37312             :     }
   37313             :     #endif
   37314             :     #if CYTHON_USE_PYLONG_INTERNALS
   37315           0 :     if (likely(PyLong_CheckExact(op1))) {
   37316           0 :         int unequal;
   37317           0 :         unsigned long uintval;
   37318           0 :         Py_ssize_t size = __Pyx_PyLong_DigitCount(op1);
   37319           0 :         const digit* digits = __Pyx_PyLong_Digits(op1);
   37320           0 :         if (intval == 0) {
   37321           0 :             return (__Pyx_PyLong_IsZero(op1) != 1);
   37322           0 :         } else if (intval < 0) {
   37323           0 :             if (__Pyx_PyLong_IsNonNeg(op1))
   37324             :                 return 1;
   37325           0 :             intval = -intval;
   37326             :         } else {
   37327           0 :             if (__Pyx_PyLong_IsNeg(op1))
   37328             :                 return 1;
   37329             :         }
   37330           0 :         uintval = (unsigned long) intval;
   37331             : #if PyLong_SHIFT * 4 < SIZEOF_LONG*8
   37332             :         if (uintval >> (PyLong_SHIFT * 4)) {
   37333             :             unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
   37334             :                  | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
   37335             :         } else
   37336             : #endif
   37337             : #if PyLong_SHIFT * 3 < SIZEOF_LONG*8
   37338             :         if (uintval >> (PyLong_SHIFT * 3)) {
   37339             :             unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
   37340             :                  | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
   37341             :         } else
   37342             : #endif
   37343             : #if PyLong_SHIFT * 2 < SIZEOF_LONG*8
   37344           0 :         if (uintval >> (PyLong_SHIFT * 2)) {
   37345           0 :             unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
   37346           0 :                  | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
   37347             :         } else
   37348             : #endif
   37349             : #if PyLong_SHIFT * 1 < SIZEOF_LONG*8
   37350           0 :         if (uintval >> (PyLong_SHIFT * 1)) {
   37351           0 :             unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
   37352           0 :                  | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
   37353             :         } else
   37354             : #endif
   37355           0 :             unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK));
   37356           0 :         return (unequal != 0);
   37357             :     }
   37358             :     #endif
   37359           0 :     if (PyFloat_CheckExact(op1)) {
   37360           0 :         const long b = intval;
   37361             : #if CYTHON_COMPILING_IN_LIMITED_API
   37362             :         double a = __pyx_PyFloat_AsDouble(op1);
   37363             : #else
   37364           0 :         double a = PyFloat_AS_DOUBLE(op1);
   37365             : #endif
   37366           0 :         return ((double)a != (double)b);
   37367             :     }
   37368           0 :     return __Pyx_PyObject_IsTrueAndDecref(
   37369             :         PyObject_RichCompare(op1, op2, Py_NE));
   37370             : }
   37371             : 
   37372             : /* DictGetItem */
   37373             : #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
   37374          94 : static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
   37375          94 :     PyObject *value;
   37376          94 :     value = PyDict_GetItemWithError(d, key);
   37377          94 :     if (unlikely(!value)) {
   37378           0 :         if (!PyErr_Occurred()) {
   37379           0 :             if (unlikely(PyTuple_Check(key))) {
   37380           0 :                 PyObject* args = PyTuple_Pack(1, key);
   37381           0 :                 if (likely(args)) {
   37382           0 :                     PyErr_SetObject(PyExc_KeyError, args);
   37383           0 :                     Py_DECREF(args);
   37384             :                 }
   37385             :             } else {
   37386           0 :                 PyErr_SetObject(PyExc_KeyError, key);
   37387             :             }
   37388             :         }
   37389           0 :         return NULL;
   37390             :     }
   37391          94 :     Py_INCREF(value);
   37392             :     return value;
   37393             : }
   37394             : #endif
   37395             : 
   37396             : /* PyObjectCallNoArg */
   37397             : static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
   37398             :     PyObject *arg[2] = {NULL, NULL};
   37399             :     return __Pyx_PyObject_FastCall(func, arg + 1, 0 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
   37400             : }
   37401             : 
   37402             : /* PyObjectGetMethod */
   37403             : static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) {
   37404             :     PyObject *attr;
   37405             : #if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP
   37406             :     __Pyx_TypeName type_name;
   37407             :     PyTypeObject *tp = Py_TYPE(obj);
   37408             :     PyObject *descr;
   37409             :     descrgetfunc f = NULL;
   37410             :     PyObject **dictptr, *dict;
   37411             :     int meth_found = 0;
   37412             :     assert (*method == NULL);
   37413             :     if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) {
   37414             :         attr = __Pyx_PyObject_GetAttrStr(obj, name);
   37415             :         goto try_unpack;
   37416             :     }
   37417             :     if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) {
   37418             :         return 0;
   37419             :     }
   37420             :     descr = _PyType_Lookup(tp, name);
   37421             :     if (likely(descr != NULL)) {
   37422             :         Py_INCREF(descr);
   37423             : #if defined(Py_TPFLAGS_METHOD_DESCRIPTOR) && Py_TPFLAGS_METHOD_DESCRIPTOR
   37424             :         if (__Pyx_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR))
   37425             : #elif PY_MAJOR_VERSION >= 3
   37426             :         #ifdef __Pyx_CyFunction_USED
   37427             :         if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr)))
   37428             :         #else
   37429             :         if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type)))
   37430             :         #endif
   37431             : #else
   37432             :         #ifdef __Pyx_CyFunction_USED
   37433             :         if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr)))
   37434             :         #else
   37435             :         if (likely(PyFunction_Check(descr)))
   37436             :         #endif
   37437             : #endif
   37438             :         {
   37439             :             meth_found = 1;
   37440             :         } else {
   37441             :             f = Py_TYPE(descr)->tp_descr_get;
   37442             :             if (f != NULL && PyDescr_IsData(descr)) {
   37443             :                 attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
   37444             :                 Py_DECREF(descr);
   37445             :                 goto try_unpack;
   37446             :             }
   37447             :         }
   37448             :     }
   37449             :     dictptr = _PyObject_GetDictPtr(obj);
   37450             :     if (dictptr != NULL && (dict = *dictptr) != NULL) {
   37451             :         Py_INCREF(dict);
   37452             :         attr = __Pyx_PyDict_GetItemStr(dict, name);
   37453             :         if (attr != NULL) {
   37454             :             Py_INCREF(attr);
   37455             :             Py_DECREF(dict);
   37456             :             Py_XDECREF(descr);
   37457             :             goto try_unpack;
   37458             :         }
   37459             :         Py_DECREF(dict);
   37460             :     }
   37461             :     if (meth_found) {
   37462             :         *method = descr;
   37463             :         return 1;
   37464             :     }
   37465             :     if (f != NULL) {
   37466             :         attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
   37467             :         Py_DECREF(descr);
   37468             :         goto try_unpack;
   37469             :     }
   37470             :     if (likely(descr != NULL)) {
   37471             :         *method = descr;
   37472             :         return 0;
   37473             :     }
   37474             :     type_name = __Pyx_PyType_GetName(tp);
   37475             :     PyErr_Format(PyExc_AttributeError,
   37476             : #if PY_MAJOR_VERSION >= 3
   37477             :                  "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'",
   37478             :                  type_name, name);
   37479             : #else
   37480             :                  "'" __Pyx_FMT_TYPENAME "' object has no attribute '%.400s'",
   37481             :                  type_name, PyString_AS_STRING(name));
   37482             : #endif
   37483             :     __Pyx_DECREF_TypeName(type_name);
   37484             :     return 0;
   37485             : #else
   37486             :     attr = __Pyx_PyObject_GetAttrStr(obj, name);
   37487             :     goto try_unpack;
   37488             : #endif
   37489             : try_unpack:
   37490             : #if CYTHON_UNPACK_METHODS
   37491             :     if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) {
   37492             :         PyObject *function = PyMethod_GET_FUNCTION(attr);
   37493             :         Py_INCREF(function);
   37494             :         Py_DECREF(attr);
   37495             :         *method = function;
   37496             :         return 1;
   37497             :     }
   37498             : #endif
   37499             :     *method = attr;
   37500             :     return 0;
   37501             : }
   37502             : 
   37503             : /* PyObjectCallMethod0 */
   37504             : static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) {
   37505             :     PyObject *method = NULL, *result = NULL;
   37506             :     int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
   37507             :     if (likely(is_method)) {
   37508             :         result = __Pyx_PyObject_CallOneArg(method, obj);
   37509             :         Py_DECREF(method);
   37510             :         return result;
   37511             :     }
   37512             :     if (unlikely(!method)) goto bad;
   37513             :     result = __Pyx_PyObject_CallNoArg(method);
   37514             :     Py_DECREF(method);
   37515             : bad:
   37516             :     return result;
   37517             : }
   37518             : 
   37519             : /* UnpackTupleError */
   37520           0 : static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) {
   37521           0 :     if (t == Py_None) {
   37522           0 :       __Pyx_RaiseNoneNotIterableError();
   37523           0 :     } else if (PyTuple_GET_SIZE(t) < index) {
   37524           0 :       __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(t));
   37525             :     } else {
   37526           0 :       __Pyx_RaiseTooManyValuesError(index);
   37527             :     }
   37528           0 : }
   37529             : 
   37530             : /* UnpackTuple2 */
   37531           0 : static CYTHON_INLINE int __Pyx_unpack_tuple2_exact(
   37532             :         PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, int decref_tuple) {
   37533           0 :     PyObject *value1 = NULL, *value2 = NULL;
   37534             : #if CYTHON_COMPILING_IN_PYPY
   37535             :     value1 = PySequence_ITEM(tuple, 0);  if (unlikely(!value1)) goto bad;
   37536             :     value2 = PySequence_ITEM(tuple, 1);  if (unlikely(!value2)) goto bad;
   37537             : #else
   37538           0 :     value1 = PyTuple_GET_ITEM(tuple, 0);  Py_INCREF(value1);
   37539           0 :     value2 = PyTuple_GET_ITEM(tuple, 1);  Py_INCREF(value2);
   37540             : #endif
   37541           0 :     if (decref_tuple) {
   37542           0 :         Py_DECREF(tuple);
   37543             :     }
   37544           0 :     *pvalue1 = value1;
   37545           0 :     *pvalue2 = value2;
   37546           0 :     return 0;
   37547             : #if CYTHON_COMPILING_IN_PYPY
   37548             : bad:
   37549             :     Py_XDECREF(value1);
   37550             :     Py_XDECREF(value2);
   37551             :     if (decref_tuple) { Py_XDECREF(tuple); }
   37552             :     return -1;
   37553             : #endif
   37554             : }
   37555           0 : static int __Pyx_unpack_tuple2_generic(PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2,
   37556             :                                        int has_known_size, int decref_tuple) {
   37557           0 :     Py_ssize_t index;
   37558           0 :     PyObject *value1 = NULL, *value2 = NULL, *iter = NULL;
   37559           0 :     iternextfunc iternext;
   37560           0 :     iter = PyObject_GetIter(tuple);
   37561           0 :     if (unlikely(!iter)) goto bad;
   37562           0 :     if (decref_tuple) { Py_DECREF(tuple); tuple = NULL; }
   37563           0 :     iternext = __Pyx_PyObject_GetIterNextFunc(iter);
   37564           0 :     value1 = iternext(iter); if (unlikely(!value1)) { index = 0; goto unpacking_failed; }
   37565           0 :     value2 = iternext(iter); if (unlikely(!value2)) { index = 1; goto unpacking_failed; }
   37566           0 :     if (!has_known_size && unlikely(__Pyx_IternextUnpackEndCheck(iternext(iter), 2))) goto bad;
   37567           0 :     Py_DECREF(iter);
   37568           0 :     *pvalue1 = value1;
   37569           0 :     *pvalue2 = value2;
   37570           0 :     return 0;
   37571           0 : unpacking_failed:
   37572           0 :     if (!has_known_size && __Pyx_IterFinish() == 0)
   37573           0 :         __Pyx_RaiseNeedMoreValuesError(index);
   37574           0 : bad:
   37575           0 :     Py_XDECREF(iter);
   37576           0 :     Py_XDECREF(value1);
   37577           0 :     Py_XDECREF(value2);
   37578           0 :     if (decref_tuple) { Py_XDECREF(tuple); }
   37579             :     return -1;
   37580             : }
   37581             : 
   37582             : /* dict_iter */
   37583             : #if CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
   37584             : #include <string.h>
   37585             : #endif
   37586           2 : static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name,
   37587             :                                                    Py_ssize_t* p_orig_length, int* p_source_is_dict) {
   37588           2 :     is_dict = is_dict || likely(PyDict_CheckExact(iterable));
   37589           2 :     *p_source_is_dict = is_dict;
   37590           2 :     if (is_dict) {
   37591             : #if !CYTHON_COMPILING_IN_PYPY
   37592           2 :         *p_orig_length = PyDict_Size(iterable);
   37593           2 :         Py_INCREF(iterable);
   37594           2 :         return iterable;
   37595             : #elif PY_MAJOR_VERSION >= 3
   37596             :         static PyObject *py_items = NULL, *py_keys = NULL, *py_values = NULL;
   37597             :         PyObject **pp = NULL;
   37598             :         if (method_name) {
   37599             :             const char *name = PyUnicode_AsUTF8(method_name);
   37600             :             if (strcmp(name, "iteritems") == 0) pp = &py_items;
   37601             :             else if (strcmp(name, "iterkeys") == 0) pp = &py_keys;
   37602             :             else if (strcmp(name, "itervalues") == 0) pp = &py_values;
   37603             :             if (pp) {
   37604             :                 if (!*pp) {
   37605             :                     *pp = PyUnicode_FromString(name + 4);
   37606             :                     if (!*pp)
   37607             :                         return NULL;
   37608             :                 }
   37609             :                 method_name = *pp;
   37610             :             }
   37611             :         }
   37612             : #endif
   37613             :     }
   37614             :     *p_orig_length = 0;
   37615             :     if (method_name) {
   37616             :         PyObject* iter;
   37617             :         iterable = __Pyx_PyObject_CallMethod0(iterable, method_name);
   37618             :         if (!iterable)
   37619             :             return NULL;
   37620             : #if !CYTHON_COMPILING_IN_PYPY
   37621             :         if (PyTuple_CheckExact(iterable) || PyList_CheckExact(iterable))
   37622             :             return iterable;
   37623             : #endif
   37624             :         iter = PyObject_GetIter(iterable);
   37625             :         Py_DECREF(iterable);
   37626             :         return iter;
   37627             :     }
   37628             :     return PyObject_GetIter(iterable);
   37629             : }
   37630           6 : static CYTHON_INLINE int __Pyx_dict_iter_next(
   37631             :         PyObject* iter_obj, CYTHON_NCP_UNUSED Py_ssize_t orig_length, CYTHON_NCP_UNUSED Py_ssize_t* ppos,
   37632             :         PyObject** pkey, PyObject** pvalue, PyObject** pitem, int source_is_dict) {
   37633           6 :     PyObject* next_item;
   37634             : #if !CYTHON_COMPILING_IN_PYPY
   37635           6 :     if (source_is_dict) {
   37636           6 :         PyObject *key, *value;
   37637           6 :         if (unlikely(orig_length != PyDict_Size(iter_obj))) {
   37638           0 :             PyErr_SetString(PyExc_RuntimeError, "dictionary changed size during iteration");
   37639           0 :             return -1;
   37640             :         }
   37641           6 :         if (unlikely(!PyDict_Next(iter_obj, ppos, &key, &value))) {
   37642             :             return 0;
   37643             :         }
   37644           4 :         if (pitem) {
   37645           0 :             PyObject* tuple = PyTuple_New(2);
   37646           0 :             if (unlikely(!tuple)) {
   37647             :                 return -1;
   37648             :             }
   37649           0 :             Py_INCREF(key);
   37650           0 :             Py_INCREF(value);
   37651           0 :             PyTuple_SET_ITEM(tuple, 0, key);
   37652           0 :             PyTuple_SET_ITEM(tuple, 1, value);
   37653           0 :             *pitem = tuple;
   37654             :         } else {
   37655           4 :             if (pkey) {
   37656           4 :                 Py_INCREF(key);
   37657           4 :                 *pkey = key;
   37658             :             }
   37659           4 :             if (pvalue) {
   37660           0 :                 Py_INCREF(value);
   37661           0 :                 *pvalue = value;
   37662             :             }
   37663             :         }
   37664           4 :         return 1;
   37665           0 :     } else if (PyTuple_CheckExact(iter_obj)) {
   37666           0 :         Py_ssize_t pos = *ppos;
   37667           0 :         if (unlikely(pos >= PyTuple_GET_SIZE(iter_obj))) return 0;
   37668           0 :         *ppos = pos + 1;
   37669           0 :         next_item = PyTuple_GET_ITEM(iter_obj, pos);
   37670           0 :         Py_INCREF(next_item);
   37671           0 :     } else if (PyList_CheckExact(iter_obj)) {
   37672           0 :         Py_ssize_t pos = *ppos;
   37673           0 :         if (unlikely(pos >= PyList_GET_SIZE(iter_obj))) return 0;
   37674           0 :         *ppos = pos + 1;
   37675           0 :         next_item = PyList_GET_ITEM(iter_obj, pos);
   37676           0 :         Py_INCREF(next_item);
   37677             :     } else
   37678             : #endif
   37679             :     {
   37680           0 :         next_item = PyIter_Next(iter_obj);
   37681           0 :         if (unlikely(!next_item)) {
   37682           0 :             return __Pyx_IterFinish();
   37683             :         }
   37684             :     }
   37685           0 :     if (pitem) {
   37686           0 :         *pitem = next_item;
   37687           0 :     } else if (pkey && pvalue) {
   37688           0 :         if (__Pyx_unpack_tuple2(next_item, pkey, pvalue, source_is_dict, source_is_dict, 1))
   37689           0 :             return -1;
   37690           0 :     } else if (pkey) {
   37691           0 :         *pkey = next_item;
   37692             :     } else {
   37693           0 :         *pvalue = next_item;
   37694             :     }
   37695             :     return 1;
   37696             : }
   37697             : 
   37698             : /* UnpackUnboundCMethod */
   37699           0 : static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *args, PyObject *kwargs) {
   37700           0 :     PyObject *result;
   37701           0 :     PyObject *selfless_args = PyTuple_GetSlice(args, 1, PyTuple_Size(args));
   37702           0 :     if (unlikely(!selfless_args)) return NULL;
   37703           0 :     result = PyObject_Call(method, selfless_args, kwargs);
   37704           0 :     Py_DECREF(selfless_args);
   37705             :     return result;
   37706             : }
   37707             : static PyMethodDef __Pyx_UnboundCMethod_Def = {
   37708             :      "CythonUnboundCMethod",
   37709             :      __PYX_REINTERPRET_FUNCION(PyCFunction, __Pyx_SelflessCall),
   37710             :      METH_VARARGS | METH_KEYWORDS,
   37711             :      NULL
   37712             : };
   37713           0 : static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) {
   37714           0 :     PyObject *method;
   37715           0 :     method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name);
   37716           0 :     if (unlikely(!method))
   37717             :         return -1;
   37718           0 :     target->method = method;
   37719             : #if CYTHON_COMPILING_IN_CPYTHON
   37720             :     #if PY_MAJOR_VERSION >= 3
   37721           0 :     if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type)))
   37722             :     #else
   37723             :     if (likely(!__Pyx_CyOrPyCFunction_Check(method)))
   37724             :     #endif
   37725             :     {
   37726           0 :         PyMethodDescrObject *descr = (PyMethodDescrObject*) method;
   37727           0 :         target->func = descr->d_method->ml_meth;
   37728           0 :         target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS);
   37729             :     } else
   37730             : #endif
   37731             : #if CYTHON_COMPILING_IN_PYPY
   37732             : #else
   37733           0 :     if (PyCFunction_Check(method))
   37734             : #endif
   37735             :     {
   37736           0 :         PyObject *self;
   37737           0 :         int self_found;
   37738             : #if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
   37739             :         self = PyObject_GetAttrString(method, "__self__");
   37740             :         if (!self) {
   37741             :             PyErr_Clear();
   37742             :         }
   37743             : #else
   37744           0 :         self = PyCFunction_GET_SELF(method);
   37745             : #endif
   37746           0 :         self_found = (self && self != Py_None);
   37747             : #if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
   37748             :         Py_XDECREF(self);
   37749             : #endif
   37750           0 :         if (self_found) {
   37751           0 :             PyObject *unbound_method = PyCFunction_New(&__Pyx_UnboundCMethod_Def, method);
   37752           0 :             if (unlikely(!unbound_method)) return -1;
   37753           0 :             Py_DECREF(method);
   37754           0 :             target->method = unbound_method;
   37755             :         }
   37756             :     }
   37757             :     return 0;
   37758             : }
   37759             : 
   37760             : /* CallUnboundCMethod0 */
   37761           0 : static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) {
   37762           0 :     PyObject *args, *result = NULL;
   37763           0 :     if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
   37764             : #if CYTHON_ASSUME_SAFE_MACROS
   37765           0 :     args = PyTuple_New(1);
   37766           0 :     if (unlikely(!args)) goto bad;
   37767           0 :     Py_INCREF(self);
   37768           0 :     PyTuple_SET_ITEM(args, 0, self);
   37769             : #else
   37770             :     args = PyTuple_Pack(1, self);
   37771             :     if (unlikely(!args)) goto bad;
   37772             : #endif
   37773           0 :     result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
   37774           0 :     Py_DECREF(args);
   37775             : bad:
   37776             :     return result;
   37777             : }
   37778             : 
   37779             : /* py_dict_values */
   37780           0 : static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d) {
   37781           0 :     if (PY_MAJOR_VERSION >= 3)
   37782           0 :         return __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyDict_Type_values, d);
   37783             :     else
   37784             :         return PyDict_Values(d);
   37785             : }
   37786             : 
   37787             : /* CallUnboundCMethod1 */
   37788             : #if CYTHON_COMPILING_IN_CPYTHON
   37789             : static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg) {
   37790             :     if (likely(cfunc->func)) {
   37791             :         int flag = cfunc->flag;
   37792             :         if (flag == METH_O) {
   37793             :             return (*(cfunc->func))(self, arg);
   37794             :         } else if ((PY_VERSION_HEX >= 0x030600B1) && flag == METH_FASTCALL) {
   37795             :             #if PY_VERSION_HEX >= 0x030700A0
   37796             :                 return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, &arg, 1);
   37797             :             #else
   37798             :                 return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL);
   37799             :             #endif
   37800             :         } else if ((PY_VERSION_HEX >= 0x030700A0) && flag == (METH_FASTCALL | METH_KEYWORDS)) {
   37801             :             return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL);
   37802             :         }
   37803             :     }
   37804             :     return __Pyx__CallUnboundCMethod1(cfunc, self, arg);
   37805             : }
   37806             : #endif
   37807             : static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg){
   37808             :     PyObject *args, *result = NULL;
   37809             :     if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
   37810             : #if CYTHON_COMPILING_IN_CPYTHON
   37811             :     if (cfunc->func && (cfunc->flag & METH_VARARGS)) {
   37812             :         args = PyTuple_New(1);
   37813             :         if (unlikely(!args)) goto bad;
   37814             :         Py_INCREF(arg);
   37815             :         PyTuple_SET_ITEM(args, 0, arg);
   37816             :         if (cfunc->flag & METH_KEYWORDS)
   37817             :             result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL);
   37818             :         else
   37819             :             result = (*cfunc->func)(self, args);
   37820             :     } else {
   37821             :         args = PyTuple_New(2);
   37822             :         if (unlikely(!args)) goto bad;
   37823             :         Py_INCREF(self);
   37824             :         PyTuple_SET_ITEM(args, 0, self);
   37825             :         Py_INCREF(arg);
   37826             :         PyTuple_SET_ITEM(args, 1, arg);
   37827             :         result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
   37828             :     }
   37829             : #else
   37830             :     args = PyTuple_Pack(2, self, arg);
   37831             :     if (unlikely(!args)) goto bad;
   37832             :     result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
   37833             : #endif
   37834             : bad:
   37835             :     Py_XDECREF(args);
   37836             :     return result;
   37837             : }
   37838             : 
   37839             : /* CallUnboundCMethod2 */
   37840             : #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030600B1
   37841             : static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) {
   37842             :     if (likely(cfunc->func)) {
   37843             :         PyObject *args[2] = {arg1, arg2};
   37844             :         if (cfunc->flag == METH_FASTCALL) {
   37845             :             #if PY_VERSION_HEX >= 0x030700A0
   37846             :             return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, args, 2);
   37847             :             #else
   37848             :             return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, 2, NULL);
   37849             :             #endif
   37850             :         }
   37851             :         #if PY_VERSION_HEX >= 0x030700A0
   37852             :         if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS))
   37853             :             return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, 2, NULL);
   37854             :         #endif
   37855             :     }
   37856             :     return __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2);
   37857             : }
   37858             : #endif
   37859             : static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){
   37860             :     PyObject *args, *result = NULL;
   37861             :     if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
   37862             : #if CYTHON_COMPILING_IN_CPYTHON
   37863             :     if (cfunc->func && (cfunc->flag & METH_VARARGS)) {
   37864             :         args = PyTuple_New(2);
   37865             :         if (unlikely(!args)) goto bad;
   37866             :         Py_INCREF(arg1);
   37867             :         PyTuple_SET_ITEM(args, 0, arg1);
   37868             :         Py_INCREF(arg2);
   37869             :         PyTuple_SET_ITEM(args, 1, arg2);
   37870             :         if (cfunc->flag & METH_KEYWORDS)
   37871             :             result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL);
   37872             :         else
   37873             :             result = (*cfunc->func)(self, args);
   37874             :     } else {
   37875             :         args = PyTuple_New(3);
   37876             :         if (unlikely(!args)) goto bad;
   37877             :         Py_INCREF(self);
   37878             :         PyTuple_SET_ITEM(args, 0, self);
   37879             :         Py_INCREF(arg1);
   37880             :         PyTuple_SET_ITEM(args, 1, arg1);
   37881             :         Py_INCREF(arg2);
   37882             :         PyTuple_SET_ITEM(args, 2, arg2);
   37883             :         result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
   37884             :     }
   37885             : #else
   37886             :     args = PyTuple_Pack(3, self, arg1, arg2);
   37887             :     if (unlikely(!args)) goto bad;
   37888             :     result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
   37889             : #endif
   37890             : bad:
   37891             :     Py_XDECREF(args);
   37892             :     return result;
   37893             : }
   37894             : 
   37895             : /* dict_getitem_default */
   37896          94 : static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value) {
   37897          94 :     PyObject* value;
   37898             : #if PY_MAJOR_VERSION >= 3 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000)
   37899          94 :     value = PyDict_GetItemWithError(d, key);
   37900          94 :     if (unlikely(!value)) {
   37901           0 :         if (unlikely(PyErr_Occurred()))
   37902             :             return NULL;
   37903             :         value = default_value;
   37904             :     }
   37905          94 :     Py_INCREF(value);
   37906             :     if ((1));
   37907             : #else
   37908             :     if (PyString_CheckExact(key) || PyUnicode_CheckExact(key) || PyInt_CheckExact(key)) {
   37909             :         value = PyDict_GetItem(d, key);
   37910             :         if (unlikely(!value)) {
   37911             :             value = default_value;
   37912             :         }
   37913             :         Py_INCREF(value);
   37914             :     }
   37915             : #endif
   37916             :     else {
   37917             :         if (default_value == Py_None)
   37918             :             value = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyDict_Type_get, d, key);
   37919             :         else
   37920             :             value = __Pyx_CallUnboundCMethod2(&__pyx_umethod_PyDict_Type_get, d, key, default_value);
   37921             :     }
   37922             :     return value;
   37923             : }
   37924             : 
   37925             : /* PyObject_GenericGetAttrNoDict */
   37926             : #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
   37927             : static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
   37928             :     __Pyx_TypeName type_name = __Pyx_PyType_GetName(tp);
   37929             :     PyErr_Format(PyExc_AttributeError,
   37930             : #if PY_MAJOR_VERSION >= 3
   37931             :                  "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'",
   37932             :                  type_name, attr_name);
   37933             : #else
   37934             :                  "'" __Pyx_FMT_TYPENAME "' object has no attribute '%.400s'",
   37935             :                  type_name, PyString_AS_STRING(attr_name));
   37936             : #endif
   37937             :     __Pyx_DECREF_TypeName(type_name);
   37938             :     return NULL;
   37939             : }
   37940             : static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
   37941             :     PyObject *descr;
   37942             :     PyTypeObject *tp = Py_TYPE(obj);
   37943             :     if (unlikely(!PyString_Check(attr_name))) {
   37944             :         return PyObject_GenericGetAttr(obj, attr_name);
   37945             :     }
   37946             :     assert(!tp->tp_dictoffset);
   37947             :     descr = _PyType_Lookup(tp, attr_name);
   37948             :     if (unlikely(!descr)) {
   37949             :         return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
   37950             :     }
   37951             :     Py_INCREF(descr);
   37952             :     #if PY_MAJOR_VERSION < 3
   37953             :     if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
   37954             :     #endif
   37955             :     {
   37956             :         descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
   37957             :         if (unlikely(f)) {
   37958             :             PyObject *res = f(descr, obj, (PyObject *)tp);
   37959             :             Py_DECREF(descr);
   37960             :             return res;
   37961             :         }
   37962             :     }
   37963             :     return descr;
   37964             : }
   37965             : #endif
   37966             : 
   37967             : /* PyObject_GenericGetAttr */
   37968             : #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
   37969             : static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
   37970             :     if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
   37971             :         return PyObject_GenericGetAttr(obj, attr_name);
   37972             :     }
   37973             :     return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
   37974             : }
   37975             : #endif
   37976             : 
   37977             : /* FixUpExtensionType */
   37978             : #if CYTHON_USE_TYPE_SPECS
   37979             : static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) {
   37980             : #if PY_VERSION_HEX > 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
   37981             :     CYTHON_UNUSED_VAR(spec);
   37982             :     CYTHON_UNUSED_VAR(type);
   37983             : #else
   37984             :     const PyType_Slot *slot = spec->slots;
   37985             :     while (slot && slot->slot && slot->slot != Py_tp_members)
   37986             :         slot++;
   37987             :     if (slot && slot->slot == Py_tp_members) {
   37988             :         int changed = 0;
   37989             : #if !(PY_VERSION_HEX <= 0x030900b1 && CYTHON_COMPILING_IN_CPYTHON)
   37990             :         const
   37991             : #endif
   37992             :             PyMemberDef *memb = (PyMemberDef*) slot->pfunc;
   37993             :         while (memb && memb->name) {
   37994             :             if (memb->name[0] == '_' && memb->name[1] == '_') {
   37995             : #if PY_VERSION_HEX < 0x030900b1
   37996             :                 if (strcmp(memb->name, "__weaklistoffset__") == 0) {
   37997             :                     assert(memb->type == T_PYSSIZET);
   37998             :                     assert(memb->flags == READONLY);
   37999             :                     type->tp_weaklistoffset = memb->offset;
   38000             :                     changed = 1;
   38001             :                 }
   38002             :                 else if (strcmp(memb->name, "__dictoffset__") == 0) {
   38003             :                     assert(memb->type == T_PYSSIZET);
   38004             :                     assert(memb->flags == READONLY);
   38005             :                     type->tp_dictoffset = memb->offset;
   38006             :                     changed = 1;
   38007             :                 }
   38008             : #if CYTHON_METH_FASTCALL
   38009             :                 else if (strcmp(memb->name, "__vectorcalloffset__") == 0) {
   38010             :                     assert(memb->type == T_PYSSIZET);
   38011             :                     assert(memb->flags == READONLY);
   38012             : #if PY_VERSION_HEX >= 0x030800b4
   38013             :                     type->tp_vectorcall_offset = memb->offset;
   38014             : #else
   38015             :                     type->tp_print = (printfunc) memb->offset;
   38016             : #endif
   38017             :                     changed = 1;
   38018             :                 }
   38019             : #endif
   38020             : #else
   38021             :                 if ((0));
   38022             : #endif
   38023             : #if PY_VERSION_HEX <= 0x030900b1 && CYTHON_COMPILING_IN_CPYTHON
   38024             :                 else if (strcmp(memb->name, "__module__") == 0) {
   38025             :                     PyObject *descr;
   38026             :                     assert(memb->type == T_OBJECT);
   38027             :                     assert(memb->flags == 0 || memb->flags == READONLY);
   38028             :                     descr = PyDescr_NewMember(type, memb);
   38029             :                     if (unlikely(!descr))
   38030             :                         return -1;
   38031             :                     if (unlikely(PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr) < 0)) {
   38032             :                         Py_DECREF(descr);
   38033             :                         return -1;
   38034             :                     }
   38035             :                     Py_DECREF(descr);
   38036             :                     changed = 1;
   38037             :                 }
   38038             : #endif
   38039             :             }
   38040             :             memb++;
   38041             :         }
   38042             :         if (changed)
   38043             :             PyType_Modified(type);
   38044             :     }
   38045             : #endif
   38046             :     return 0;
   38047             : }
   38048             : #endif
   38049             : 
   38050             : /* ValidateBasesTuple */
   38051             : #if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS
   38052           0 : static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases) {
   38053           0 :     Py_ssize_t i, n;
   38054             : #if CYTHON_ASSUME_SAFE_MACROS
   38055           0 :     n = PyTuple_GET_SIZE(bases);
   38056             : #else
   38057             :     n = PyTuple_Size(bases);
   38058             :     if (n < 0) return -1;
   38059             : #endif
   38060           0 :     for (i = 1; i < n; i++)
   38061             :     {
   38062             : #if CYTHON_AVOID_BORROWED_REFS
   38063             :         PyObject *b0 = PySequence_GetItem(bases, i);
   38064             :         if (!b0) return -1;
   38065             : #elif CYTHON_ASSUME_SAFE_MACROS
   38066           0 :         PyObject *b0 = PyTuple_GET_ITEM(bases, i);
   38067             : #else
   38068             :         PyObject *b0 = PyTuple_GetItem(bases, i);
   38069             :         if (!b0) return -1;
   38070             : #endif
   38071           0 :         PyTypeObject *b;
   38072             : #if PY_MAJOR_VERSION < 3
   38073             :         if (PyClass_Check(b0))
   38074             :         {
   38075             :             PyErr_Format(PyExc_TypeError, "base class '%.200s' is an old-style class",
   38076             :                          PyString_AS_STRING(((PyClassObject*)b0)->cl_name));
   38077             : #if CYTHON_AVOID_BORROWED_REFS
   38078             :             Py_DECREF(b0);
   38079             : #endif
   38080             :             return -1;
   38081             :         }
   38082             : #endif
   38083           0 :         b = (PyTypeObject*) b0;
   38084           0 :         if (!__Pyx_PyType_HasFeature(b, Py_TPFLAGS_HEAPTYPE))
   38085             :         {
   38086           0 :             __Pyx_TypeName b_name = __Pyx_PyType_GetName(b);
   38087           0 :             PyErr_Format(PyExc_TypeError,
   38088             :                 "base class '" __Pyx_FMT_TYPENAME "' is not a heap type", b_name);
   38089           0 :             __Pyx_DECREF_TypeName(b_name);
   38090             : #if CYTHON_AVOID_BORROWED_REFS
   38091             :             Py_DECREF(b0);
   38092             : #endif
   38093           0 :             return -1;
   38094             :         }
   38095           0 :         if (dictoffset == 0)
   38096             :         {
   38097           0 :             Py_ssize_t b_dictoffset = 0;
   38098             : #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
   38099           0 :             b_dictoffset = b->tp_dictoffset;
   38100             : #else
   38101             :             PyObject *py_b_dictoffset = PyObject_GetAttrString((PyObject*)b, "__dictoffset__");
   38102             :             if (!py_b_dictoffset) goto dictoffset_return;
   38103             :             b_dictoffset = PyLong_AsSsize_t(py_b_dictoffset);
   38104             :             Py_DECREF(py_b_dictoffset);
   38105             :             if (b_dictoffset == -1 && PyErr_Occurred()) goto dictoffset_return;
   38106             : #endif
   38107           0 :             if (b_dictoffset) {
   38108             :                 {
   38109           0 :                     __Pyx_TypeName b_name = __Pyx_PyType_GetName(b);
   38110           0 :                     PyErr_Format(PyExc_TypeError,
   38111             :                         "extension type '%.200s' has no __dict__ slot, "
   38112             :                         "but base type '" __Pyx_FMT_TYPENAME "' has: "
   38113             :                         "either add 'cdef dict __dict__' to the extension type "
   38114             :                         "or add '__slots__ = [...]' to the base type",
   38115             :                         type_name, b_name);
   38116           0 :                     __Pyx_DECREF_TypeName(b_name);
   38117             :                 }
   38118             : #if !(CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY)
   38119             :               dictoffset_return:
   38120             : #endif
   38121             : #if CYTHON_AVOID_BORROWED_REFS
   38122             :                 Py_DECREF(b0);
   38123             : #endif
   38124           0 :                 return -1;
   38125             :             }
   38126             :         }
   38127             : #if CYTHON_AVOID_BORROWED_REFS
   38128             :         Py_DECREF(b0);
   38129             : #endif
   38130             :     }
   38131             :     return 0;
   38132             : }
   38133             : #endif
   38134             : 
   38135             : /* PyType_Ready */
   38136          12 : static int __Pyx_PyType_Ready(PyTypeObject *t) {
   38137             : #if CYTHON_USE_TYPE_SPECS || !(CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API) || defined(PYSTON_MAJOR_VERSION)
   38138             :     (void)__Pyx_PyObject_CallMethod0;
   38139             : #if CYTHON_USE_TYPE_SPECS
   38140             :     (void)__Pyx_validate_bases_tuple;
   38141             : #endif
   38142             :     return PyType_Ready(t);
   38143             : #else
   38144          12 :     int r;
   38145          12 :     PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*);
   38146          12 :     if (bases && unlikely(__Pyx_validate_bases_tuple(t->tp_name, t->tp_dictoffset, bases) == -1))
   38147             :         return -1;
   38148             : #if PY_VERSION_HEX >= 0x03050000 && !defined(PYSTON_MAJOR_VERSION)
   38149             :     {
   38150          12 :         int gc_was_enabled;
   38151             :     #if PY_VERSION_HEX >= 0x030A00b1
   38152          12 :         gc_was_enabled = PyGC_Disable();
   38153          12 :         (void)__Pyx_PyObject_CallMethod0;
   38154             :     #else
   38155             :         PyObject *ret, *py_status;
   38156             :         PyObject *gc = NULL;
   38157             :         #if PY_VERSION_HEX >= 0x030700a1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM+0 >= 0x07030400)
   38158             :         gc = PyImport_GetModule(__pyx_kp_u_gc);
   38159             :         #endif
   38160             :         if (unlikely(!gc)) gc = PyImport_Import(__pyx_kp_u_gc);
   38161             :         if (unlikely(!gc)) return -1;
   38162             :         py_status = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_isenabled);
   38163             :         if (unlikely(!py_status)) {
   38164             :             Py_DECREF(gc);
   38165             :             return -1;
   38166             :         }
   38167             :         gc_was_enabled = __Pyx_PyObject_IsTrue(py_status);
   38168             :         Py_DECREF(py_status);
   38169             :         if (gc_was_enabled > 0) {
   38170             :             ret = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_disable);
   38171             :             if (unlikely(!ret)) {
   38172             :                 Py_DECREF(gc);
   38173             :                 return -1;
   38174             :             }
   38175             :             Py_DECREF(ret);
   38176             :         } else if (unlikely(gc_was_enabled == -1)) {
   38177             :             Py_DECREF(gc);
   38178             :             return -1;
   38179             :         }
   38180             :     #endif
   38181          12 :         t->tp_flags |= Py_TPFLAGS_HEAPTYPE;
   38182             : #if PY_VERSION_HEX >= 0x030A0000
   38183          12 :         t->tp_flags |= Py_TPFLAGS_IMMUTABLETYPE;
   38184             : #endif
   38185             : #else
   38186             :         (void)__Pyx_PyObject_CallMethod0;
   38187             : #endif
   38188          12 :     r = PyType_Ready(t);
   38189             : #if PY_VERSION_HEX >= 0x03050000 && !defined(PYSTON_MAJOR_VERSION)
   38190          12 :         t->tp_flags &= ~Py_TPFLAGS_HEAPTYPE;
   38191             :     #if PY_VERSION_HEX >= 0x030A00b1
   38192          12 :         if (gc_was_enabled)
   38193          12 :             PyGC_Enable();
   38194             :     #else
   38195             :         if (gc_was_enabled) {
   38196             :             PyObject *tp, *v, *tb;
   38197             :             PyErr_Fetch(&tp, &v, &tb);
   38198             :             ret = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_enable);
   38199             :             if (likely(ret || r == -1)) {
   38200             :                 Py_XDECREF(ret);
   38201             :                 PyErr_Restore(tp, v, tb);
   38202             :             } else {
   38203             :                 Py_XDECREF(tp);
   38204             :                 Py_XDECREF(v);
   38205             :                 Py_XDECREF(tb);
   38206             :                 r = -1;
   38207             :             }
   38208             :         }
   38209             :         Py_DECREF(gc);
   38210             :     #endif
   38211             :     }
   38212             : #endif
   38213             :     return r;
   38214             : #endif
   38215             : }
   38216             : 
   38217             : /* SetVTable */
   38218           9 : static int __Pyx_SetVtable(PyTypeObject *type, void *vtable) {
   38219           9 :     PyObject *ob = PyCapsule_New(vtable, 0, 0);
   38220           9 :     if (unlikely(!ob))
   38221           0 :         goto bad;
   38222             : #if CYTHON_COMPILING_IN_LIMITED_API
   38223             :     if (unlikely(PyObject_SetAttr((PyObject *) type, __pyx_n_s_pyx_vtable, ob) < 0))
   38224             : #else
   38225           9 :     if (unlikely(PyDict_SetItem(type->tp_dict, __pyx_n_s_pyx_vtable, ob) < 0))
   38226             : #endif
   38227           0 :         goto bad;
   38228           9 :     Py_DECREF(ob);
   38229             :     return 0;
   38230           0 : bad:
   38231           0 :     Py_XDECREF(ob);
   38232           0 :     return -1;
   38233             : }
   38234             : 
   38235             : /* GetVTable */
   38236           0 : static void* __Pyx_GetVtable(PyTypeObject *type) {
   38237           0 :     void* ptr;
   38238             : #if CYTHON_COMPILING_IN_LIMITED_API
   38239             :     PyObject *ob = PyObject_GetAttr((PyObject *)type, __pyx_n_s_pyx_vtable);
   38240             : #else
   38241           0 :     PyObject *ob = PyObject_GetItem(type->tp_dict, __pyx_n_s_pyx_vtable);
   38242             : #endif
   38243           0 :     if (!ob)
   38244           0 :         goto bad;
   38245           0 :     ptr = PyCapsule_GetPointer(ob, 0);
   38246           0 :     if (!ptr && !PyErr_Occurred())
   38247           0 :         PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type");
   38248           0 :     Py_DECREF(ob);
   38249             :     return ptr;
   38250           0 : bad:
   38251           0 :     Py_XDECREF(ob);
   38252           0 :     return NULL;
   38253             : }
   38254             : 
   38255             : /* MergeVTables */
   38256             : #if !CYTHON_COMPILING_IN_LIMITED_API
   38257           9 : static int __Pyx_MergeVtables(PyTypeObject *type) {
   38258           9 :     int i;
   38259           9 :     void** base_vtables;
   38260           9 :     __Pyx_TypeName tp_base_name;
   38261           9 :     __Pyx_TypeName base_name;
   38262           9 :     void* unknown = (void*)-1;
   38263           9 :     PyObject* bases = type->tp_bases;
   38264           9 :     int base_depth = 0;
   38265             :     {
   38266           9 :         PyTypeObject* base = type->tp_base;
   38267          21 :         while (base) {
   38268          12 :             base_depth += 1;
   38269          12 :             base = base->tp_base;
   38270             :         }
   38271             :     }
   38272           9 :     base_vtables = (void**) malloc(sizeof(void*) * (size_t)(base_depth + 1));
   38273           9 :     base_vtables[0] = unknown;
   38274           9 :     for (i = 1; i < PyTuple_GET_SIZE(bases); i++) {
   38275           0 :         void* base_vtable = __Pyx_GetVtable(((PyTypeObject*)PyTuple_GET_ITEM(bases, i)));
   38276           0 :         if (base_vtable != NULL) {
   38277           0 :             int j;
   38278           0 :             PyTypeObject* base = type->tp_base;
   38279           0 :             for (j = 0; j < base_depth; j++) {
   38280           0 :                 if (base_vtables[j] == unknown) {
   38281           0 :                     base_vtables[j] = __Pyx_GetVtable(base);
   38282           0 :                     base_vtables[j + 1] = unknown;
   38283             :                 }
   38284           0 :                 if (base_vtables[j] == base_vtable) {
   38285             :                     break;
   38286           0 :                 } else if (base_vtables[j] == NULL) {
   38287           0 :                     goto bad;
   38288             :                 }
   38289           0 :                 base = base->tp_base;
   38290             :             }
   38291             :         }
   38292             :     }
   38293           9 :     PyErr_Clear();
   38294           9 :     free(base_vtables);
   38295           9 :     return 0;
   38296           0 : bad:
   38297           0 :     tp_base_name = __Pyx_PyType_GetName(type->tp_base);
   38298           0 :     base_name = __Pyx_PyType_GetName((PyTypeObject*)PyTuple_GET_ITEM(bases, i));
   38299           0 :     PyErr_Format(PyExc_TypeError,
   38300             :         "multiple bases have vtable conflict: '" __Pyx_FMT_TYPENAME "' and '" __Pyx_FMT_TYPENAME "'", tp_base_name, base_name);
   38301           0 :     __Pyx_DECREF_TypeName(tp_base_name);
   38302           0 :     __Pyx_DECREF_TypeName(base_name);
   38303           0 :     free(base_vtables);
   38304           0 :     return -1;
   38305             : }
   38306             : #endif
   38307             : 
   38308             : /* SetupReduce */
   38309             : #if !CYTHON_COMPILING_IN_LIMITED_API
   38310           6 : static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
   38311           6 :   int ret;
   38312           6 :   PyObject *name_attr;
   38313           6 :   name_attr = __Pyx_PyObject_GetAttrStrNoError(meth, __pyx_n_s_name_2);
   38314           6 :   if (likely(name_attr)) {
   38315           6 :       ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
   38316             :   } else {
   38317             :       ret = -1;
   38318             :   }
   38319           6 :   if (unlikely(ret < 0)) {
   38320           0 :       PyErr_Clear();
   38321           0 :       ret = 0;
   38322             :   }
   38323           6 :   Py_XDECREF(name_attr);
   38324           6 :   return ret;
   38325             : }
   38326          12 : static int __Pyx_setup_reduce(PyObject* type_obj) {
   38327          12 :     int ret = 0;
   38328          12 :     PyObject *object_reduce = NULL;
   38329          12 :     PyObject *object_getstate = NULL;
   38330          12 :     PyObject *object_reduce_ex = NULL;
   38331          12 :     PyObject *reduce = NULL;
   38332          12 :     PyObject *reduce_ex = NULL;
   38333          12 :     PyObject *reduce_cython = NULL;
   38334          12 :     PyObject *setstate = NULL;
   38335          12 :     PyObject *setstate_cython = NULL;
   38336          12 :     PyObject *getstate = NULL;
   38337             : #if CYTHON_USE_PYTYPE_LOOKUP
   38338          12 :     getstate = _PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate);
   38339             : #else
   38340             :     getstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_getstate);
   38341             :     if (!getstate && PyErr_Occurred()) {
   38342             :         goto __PYX_BAD;
   38343             :     }
   38344             : #endif
   38345          12 :     if (getstate) {
   38346             : #if CYTHON_USE_PYTYPE_LOOKUP
   38347          12 :         object_getstate = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_getstate);
   38348             : #else
   38349             :         object_getstate = __Pyx_PyObject_GetAttrStrNoError((PyObject*)&PyBaseObject_Type, __pyx_n_s_getstate);
   38350             :         if (!object_getstate && PyErr_Occurred()) {
   38351             :             goto __PYX_BAD;
   38352             :         }
   38353             : #endif
   38354          12 :         if (object_getstate != getstate) {
   38355           0 :             goto __PYX_GOOD;
   38356             :         }
   38357             :     }
   38358             : #if CYTHON_USE_PYTYPE_LOOKUP
   38359          12 :     object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
   38360             : #else
   38361             :     object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
   38362             : #endif
   38363          12 :     reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD;
   38364          12 :     if (reduce_ex == object_reduce_ex) {
   38365             : #if CYTHON_USE_PYTYPE_LOOKUP
   38366          12 :         object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
   38367             : #else
   38368             :         object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
   38369             : #endif
   38370          12 :         reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD;
   38371          12 :         if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
   38372          12 :             reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython);
   38373          12 :             if (likely(reduce_cython)) {
   38374          12 :                 ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
   38375          12 :                 ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
   38376           0 :             } else if (reduce == object_reduce || PyErr_Occurred()) {
   38377           0 :                 goto __PYX_BAD;
   38378             :             }
   38379          12 :             setstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate);
   38380          12 :             if (!setstate) PyErr_Clear();
   38381          12 :             if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
   38382          12 :                 setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython);
   38383          12 :                 if (likely(setstate_cython)) {
   38384          12 :                     ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
   38385          12 :                     ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
   38386           0 :                 } else if (!setstate || PyErr_Occurred()) {
   38387           0 :                     goto __PYX_BAD;
   38388             :                 }
   38389             :             }
   38390          12 :             PyType_Modified((PyTypeObject*)type_obj);
   38391             :         }
   38392             :     }
   38393          12 :     goto __PYX_GOOD;
   38394           0 : __PYX_BAD:
   38395           0 :     if (!PyErr_Occurred()) {
   38396           0 :         __Pyx_TypeName type_obj_name =
   38397             :             __Pyx_PyType_GetName((PyTypeObject*)type_obj);
   38398           0 :         PyErr_Format(PyExc_RuntimeError,
   38399             :             "Unable to initialize pickling for " __Pyx_FMT_TYPENAME, type_obj_name);
   38400             :         __Pyx_DECREF_TypeName(type_obj_name);
   38401             :     }
   38402             :     ret = -1;
   38403          12 : __PYX_GOOD:
   38404             : #if !CYTHON_USE_PYTYPE_LOOKUP
   38405             :     Py_XDECREF(object_reduce);
   38406             :     Py_XDECREF(object_reduce_ex);
   38407             :     Py_XDECREF(object_getstate);
   38408             :     Py_XDECREF(getstate);
   38409             : #endif
   38410          12 :     Py_XDECREF(reduce);
   38411          12 :     Py_XDECREF(reduce_ex);
   38412          12 :     Py_XDECREF(reduce_cython);
   38413          12 :     Py_XDECREF(setstate);
   38414          12 :     Py_XDECREF(setstate_cython);
   38415          12 :     return ret;
   38416             : }
   38417             : #endif
   38418             : 
   38419             : /* FetchSharedCythonModule */
   38420           6 : static PyObject *__Pyx_FetchSharedCythonABIModule(void) {
   38421           6 :     return __Pyx_PyImport_AddModuleRef((char*) __PYX_ABI_MODULE_NAME);
   38422             : }
   38423             : 
   38424             : /* FetchCommonType */
   38425           6 : static int __Pyx_VerifyCachedType(PyObject *cached_type,
   38426             :                                const char *name,
   38427             :                                Py_ssize_t basicsize,
   38428             :                                Py_ssize_t expected_basicsize) {
   38429           6 :     if (!PyType_Check(cached_type)) {
   38430           0 :         PyErr_Format(PyExc_TypeError,
   38431             :             "Shared Cython type %.200s is not a type object", name);
   38432           0 :         return -1;
   38433             :     }
   38434           6 :     if (basicsize != expected_basicsize) {
   38435           0 :         PyErr_Format(PyExc_TypeError,
   38436             :             "Shared Cython type %.200s has the wrong size, try recompiling",
   38437             :             name);
   38438           0 :         return -1;
   38439             :     }
   38440             :     return 0;
   38441             : }
   38442             : #if !CYTHON_USE_TYPE_SPECS
   38443           6 : static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
   38444           6 :     PyObject* abi_module;
   38445           6 :     const char* object_name;
   38446           6 :     PyTypeObject *cached_type = NULL;
   38447           6 :     abi_module = __Pyx_FetchSharedCythonABIModule();
   38448           6 :     if (!abi_module) return NULL;
   38449           6 :     object_name = strrchr(type->tp_name, '.');
   38450           6 :     object_name = object_name ? object_name+1 : type->tp_name;
   38451           6 :     cached_type = (PyTypeObject*) PyObject_GetAttrString(abi_module, object_name);
   38452           6 :     if (cached_type) {
   38453           6 :         if (__Pyx_VerifyCachedType(
   38454             :               (PyObject *)cached_type,
   38455             :               object_name,
   38456             :               cached_type->tp_basicsize,
   38457             :               type->tp_basicsize) < 0) {
   38458           0 :             goto bad;
   38459             :         }
   38460           6 :         goto done;
   38461             :     }
   38462           0 :     if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
   38463           0 :     PyErr_Clear();
   38464           0 :     if (PyType_Ready(type) < 0) goto bad;
   38465           0 :     if (PyObject_SetAttrString(abi_module, object_name, (PyObject *)type) < 0)
   38466           0 :         goto bad;
   38467           0 :     Py_INCREF(type);
   38468             :     cached_type = type;
   38469           6 : done:
   38470           6 :     Py_DECREF(abi_module);
   38471             :     return cached_type;
   38472           0 : bad:
   38473           0 :     Py_XDECREF(cached_type);
   38474           0 :     cached_type = NULL;
   38475           0 :     goto done;
   38476             : }
   38477             : #else
   38478             : static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyObject *module, PyType_Spec *spec, PyObject *bases) {
   38479             :     PyObject *abi_module, *cached_type = NULL;
   38480             :     const char* object_name = strrchr(spec->name, '.');
   38481             :     object_name = object_name ? object_name+1 : spec->name;
   38482             :     abi_module = __Pyx_FetchSharedCythonABIModule();
   38483             :     if (!abi_module) return NULL;
   38484             :     cached_type = PyObject_GetAttrString(abi_module, object_name);
   38485             :     if (cached_type) {
   38486             :         Py_ssize_t basicsize;
   38487             : #if CYTHON_COMPILING_IN_LIMITED_API
   38488             :         PyObject *py_basicsize;
   38489             :         py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__");
   38490             :         if (unlikely(!py_basicsize)) goto bad;
   38491             :         basicsize = PyLong_AsSsize_t(py_basicsize);
   38492             :         Py_DECREF(py_basicsize);
   38493             :         py_basicsize = 0;
   38494             :         if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
   38495             : #else
   38496             :         basicsize = likely(PyType_Check(cached_type)) ? ((PyTypeObject*) cached_type)->tp_basicsize : -1;
   38497             : #endif
   38498             :         if (__Pyx_VerifyCachedType(
   38499             :               cached_type,
   38500             :               object_name,
   38501             :               basicsize,
   38502             :               spec->basicsize) < 0) {
   38503             :             goto bad;
   38504             :         }
   38505             :         goto done;
   38506             :     }
   38507             :     if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
   38508             :     PyErr_Clear();
   38509             :     CYTHON_UNUSED_VAR(module);
   38510             :     cached_type = __Pyx_PyType_FromModuleAndSpec(abi_module, spec, bases);
   38511             :     if (unlikely(!cached_type)) goto bad;
   38512             :     if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad;
   38513             :     if (PyObject_SetAttrString(abi_module, object_name, cached_type) < 0) goto bad;
   38514             : done:
   38515             :     Py_DECREF(abi_module);
   38516             :     assert(cached_type == NULL || PyType_Check(cached_type));
   38517             :     return (PyTypeObject *) cached_type;
   38518             : bad:
   38519             :     Py_XDECREF(cached_type);
   38520             :     cached_type = NULL;
   38521             :     goto done;
   38522             : }
   38523             : #endif
   38524             : 
   38525             : /* PyVectorcallFastCallDict */
   38526             : #if CYTHON_METH_FASTCALL
   38527           0 : static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw)
   38528             : {
   38529           0 :     PyObject *res = NULL;
   38530           0 :     PyObject *kwnames;
   38531           0 :     PyObject **newargs;
   38532           0 :     PyObject **kwvalues;
   38533           0 :     Py_ssize_t i, pos;
   38534           0 :     size_t j;
   38535           0 :     PyObject *key, *value;
   38536           0 :     unsigned long keys_are_strings;
   38537           0 :     Py_ssize_t nkw = PyDict_GET_SIZE(kw);
   38538           0 :     newargs = (PyObject **)PyMem_Malloc((nargs + (size_t)nkw) * sizeof(args[0]));
   38539           0 :     if (unlikely(newargs == NULL)) {
   38540           0 :         PyErr_NoMemory();
   38541           0 :         return NULL;
   38542             :     }
   38543           0 :     for (j = 0; j < nargs; j++) newargs[j] = args[j];
   38544           0 :     kwnames = PyTuple_New(nkw);
   38545           0 :     if (unlikely(kwnames == NULL)) {
   38546           0 :         PyMem_Free(newargs);
   38547           0 :         return NULL;
   38548             :     }
   38549           0 :     kwvalues = newargs + nargs;
   38550           0 :     pos = i = 0;
   38551           0 :     keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS;
   38552           0 :     while (PyDict_Next(kw, &pos, &key, &value)) {
   38553           0 :         keys_are_strings &= Py_TYPE(key)->tp_flags;
   38554           0 :         Py_INCREF(key);
   38555           0 :         Py_INCREF(value);
   38556           0 :         PyTuple_SET_ITEM(kwnames, i, key);
   38557           0 :         kwvalues[i] = value;
   38558           0 :         i++;
   38559             :     }
   38560           0 :     if (unlikely(!keys_are_strings)) {
   38561           0 :         PyErr_SetString(PyExc_TypeError, "keywords must be strings");
   38562           0 :         goto cleanup;
   38563             :     }
   38564           0 :     res = vc(func, newargs, nargs, kwnames);
   38565           0 : cleanup:
   38566           0 :     Py_DECREF(kwnames);
   38567           0 :     for (i = 0; i < nkw; i++)
   38568           0 :         Py_DECREF(kwvalues[i]);
   38569           0 :     PyMem_Free(newargs);
   38570           0 :     return res;
   38571             : }
   38572           0 : static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw)
   38573             : {
   38574           0 :     if (likely(kw == NULL) || PyDict_GET_SIZE(kw) == 0) {
   38575           0 :         return vc(func, args, nargs, NULL);
   38576             :     }
   38577           0 :     return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw);
   38578             : }
   38579             : #endif
   38580             : 
   38581             : /* CythonFunctionShared */
   38582             : #if CYTHON_COMPILING_IN_LIMITED_API
   38583             : static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc) {
   38584             :     if (__Pyx_CyFunction_Check(func)) {
   38585             :         return PyCFunction_GetFunction(((__pyx_CyFunctionObject*)func)->func) == (PyCFunction) cfunc;
   38586             :     } else if (PyCFunction_Check(func)) {
   38587             :         return PyCFunction_GetFunction(func) == (PyCFunction) cfunc;
   38588             :     }
   38589             :     return 0;
   38590             : }
   38591             : #else
   38592             : static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc) {
   38593             :     return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc;
   38594             : }
   38595             : #endif
   38596           0 : static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) {
   38597             : #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
   38598             :     __Pyx_Py_XDECREF_SET(
   38599             :         __Pyx_CyFunction_GetClassObj(f),
   38600             :             ((classobj) ? __Pyx_NewRef(classobj) : NULL));
   38601             : #else
   38602           0 :     __Pyx_Py_XDECREF_SET(
   38603             :         ((PyCMethodObject *) (f))->mm_class,
   38604             :         (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL));
   38605             : #endif
   38606           0 : }
   38607             : static PyObject *
   38608           0 : __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, void *closure)
   38609             : {
   38610           0 :     CYTHON_UNUSED_VAR(closure);
   38611           0 :     if (unlikely(op->func_doc == NULL)) {
   38612             : #if CYTHON_COMPILING_IN_LIMITED_API
   38613             :         op->func_doc = PyObject_GetAttrString(op->func, "__doc__");
   38614             :         if (unlikely(!op->func_doc)) return NULL;
   38615             : #else
   38616           0 :         if (((PyCFunctionObject*)op)->m_ml->ml_doc) {
   38617             : #if PY_MAJOR_VERSION >= 3
   38618           0 :             op->func_doc = PyUnicode_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc);
   38619             : #else
   38620             :             op->func_doc = PyString_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc);
   38621             : #endif
   38622           0 :             if (unlikely(op->func_doc == NULL))
   38623             :                 return NULL;
   38624             :         } else {
   38625           0 :             Py_INCREF(Py_None);
   38626           0 :             return Py_None;
   38627             :         }
   38628             : #endif
   38629             :     }
   38630           0 :     Py_INCREF(op->func_doc);
   38631             :     return op->func_doc;
   38632             : }
   38633             : static int
   38634           0 : __Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, void *context)
   38635             : {
   38636           0 :     CYTHON_UNUSED_VAR(context);
   38637           0 :     if (value == NULL) {
   38638           0 :         value = Py_None;
   38639             :     }
   38640           0 :     Py_INCREF(value);
   38641           0 :     __Pyx_Py_XDECREF_SET(op->func_doc, value);
   38642           0 :     return 0;
   38643             : }
   38644             : static PyObject *
   38645           0 : __Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, void *context)
   38646             : {
   38647           0 :     CYTHON_UNUSED_VAR(context);
   38648           0 :     if (unlikely(op->func_name == NULL)) {
   38649             : #if CYTHON_COMPILING_IN_LIMITED_API
   38650             :         op->func_name = PyObject_GetAttrString(op->func, "__name__");
   38651             : #elif PY_MAJOR_VERSION >= 3
   38652           0 :         op->func_name = PyUnicode_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name);
   38653             : #else
   38654             :         op->func_name = PyString_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name);
   38655             : #endif
   38656           0 :         if (unlikely(op->func_name == NULL))
   38657             :             return NULL;
   38658             :     }
   38659           0 :     Py_INCREF(op->func_name);
   38660             :     return op->func_name;
   38661             : }
   38662             : static int
   38663           0 : __Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, void *context)
   38664             : {
   38665           0 :     CYTHON_UNUSED_VAR(context);
   38666             : #if PY_MAJOR_VERSION >= 3
   38667           0 :     if (unlikely(value == NULL || !PyUnicode_Check(value)))
   38668             : #else
   38669             :     if (unlikely(value == NULL || !PyString_Check(value)))
   38670             : #endif
   38671             :     {
   38672           0 :         PyErr_SetString(PyExc_TypeError,
   38673             :                         "__name__ must be set to a string object");
   38674           0 :         return -1;
   38675             :     }
   38676           0 :     Py_INCREF(value);
   38677           0 :     __Pyx_Py_XDECREF_SET(op->func_name, value);
   38678           0 :     return 0;
   38679             : }
   38680             : static PyObject *
   38681           0 : __Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, void *context)
   38682             : {
   38683           0 :     CYTHON_UNUSED_VAR(context);
   38684           0 :     Py_INCREF(op->func_qualname);
   38685           0 :     return op->func_qualname;
   38686             : }
   38687             : static int
   38688           0 : __Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void *context)
   38689             : {
   38690           0 :     CYTHON_UNUSED_VAR(context);
   38691             : #if PY_MAJOR_VERSION >= 3
   38692           0 :     if (unlikely(value == NULL || !PyUnicode_Check(value)))
   38693             : #else
   38694             :     if (unlikely(value == NULL || !PyString_Check(value)))
   38695             : #endif
   38696             :     {
   38697           0 :         PyErr_SetString(PyExc_TypeError,
   38698             :                         "__qualname__ must be set to a string object");
   38699           0 :         return -1;
   38700             :     }
   38701           0 :     Py_INCREF(value);
   38702           0 :     __Pyx_Py_XDECREF_SET(op->func_qualname, value);
   38703           0 :     return 0;
   38704             : }
   38705             : static PyObject *
   38706           0 : __Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context)
   38707             : {
   38708           0 :     CYTHON_UNUSED_VAR(context);
   38709           0 :     if (unlikely(op->func_dict == NULL)) {
   38710           0 :         op->func_dict = PyDict_New();
   38711           0 :         if (unlikely(op->func_dict == NULL))
   38712             :             return NULL;
   38713             :     }
   38714           0 :     Py_INCREF(op->func_dict);
   38715             :     return op->func_dict;
   38716             : }
   38717             : static int
   38718           0 : __Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, void *context)
   38719             : {
   38720           0 :     CYTHON_UNUSED_VAR(context);
   38721           0 :     if (unlikely(value == NULL)) {
   38722           0 :         PyErr_SetString(PyExc_TypeError,
   38723             :                "function's dictionary may not be deleted");
   38724           0 :         return -1;
   38725             :     }
   38726           0 :     if (unlikely(!PyDict_Check(value))) {
   38727           0 :         PyErr_SetString(PyExc_TypeError,
   38728             :                "setting function's dictionary to a non-dict");
   38729           0 :         return -1;
   38730             :     }
   38731           0 :     Py_INCREF(value);
   38732           0 :     __Pyx_Py_XDECREF_SET(op->func_dict, value);
   38733           0 :     return 0;
   38734             : }
   38735             : static PyObject *
   38736           0 : __Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, void *context)
   38737             : {
   38738           0 :     CYTHON_UNUSED_VAR(context);
   38739           0 :     Py_INCREF(op->func_globals);
   38740           0 :     return op->func_globals;
   38741             : }
   38742             : static PyObject *
   38743           0 : __Pyx_CyFunction_get_closure(__pyx_CyFunctionObject *op, void *context)
   38744             : {
   38745           0 :     CYTHON_UNUSED_VAR(op);
   38746           0 :     CYTHON_UNUSED_VAR(context);
   38747           0 :     Py_INCREF(Py_None);
   38748           0 :     return Py_None;
   38749             : }
   38750             : static PyObject *
   38751           0 : __Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, void *context)
   38752             : {
   38753           0 :     PyObject* result = (op->func_code) ? op->func_code : Py_None;
   38754           0 :     CYTHON_UNUSED_VAR(context);
   38755           0 :     Py_INCREF(result);
   38756           0 :     return result;
   38757             : }
   38758             : static int
   38759           0 : __Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
   38760           0 :     int result = 0;
   38761           0 :     PyObject *res = op->defaults_getter((PyObject *) op);
   38762           0 :     if (unlikely(!res))
   38763             :         return -1;
   38764             :     #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
   38765           0 :     op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
   38766           0 :     Py_INCREF(op->defaults_tuple);
   38767           0 :     op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
   38768           0 :     Py_INCREF(op->defaults_kwdict);
   38769             :     #else
   38770             :     op->defaults_tuple = __Pyx_PySequence_ITEM(res, 0);
   38771             :     if (unlikely(!op->defaults_tuple)) result = -1;
   38772             :     else {
   38773             :         op->defaults_kwdict = __Pyx_PySequence_ITEM(res, 1);
   38774             :         if (unlikely(!op->defaults_kwdict)) result = -1;
   38775             :     }
   38776             :     #endif
   38777           0 :     Py_DECREF(res);
   38778             :     return result;
   38779             : }
   38780             : static int
   38781           0 : __Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
   38782           0 :     CYTHON_UNUSED_VAR(context);
   38783           0 :     if (!value) {
   38784             :         value = Py_None;
   38785           0 :     } else if (unlikely(value != Py_None && !PyTuple_Check(value))) {
   38786           0 :         PyErr_SetString(PyExc_TypeError,
   38787             :                         "__defaults__ must be set to a tuple object");
   38788           0 :         return -1;
   38789             :     }
   38790           0 :     PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__defaults__ will not "
   38791             :                  "currently affect the values used in function calls", 1);
   38792           0 :     Py_INCREF(value);
   38793           0 :     __Pyx_Py_XDECREF_SET(op->defaults_tuple, value);
   38794           0 :     return 0;
   38795             : }
   38796             : static PyObject *
   38797           0 : __Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, void *context) {
   38798           0 :     PyObject* result = op->defaults_tuple;
   38799           0 :     CYTHON_UNUSED_VAR(context);
   38800           0 :     if (unlikely(!result)) {
   38801           0 :         if (op->defaults_getter) {
   38802           0 :             if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL;
   38803           0 :             result = op->defaults_tuple;
   38804             :         } else {
   38805             :             result = Py_None;
   38806             :         }
   38807             :     }
   38808           0 :     Py_INCREF(result);
   38809             :     return result;
   38810             : }
   38811             : static int
   38812           0 : __Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
   38813           0 :     CYTHON_UNUSED_VAR(context);
   38814           0 :     if (!value) {
   38815             :         value = Py_None;
   38816           0 :     } else if (unlikely(value != Py_None && !PyDict_Check(value))) {
   38817           0 :         PyErr_SetString(PyExc_TypeError,
   38818             :                         "__kwdefaults__ must be set to a dict object");
   38819           0 :         return -1;
   38820             :     }
   38821           0 :     PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__kwdefaults__ will not "
   38822             :                  "currently affect the values used in function calls", 1);
   38823           0 :     Py_INCREF(value);
   38824           0 :     __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value);
   38825           0 :     return 0;
   38826             : }
   38827             : static PyObject *
   38828           0 : __Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, void *context) {
   38829           0 :     PyObject* result = op->defaults_kwdict;
   38830           0 :     CYTHON_UNUSED_VAR(context);
   38831           0 :     if (unlikely(!result)) {
   38832           0 :         if (op->defaults_getter) {
   38833           0 :             if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL;
   38834           0 :             result = op->defaults_kwdict;
   38835             :         } else {
   38836             :             result = Py_None;
   38837             :         }
   38838             :     }
   38839           0 :     Py_INCREF(result);
   38840             :     return result;
   38841             : }
   38842             : static int
   38843           0 : __Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
   38844           0 :     CYTHON_UNUSED_VAR(context);
   38845           0 :     if (!value || value == Py_None) {
   38846             :         value = NULL;
   38847           0 :     } else if (unlikely(!PyDict_Check(value))) {
   38848           0 :         PyErr_SetString(PyExc_TypeError,
   38849             :                         "__annotations__ must be set to a dict object");
   38850           0 :         return -1;
   38851             :     }
   38852           0 :     Py_XINCREF(value);
   38853           0 :     __Pyx_Py_XDECREF_SET(op->func_annotations, value);
   38854           0 :     return 0;
   38855             : }
   38856             : static PyObject *
   38857           0 : __Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) {
   38858           0 :     PyObject* result = op->func_annotations;
   38859           0 :     CYTHON_UNUSED_VAR(context);
   38860           0 :     if (unlikely(!result)) {
   38861           0 :         result = PyDict_New();
   38862           0 :         if (unlikely(!result)) return NULL;
   38863           0 :         op->func_annotations = result;
   38864             :     }
   38865           0 :     Py_INCREF(result);
   38866             :     return result;
   38867             : }
   38868             : static PyObject *
   38869           0 : __Pyx_CyFunction_get_is_coroutine(__pyx_CyFunctionObject *op, void *context) {
   38870           0 :     int is_coroutine;
   38871           0 :     CYTHON_UNUSED_VAR(context);
   38872           0 :     if (op->func_is_coroutine) {
   38873           0 :         return __Pyx_NewRef(op->func_is_coroutine);
   38874             :     }
   38875           0 :     is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE;
   38876             : #if PY_VERSION_HEX >= 0x03050000
   38877           0 :     if (is_coroutine) {
   38878           0 :         PyObject *module, *fromlist, *marker = __pyx_n_s_is_coroutine;
   38879           0 :         fromlist = PyList_New(1);
   38880           0 :         if (unlikely(!fromlist)) return NULL;
   38881           0 :         Py_INCREF(marker);
   38882             : #if CYTHON_ASSUME_SAFE_MACROS
   38883           0 :         PyList_SET_ITEM(fromlist, 0, marker);
   38884             : #else
   38885             :         if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) {
   38886             :             Py_DECREF(marker);
   38887             :             Py_DECREF(fromlist);
   38888             :             return NULL;
   38889             :         }
   38890             : #endif
   38891           0 :         module = PyImport_ImportModuleLevelObject(__pyx_n_s_asyncio_coroutines, NULL, NULL, fromlist, 0);
   38892           0 :         Py_DECREF(fromlist);
   38893           0 :         if (unlikely(!module)) goto ignore;
   38894           0 :         op->func_is_coroutine = __Pyx_PyObject_GetAttrStr(module, marker);
   38895           0 :         Py_DECREF(module);
   38896           0 :         if (likely(op->func_is_coroutine)) {
   38897           0 :             return __Pyx_NewRef(op->func_is_coroutine);
   38898             :         }
   38899           0 : ignore:
   38900           0 :         PyErr_Clear();
   38901             :     }
   38902             : #endif
   38903           0 :     op->func_is_coroutine = __Pyx_PyBool_FromLong(is_coroutine);
   38904           0 :     return __Pyx_NewRef(op->func_is_coroutine);
   38905             : }
   38906             : #if CYTHON_COMPILING_IN_LIMITED_API
   38907             : static PyObject *
   38908             : __Pyx_CyFunction_get_module(__pyx_CyFunctionObject *op, void *context) {
   38909             :     CYTHON_UNUSED_VAR(context);
   38910             :     return PyObject_GetAttrString(op->func, "__module__");
   38911             : }
   38912             : static int
   38913             : __Pyx_CyFunction_set_module(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
   38914             :     CYTHON_UNUSED_VAR(context);
   38915             :     return PyObject_SetAttrString(op->func, "__module__", value);
   38916             : }
   38917             : #endif
   38918             : static PyGetSetDef __pyx_CyFunction_getsets[] = {
   38919             :     {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
   38920             :     {(char *) "__doc__",  (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
   38921             :     {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
   38922             :     {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
   38923             :     {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
   38924             :     {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
   38925             :     {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
   38926             :     {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
   38927             :     {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
   38928             :     {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
   38929             :     {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
   38930             :     {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
   38931             :     {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
   38932             :     {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
   38933             :     {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
   38934             :     {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
   38935             :     {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
   38936             :     {(char *) "_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0},
   38937             : #if CYTHON_COMPILING_IN_LIMITED_API
   38938             :     {"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0},
   38939             : #endif
   38940             :     {0, 0, 0, 0, 0}
   38941             : };
   38942             : static PyMemberDef __pyx_CyFunction_members[] = {
   38943             : #if !CYTHON_COMPILING_IN_LIMITED_API
   38944             :     {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0},
   38945             : #endif
   38946             : #if CYTHON_USE_TYPE_SPECS
   38947             :     {(char *) "__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0},
   38948             : #if CYTHON_METH_FASTCALL
   38949             : #if CYTHON_BACKPORT_VECTORCALL
   38950             :     {(char *) "__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall), READONLY, 0},
   38951             : #else
   38952             : #if !CYTHON_COMPILING_IN_LIMITED_API
   38953             :     {(char *) "__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0},
   38954             : #endif
   38955             : #endif
   38956             : #endif
   38957             : #if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API
   38958             :     {(char *) "__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist), READONLY, 0},
   38959             : #else
   38960             :     {(char *) "__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0},
   38961             : #endif
   38962             : #endif
   38963             :     {0, 0, 0,  0, 0}
   38964             : };
   38965             : static PyObject *
   38966           0 : __Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, PyObject *args)
   38967             : {
   38968           0 :     CYTHON_UNUSED_VAR(args);
   38969             : #if PY_MAJOR_VERSION >= 3
   38970           0 :     Py_INCREF(m->func_qualname);
   38971           0 :     return m->func_qualname;
   38972             : #else
   38973             :     return PyString_FromString(((PyCFunctionObject*)m)->m_ml->ml_name);
   38974             : #endif
   38975             : }
   38976             : static PyMethodDef __pyx_CyFunction_methods[] = {
   38977             :     {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
   38978             :     {0, 0, 0, 0}
   38979             : };
   38980             : #if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API
   38981             : #define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
   38982             : #else
   38983             : #define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist)
   38984             : #endif
   38985          72 : static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname,
   38986             :                                        PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
   38987             : #if !CYTHON_COMPILING_IN_LIMITED_API
   38988          72 :     PyCFunctionObject *cf = (PyCFunctionObject*) op;
   38989             : #endif
   38990          72 :     if (unlikely(op == NULL))
   38991             :         return NULL;
   38992             : #if CYTHON_COMPILING_IN_LIMITED_API
   38993             :     op->func = PyCFunction_NewEx(ml, (PyObject*)op, module);
   38994             :     if (unlikely(!op->func)) return NULL;
   38995             : #endif
   38996          72 :     op->flags = flags;
   38997          72 :     __Pyx_CyFunction_weakreflist(op) = NULL;
   38998             : #if !CYTHON_COMPILING_IN_LIMITED_API
   38999          72 :     cf->m_ml = ml;
   39000          72 :     cf->m_self = (PyObject *) op;
   39001             : #endif
   39002          72 :     Py_XINCREF(closure);
   39003          72 :     op->func_closure = closure;
   39004             : #if !CYTHON_COMPILING_IN_LIMITED_API
   39005          72 :     Py_XINCREF(module);
   39006          72 :     cf->m_module = module;
   39007             : #endif
   39008          72 :     op->func_dict = NULL;
   39009          72 :     op->func_name = NULL;
   39010          72 :     Py_INCREF(qualname);
   39011          72 :     op->func_qualname = qualname;
   39012          72 :     op->func_doc = NULL;
   39013             : #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
   39014             :     op->func_classobj = NULL;
   39015             : #else
   39016          72 :     ((PyCMethodObject*)op)->mm_class = NULL;
   39017             : #endif
   39018          72 :     op->func_globals = globals;
   39019          72 :     Py_INCREF(op->func_globals);
   39020          72 :     Py_XINCREF(code);
   39021          72 :     op->func_code = code;
   39022          72 :     op->defaults_pyobjects = 0;
   39023          72 :     op->defaults_size = 0;
   39024          72 :     op->defaults = NULL;
   39025          72 :     op->defaults_tuple = NULL;
   39026          72 :     op->defaults_kwdict = NULL;
   39027          72 :     op->defaults_getter = NULL;
   39028          72 :     op->func_annotations = NULL;
   39029          72 :     op->func_is_coroutine = NULL;
   39030             : #if CYTHON_METH_FASTCALL
   39031          72 :     switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) {
   39032           0 :     case METH_NOARGS:
   39033           0 :         __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS;
   39034           0 :         break;
   39035           0 :     case METH_O:
   39036           0 :         __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O;
   39037           0 :         break;
   39038           0 :     case METH_METHOD | METH_FASTCALL | METH_KEYWORDS:
   39039           0 :         __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD;
   39040           0 :         break;
   39041          54 :     case METH_FASTCALL | METH_KEYWORDS:
   39042          54 :         __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS;
   39043          54 :         break;
   39044          18 :     case METH_VARARGS | METH_KEYWORDS:
   39045          18 :         __Pyx_CyFunction_func_vectorcall(op) = NULL;
   39046          18 :         break;
   39047           0 :     default:
   39048           0 :         PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction");
   39049           0 :         Py_DECREF(op);
   39050             :         return NULL;
   39051             :     }
   39052             : #endif
   39053             :     return (PyObject *) op;
   39054             : }
   39055             : static int
   39056           0 : __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
   39057             : {
   39058           0 :     Py_CLEAR(m->func_closure);
   39059             : #if CYTHON_COMPILING_IN_LIMITED_API
   39060             :     Py_CLEAR(m->func);
   39061             : #else
   39062           0 :     Py_CLEAR(((PyCFunctionObject*)m)->m_module);
   39063             : #endif
   39064           0 :     Py_CLEAR(m->func_dict);
   39065           0 :     Py_CLEAR(m->func_name);
   39066           0 :     Py_CLEAR(m->func_qualname);
   39067           0 :     Py_CLEAR(m->func_doc);
   39068           0 :     Py_CLEAR(m->func_globals);
   39069           0 :     Py_CLEAR(m->func_code);
   39070             : #if !CYTHON_COMPILING_IN_LIMITED_API
   39071             : #if PY_VERSION_HEX < 0x030900B1
   39072             :     Py_CLEAR(__Pyx_CyFunction_GetClassObj(m));
   39073             : #else
   39074             :     {
   39075           0 :         PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class;
   39076           0 :         ((PyCMethodObject *) (m))->mm_class = NULL;
   39077           0 :         Py_XDECREF(cls);
   39078             :     }
   39079             : #endif
   39080             : #endif
   39081           0 :     Py_CLEAR(m->defaults_tuple);
   39082           0 :     Py_CLEAR(m->defaults_kwdict);
   39083           0 :     Py_CLEAR(m->func_annotations);
   39084           0 :     Py_CLEAR(m->func_is_coroutine);
   39085           0 :     if (m->defaults) {
   39086             :         PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
   39087             :         int i;
   39088           0 :         for (i = 0; i < m->defaults_pyobjects; i++)
   39089           0 :             Py_XDECREF(pydefaults[i]);
   39090           0 :         PyObject_Free(m->defaults);
   39091           0 :         m->defaults = NULL;
   39092             :     }
   39093           0 :     return 0;
   39094             : }
   39095           0 : static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m)
   39096             : {
   39097           0 :     if (__Pyx_CyFunction_weakreflist(m) != NULL)
   39098           0 :         PyObject_ClearWeakRefs((PyObject *) m);
   39099           0 :     __Pyx_CyFunction_clear(m);
   39100           0 :     __Pyx_PyHeapTypeObject_GC_Del(m);
   39101           0 : }
   39102           0 : static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
   39103             : {
   39104           0 :     PyObject_GC_UnTrack(m);
   39105           0 :     __Pyx__CyFunction_dealloc(m);
   39106           0 : }
   39107           0 : static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
   39108             : {
   39109           0 :     Py_VISIT(m->func_closure);
   39110             : #if CYTHON_COMPILING_IN_LIMITED_API
   39111             :     Py_VISIT(m->func);
   39112             : #else
   39113           0 :     Py_VISIT(((PyCFunctionObject*)m)->m_module);
   39114             : #endif
   39115           0 :     Py_VISIT(m->func_dict);
   39116           0 :     Py_VISIT(m->func_name);
   39117           0 :     Py_VISIT(m->func_qualname);
   39118           0 :     Py_VISIT(m->func_doc);
   39119           0 :     Py_VISIT(m->func_globals);
   39120           0 :     Py_VISIT(m->func_code);
   39121             : #if !CYTHON_COMPILING_IN_LIMITED_API
   39122           0 :     Py_VISIT(__Pyx_CyFunction_GetClassObj(m));
   39123             : #endif
   39124           0 :     Py_VISIT(m->defaults_tuple);
   39125           0 :     Py_VISIT(m->defaults_kwdict);
   39126           0 :     Py_VISIT(m->func_is_coroutine);
   39127           0 :     if (m->defaults) {
   39128             :         PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
   39129             :         int i;
   39130           0 :         for (i = 0; i < m->defaults_pyobjects; i++)
   39131           0 :             Py_VISIT(pydefaults[i]);
   39132             :     }
   39133             :     return 0;
   39134             : }
   39135             : static PyObject*
   39136           0 : __Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
   39137             : {
   39138             : #if PY_MAJOR_VERSION >= 3
   39139           0 :     return PyUnicode_FromFormat("<cyfunction %U at %p>",
   39140             :                                 op->func_qualname, (void *)op);
   39141             : #else
   39142             :     return PyString_FromFormat("<cyfunction %s at %p>",
   39143             :                                PyString_AsString(op->func_qualname), (void *)op);
   39144             : #endif
   39145             : }
   39146           0 : static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
   39147             : #if CYTHON_COMPILING_IN_LIMITED_API
   39148             :     PyObject *f = ((__pyx_CyFunctionObject*)func)->func;
   39149             :     PyObject *py_name = NULL;
   39150             :     PyCFunction meth;
   39151             :     int flags;
   39152             :     meth = PyCFunction_GetFunction(f);
   39153             :     if (unlikely(!meth)) return NULL;
   39154             :     flags = PyCFunction_GetFlags(f);
   39155             :     if (unlikely(flags < 0)) return NULL;
   39156             : #else
   39157           0 :     PyCFunctionObject* f = (PyCFunctionObject*)func;
   39158           0 :     PyCFunction meth = f->m_ml->ml_meth;
   39159           0 :     int flags = f->m_ml->ml_flags;
   39160             : #endif
   39161           0 :     Py_ssize_t size;
   39162           0 :     switch (flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
   39163           0 :     case METH_VARARGS:
   39164           0 :         if (likely(kw == NULL || PyDict_Size(kw) == 0))
   39165           0 :             return (*meth)(self, arg);
   39166             :         break;
   39167           0 :     case METH_VARARGS | METH_KEYWORDS:
   39168           0 :         return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw);
   39169           0 :     case METH_NOARGS:
   39170           0 :         if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
   39171             : #if CYTHON_ASSUME_SAFE_MACROS
   39172           0 :             size = PyTuple_GET_SIZE(arg);
   39173             : #else
   39174             :             size = PyTuple_Size(arg);
   39175             :             if (unlikely(size < 0)) return NULL;
   39176             : #endif
   39177           0 :             if (likely(size == 0))
   39178           0 :                 return (*meth)(self, NULL);
   39179             : #if CYTHON_COMPILING_IN_LIMITED_API
   39180             :             py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL);
   39181             :             if (!py_name) return NULL;
   39182             :             PyErr_Format(PyExc_TypeError,
   39183             :                 "%.200S() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
   39184             :                 py_name, size);
   39185             :             Py_DECREF(py_name);
   39186             : #else
   39187           0 :             PyErr_Format(PyExc_TypeError,
   39188             :                 "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
   39189           0 :                 f->m_ml->ml_name, size);
   39190             : #endif
   39191           0 :             return NULL;
   39192             :         }
   39193             :         break;
   39194           0 :     case METH_O:
   39195           0 :         if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
   39196             : #if CYTHON_ASSUME_SAFE_MACROS
   39197           0 :             size = PyTuple_GET_SIZE(arg);
   39198             : #else
   39199             :             size = PyTuple_Size(arg);
   39200             :             if (unlikely(size < 0)) return NULL;
   39201             : #endif
   39202           0 :             if (likely(size == 1)) {
   39203           0 :                 PyObject *result, *arg0;
   39204             :                 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
   39205           0 :                 arg0 = PyTuple_GET_ITEM(arg, 0);
   39206             :                 #else
   39207             :                 arg0 = __Pyx_PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL;
   39208             :                 #endif
   39209           0 :                 result = (*meth)(self, arg0);
   39210             :                 #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
   39211             :                 Py_DECREF(arg0);
   39212             :                 #endif
   39213           0 :                 return result;
   39214             :             }
   39215             : #if CYTHON_COMPILING_IN_LIMITED_API
   39216             :             py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL);
   39217             :             if (!py_name) return NULL;
   39218             :             PyErr_Format(PyExc_TypeError,
   39219             :                 "%.200S() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
   39220             :                 py_name, size);
   39221             :             Py_DECREF(py_name);
   39222             : #else
   39223           0 :             PyErr_Format(PyExc_TypeError,
   39224             :                 "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
   39225           0 :                 f->m_ml->ml_name, size);
   39226             : #endif
   39227           0 :             return NULL;
   39228             :         }
   39229             :         break;
   39230           0 :     default:
   39231           0 :         PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction");
   39232           0 :         return NULL;
   39233             :     }
   39234             : #if CYTHON_COMPILING_IN_LIMITED_API
   39235             :     py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL);
   39236             :     if (!py_name) return NULL;
   39237             :     PyErr_Format(PyExc_TypeError, "%.200S() takes no keyword arguments",
   39238             :                  py_name);
   39239             :     Py_DECREF(py_name);
   39240             : #else
   39241           0 :     PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
   39242           0 :                  f->m_ml->ml_name);
   39243             : #endif
   39244           0 :     return NULL;
   39245             : }
   39246           0 : static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
   39247           0 :     PyObject *self, *result;
   39248             : #if CYTHON_COMPILING_IN_LIMITED_API
   39249             :     self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)func)->func);
   39250             :     if (unlikely(!self) && PyErr_Occurred()) return NULL;
   39251             : #else
   39252           0 :     self = ((PyCFunctionObject*)func)->m_self;
   39253             : #endif
   39254           0 :     result = __Pyx_CyFunction_CallMethod(func, self, arg, kw);
   39255           0 :     return result;
   39256             : }
   39257           0 : static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
   39258           0 :     PyObject *result;
   39259           0 :     __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
   39260             : #if CYTHON_METH_FASTCALL
   39261           0 :      __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc);
   39262           0 :     if (vc) {
   39263             : #if CYTHON_ASSUME_SAFE_MACROS
   39264           0 :         return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (size_t)PyTuple_GET_SIZE(args), kw);
   39265             : #else
   39266             :         (void) &__Pyx_PyVectorcall_FastCallDict;
   39267             :         return PyVectorcall_Call(func, args, kw);
   39268             : #endif
   39269             :     }
   39270             : #endif
   39271           0 :     if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
   39272           0 :         Py_ssize_t argc;
   39273           0 :         PyObject *new_args;
   39274           0 :         PyObject *self;
   39275             : #if CYTHON_ASSUME_SAFE_MACROS
   39276           0 :         argc = PyTuple_GET_SIZE(args);
   39277             : #else
   39278             :         argc = PyTuple_Size(args);
   39279             :         if (unlikely(!argc) < 0) return NULL;
   39280             : #endif
   39281           0 :         new_args = PyTuple_GetSlice(args, 1, argc);
   39282           0 :         if (unlikely(!new_args))
   39283             :             return NULL;
   39284           0 :         self = PyTuple_GetItem(args, 0);
   39285           0 :         if (unlikely(!self)) {
   39286           0 :             Py_DECREF(new_args);
   39287             : #if PY_MAJOR_VERSION > 2
   39288           0 :             PyErr_Format(PyExc_TypeError,
   39289             :                          "unbound method %.200S() needs an argument",
   39290             :                          cyfunc->func_qualname);
   39291             : #else
   39292             :             PyErr_SetString(PyExc_TypeError,
   39293             :                             "unbound method needs an argument");
   39294             : #endif
   39295           0 :             return NULL;
   39296             :         }
   39297           0 :         result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
   39298           0 :         Py_DECREF(new_args);
   39299             :     } else {
   39300           0 :         result = __Pyx_CyFunction_Call(func, args, kw);
   39301             :     }
   39302             :     return result;
   39303             : }
   39304             : #if CYTHON_METH_FASTCALL
   39305        6982 : static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(__pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames)
   39306             : {
   39307        6982 :     int ret = 0;
   39308        6982 :     if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
   39309           0 :         if (unlikely(nargs < 1)) {
   39310           0 :             PyErr_Format(PyExc_TypeError, "%.200s() needs an argument",
   39311           0 :                          ((PyCFunctionObject*)cyfunc)->m_ml->ml_name);
   39312           0 :             return -1;
   39313             :         }
   39314             :         ret = 1;
   39315             :     }
   39316        6982 :     if (unlikely(kwnames) && unlikely(PyTuple_GET_SIZE(kwnames))) {
   39317           0 :         PyErr_Format(PyExc_TypeError,
   39318           0 :                      "%.200s() takes no keyword arguments", ((PyCFunctionObject*)cyfunc)->m_ml->ml_name);
   39319           0 :         return -1;
   39320             :     }
   39321             :     return ret;
   39322             : }
   39323           0 : static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
   39324             : {
   39325           0 :     __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
   39326           0 :     PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
   39327             : #if CYTHON_BACKPORT_VECTORCALL
   39328             :     Py_ssize_t nargs = (Py_ssize_t)nargsf;
   39329             : #else
   39330           0 :     Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
   39331             : #endif
   39332           0 :     PyObject *self;
   39333           0 :     switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) {
   39334           0 :     case 1:
   39335           0 :         self = args[0];
   39336           0 :         args += 1;
   39337           0 :         nargs -= 1;
   39338           0 :         break;
   39339           0 :     case 0:
   39340           0 :         self = ((PyCFunctionObject*)cyfunc)->m_self;
   39341           0 :         break;
   39342             :     default:
   39343             :         return NULL;
   39344             :     }
   39345           0 :     if (unlikely(nargs != 0)) {
   39346           0 :         PyErr_Format(PyExc_TypeError,
   39347             :             "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
   39348             :             def->ml_name, nargs);
   39349           0 :         return NULL;
   39350             :     }
   39351           0 :     return def->ml_meth(self, NULL);
   39352             : }
   39353           0 : static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
   39354             : {
   39355           0 :     __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
   39356           0 :     PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
   39357             : #if CYTHON_BACKPORT_VECTORCALL
   39358             :     Py_ssize_t nargs = (Py_ssize_t)nargsf;
   39359             : #else
   39360           0 :     Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
   39361             : #endif
   39362           0 :     PyObject *self;
   39363           0 :     switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) {
   39364           0 :     case 1:
   39365           0 :         self = args[0];
   39366           0 :         args += 1;
   39367           0 :         nargs -= 1;
   39368           0 :         break;
   39369           0 :     case 0:
   39370           0 :         self = ((PyCFunctionObject*)cyfunc)->m_self;
   39371           0 :         break;
   39372             :     default:
   39373             :         return NULL;
   39374             :     }
   39375           0 :     if (unlikely(nargs != 1)) {
   39376           0 :         PyErr_Format(PyExc_TypeError,
   39377             :             "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
   39378             :             def->ml_name, nargs);
   39379           0 :         return NULL;
   39380             :     }
   39381           0 :     return def->ml_meth(self, args[0]);
   39382             : }
   39383        6982 : static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
   39384             : {
   39385        6982 :     __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
   39386        6982 :     PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
   39387             : #if CYTHON_BACKPORT_VECTORCALL
   39388             :     Py_ssize_t nargs = (Py_ssize_t)nargsf;
   39389             : #else
   39390        6982 :     Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
   39391             : #endif
   39392        6982 :     PyObject *self;
   39393        6982 :     switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) {
   39394           0 :     case 1:
   39395           0 :         self = args[0];
   39396           0 :         args += 1;
   39397           0 :         nargs -= 1;
   39398           0 :         break;
   39399        6982 :     case 0:
   39400        6982 :         self = ((PyCFunctionObject*)cyfunc)->m_self;
   39401        6982 :         break;
   39402             :     default:
   39403             :         return NULL;
   39404             :     }
   39405        6982 :     return ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))def->ml_meth)(self, args, nargs, kwnames);
   39406             : }
   39407           0 : static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
   39408             : {
   39409           0 :     __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
   39410           0 :     PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
   39411           0 :     PyTypeObject *cls = (PyTypeObject *) __Pyx_CyFunction_GetClassObj(cyfunc);
   39412             : #if CYTHON_BACKPORT_VECTORCALL
   39413             :     Py_ssize_t nargs = (Py_ssize_t)nargsf;
   39414             : #else
   39415           0 :     Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
   39416             : #endif
   39417           0 :     PyObject *self;
   39418           0 :     switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) {
   39419           0 :     case 1:
   39420           0 :         self = args[0];
   39421           0 :         args += 1;
   39422           0 :         nargs -= 1;
   39423           0 :         break;
   39424           0 :     case 0:
   39425           0 :         self = ((PyCFunctionObject*)cyfunc)->m_self;
   39426           0 :         break;
   39427             :     default:
   39428             :         return NULL;
   39429             :     }
   39430           0 :     return ((__Pyx_PyCMethod)(void(*)(void))def->ml_meth)(self, cls, args, (size_t)nargs, kwnames);
   39431             : }
   39432             : #endif
   39433             : #if CYTHON_USE_TYPE_SPECS
   39434             : static PyType_Slot __pyx_CyFunctionType_slots[] = {
   39435             :     {Py_tp_dealloc, (void *)__Pyx_CyFunction_dealloc},
   39436             :     {Py_tp_repr, (void *)__Pyx_CyFunction_repr},
   39437             :     {Py_tp_call, (void *)__Pyx_CyFunction_CallAsMethod},
   39438             :     {Py_tp_traverse, (void *)__Pyx_CyFunction_traverse},
   39439             :     {Py_tp_clear, (void *)__Pyx_CyFunction_clear},
   39440             :     {Py_tp_methods, (void *)__pyx_CyFunction_methods},
   39441             :     {Py_tp_members, (void *)__pyx_CyFunction_members},
   39442             :     {Py_tp_getset, (void *)__pyx_CyFunction_getsets},
   39443             :     {Py_tp_descr_get, (void *)__Pyx_PyMethod_New},
   39444             :     {0, 0},
   39445             : };
   39446             : static PyType_Spec __pyx_CyFunctionType_spec = {
   39447             :     __PYX_TYPE_MODULE_PREFIX "cython_function_or_method",
   39448             :     sizeof(__pyx_CyFunctionObject),
   39449             :     0,
   39450             : #ifdef Py_TPFLAGS_METHOD_DESCRIPTOR
   39451             :     Py_TPFLAGS_METHOD_DESCRIPTOR |
   39452             : #endif
   39453             : #if (defined(_Py_TPFLAGS_HAVE_VECTORCALL) && CYTHON_METH_FASTCALL)
   39454             :     _Py_TPFLAGS_HAVE_VECTORCALL |
   39455             : #endif
   39456             :     Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE,
   39457             :     __pyx_CyFunctionType_slots
   39458             : };
   39459             : #else
   39460             : static PyTypeObject __pyx_CyFunctionType_type = {
   39461             :     PyVarObject_HEAD_INIT(0, 0)
   39462             :     __PYX_TYPE_MODULE_PREFIX "cython_function_or_method",
   39463             :     sizeof(__pyx_CyFunctionObject),
   39464             :     0,
   39465             :     (destructor) __Pyx_CyFunction_dealloc,
   39466             : #if !CYTHON_METH_FASTCALL
   39467             :     0,
   39468             : #elif CYTHON_BACKPORT_VECTORCALL
   39469             :     (printfunc)offsetof(__pyx_CyFunctionObject, func_vectorcall),
   39470             : #else
   39471             :     offsetof(PyCFunctionObject, vectorcall),
   39472             : #endif
   39473             :     0,
   39474             :     0,
   39475             : #if PY_MAJOR_VERSION < 3
   39476             :     0,
   39477             : #else
   39478             :     0,
   39479             : #endif
   39480             :     (reprfunc) __Pyx_CyFunction_repr,
   39481             :     0,
   39482             :     0,
   39483             :     0,
   39484             :     0,
   39485             :     __Pyx_CyFunction_CallAsMethod,
   39486             :     0,
   39487             :     0,
   39488             :     0,
   39489             :     0,
   39490             : #ifdef Py_TPFLAGS_METHOD_DESCRIPTOR
   39491             :     Py_TPFLAGS_METHOD_DESCRIPTOR |
   39492             : #endif
   39493             : #if defined(_Py_TPFLAGS_HAVE_VECTORCALL) && CYTHON_METH_FASTCALL
   39494             :     _Py_TPFLAGS_HAVE_VECTORCALL |
   39495             : #endif
   39496             :     Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE,
   39497             :     0,
   39498             :     (traverseproc) __Pyx_CyFunction_traverse,
   39499             :     (inquiry) __Pyx_CyFunction_clear,
   39500             :     0,
   39501             : #if PY_VERSION_HEX < 0x030500A0
   39502             :     offsetof(__pyx_CyFunctionObject, func_weakreflist),
   39503             : #else
   39504             :     offsetof(PyCFunctionObject, m_weakreflist),
   39505             : #endif
   39506             :     0,
   39507             :     0,
   39508             :     __pyx_CyFunction_methods,
   39509             :     __pyx_CyFunction_members,
   39510             :     __pyx_CyFunction_getsets,
   39511             :     0,
   39512             :     0,
   39513             :     __Pyx_PyMethod_New,
   39514             :     0,
   39515             :     offsetof(__pyx_CyFunctionObject, func_dict),
   39516             :     0,
   39517             :     0,
   39518             :     0,
   39519             :     0,
   39520             :     0,
   39521             :     0,
   39522             :     0,
   39523             :     0,
   39524             :     0,
   39525             :     0,
   39526             :     0,
   39527             :     0,
   39528             : #if PY_VERSION_HEX >= 0x030400a1
   39529             :     0,
   39530             : #endif
   39531             : #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
   39532             :     0,
   39533             : #endif
   39534             : #if __PYX_NEED_TP_PRINT_SLOT
   39535             :     0,
   39536             : #endif
   39537             : #if PY_VERSION_HEX >= 0x030C0000
   39538             :     0,
   39539             : #endif
   39540             : #if PY_VERSION_HEX >= 0x030d00A4
   39541             :     0,
   39542             : #endif
   39543             : #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
   39544             :     0,
   39545             : #endif
   39546             : };
   39547             : #endif
   39548           3 : static int __pyx_CyFunction_init(PyObject *module) {
   39549             : #if CYTHON_USE_TYPE_SPECS
   39550             :     __pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec(module, &__pyx_CyFunctionType_spec, NULL);
   39551             : #else
   39552           3 :     CYTHON_UNUSED_VAR(module);
   39553           3 :     __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
   39554             : #endif
   39555           3 :     if (unlikely(__pyx_CyFunctionType == NULL)) {
   39556           0 :         return -1;
   39557             :     }
   39558             :     return 0;
   39559             : }
   39560          21 : static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
   39561          21 :     __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
   39562          21 :     m->defaults = PyObject_Malloc(size);
   39563          21 :     if (unlikely(!m->defaults))
   39564           0 :         return PyErr_NoMemory();
   39565          21 :     memset(m->defaults, 0, size);
   39566          21 :     m->defaults_pyobjects = pyobjects;
   39567          21 :     m->defaults_size = size;
   39568          21 :     return m->defaults;
   39569             : }
   39570          24 : static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
   39571          24 :     __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
   39572          24 :     m->defaults_tuple = tuple;
   39573          30 :     Py_INCREF(tuple);
   39574             : }
   39575             : static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
   39576             :     __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
   39577             :     m->defaults_kwdict = dict;
   39578             :     Py_INCREF(dict);
   39579             : }
   39580             : static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
   39581             :     __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
   39582             :     m->func_annotations = dict;
   39583             :     Py_INCREF(dict);
   39584             : }
   39585             : 
   39586             : /* CythonFunction */
   39587          54 : static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname,
   39588             :                                       PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
   39589          54 :     PyObject *op = __Pyx_CyFunction_Init(
   39590          54 :         PyObject_GC_New(__pyx_CyFunctionObject, __pyx_CyFunctionType),
   39591             :         ml, flags, qualname, closure, module, globals, code
   39592             :     );
   39593          54 :     if (likely(op)) {
   39594          54 :         PyObject_GC_Track(op);
   39595             :     }
   39596          54 :     return op;
   39597             : }
   39598             : 
   39599             : /* CalculateMetaclass */
   39600           9 : static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) {
   39601           9 :     Py_ssize_t i, nbases;
   39602             : #if CYTHON_ASSUME_SAFE_MACROS
   39603           9 :     nbases = PyTuple_GET_SIZE(bases);
   39604             : #else
   39605             :     nbases = PyTuple_Size(bases);
   39606             :     if (nbases < 0) return NULL;
   39607             : #endif
   39608          18 :     for (i=0; i < nbases; i++) {
   39609           9 :         PyTypeObject *tmptype;
   39610             : #if CYTHON_ASSUME_SAFE_MACROS
   39611           9 :         PyObject *tmp = PyTuple_GET_ITEM(bases, i);
   39612             : #else
   39613             :         PyObject *tmp = PyTuple_GetItem(bases, i);
   39614             :         if (!tmp) return NULL;
   39615             : #endif
   39616           9 :         tmptype = Py_TYPE(tmp);
   39617             : #if PY_MAJOR_VERSION < 3
   39618             :         if (tmptype == &PyClass_Type)
   39619             :             continue;
   39620             : #endif
   39621           9 :         if (!metaclass) {
   39622           9 :             metaclass = tmptype;
   39623           9 :             continue;
   39624             :         }
   39625           0 :         if (PyType_IsSubtype(metaclass, tmptype))
   39626           0 :             continue;
   39627           0 :         if (PyType_IsSubtype(tmptype, metaclass)) {
   39628           0 :             metaclass = tmptype;
   39629           0 :             continue;
   39630             :         }
   39631           0 :         PyErr_SetString(PyExc_TypeError,
   39632             :                         "metaclass conflict: "
   39633             :                         "the metaclass of a derived class "
   39634             :                         "must be a (non-strict) subclass "
   39635             :                         "of the metaclasses of all its bases");
   39636           0 :         return NULL;
   39637             :     }
   39638           9 :     if (!metaclass) {
   39639             : #if PY_MAJOR_VERSION < 3
   39640             :         metaclass = &PyClass_Type;
   39641             : #else
   39642           0 :         metaclass = &PyType_Type;
   39643             : #endif
   39644             :     }
   39645           9 :     Py_INCREF((PyObject*) metaclass);
   39646             :     return (PyObject*) metaclass;
   39647             : }
   39648             : 
   39649             : /* PyObjectCall2Args */
   39650             : static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
   39651             :     PyObject *args[3] = {NULL, arg1, arg2};
   39652             :     return __Pyx_PyObject_FastCall(function, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
   39653             : }
   39654             : 
   39655             : /* PyObjectLookupSpecial */
   39656             : #if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
   39657             : static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error) {
   39658             :     PyObject *res;
   39659             :     PyTypeObject *tp = Py_TYPE(obj);
   39660             : #if PY_MAJOR_VERSION < 3
   39661             :     if (unlikely(PyInstance_Check(obj)))
   39662             :         return with_error ? __Pyx_PyObject_GetAttrStr(obj, attr_name) : __Pyx_PyObject_GetAttrStrNoError(obj, attr_name);
   39663             : #endif
   39664             :     res = _PyType_Lookup(tp, attr_name);
   39665             :     if (likely(res)) {
   39666             :         descrgetfunc f = Py_TYPE(res)->tp_descr_get;
   39667             :         if (!f) {
   39668             :             Py_INCREF(res);
   39669             :         } else {
   39670             :             res = f(res, obj, (PyObject *)tp);
   39671             :         }
   39672             :     } else if (with_error) {
   39673             :         PyErr_SetObject(PyExc_AttributeError, attr_name);
   39674             :     }
   39675             :     return res;
   39676             : }
   39677             : #endif
   39678             : 
   39679             : /* Py3ClassCreate */
   39680          12 : static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name,
   39681             :                                            PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) {
   39682          12 :     PyObject *ns;
   39683          12 :     if (metaclass) {
   39684           9 :         PyObject *prep = __Pyx_PyObject_GetAttrStrNoError(metaclass, __pyx_n_s_prepare);
   39685           9 :         if (prep) {
   39686           9 :             PyObject *pargs[3] = {NULL, name, bases};
   39687           9 :             ns = __Pyx_PyObject_FastCallDict(prep, pargs+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, mkw);
   39688          18 :             Py_DECREF(prep);
   39689             :         } else {
   39690           0 :             if (unlikely(PyErr_Occurred()))
   39691             :                 return NULL;
   39692           0 :             ns = PyDict_New();
   39693             :         }
   39694             :     } else {
   39695           3 :         ns = PyDict_New();
   39696             :     }
   39697          12 :     if (unlikely(!ns))
   39698             :         return NULL;
   39699          12 :     if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)) goto bad;
   39700             : #if PY_VERSION_HEX >= 0x03030000
   39701          12 :     if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad;
   39702             : #else
   39703             :     CYTHON_MAYBE_UNUSED_VAR(qualname);
   39704             : #endif
   39705          12 :     if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) goto bad;
   39706             :     return ns;
   39707           0 : bad:
   39708           0 :     Py_DECREF(ns);
   39709             :     return NULL;
   39710             : }
   39711             : #if PY_VERSION_HEX < 0x030600A4 && CYTHON_PEP487_INIT_SUBCLASS
   39712             : static int __Pyx_SetNamesPEP487(PyObject *type_obj) {
   39713             :     PyTypeObject *type = (PyTypeObject*) type_obj;
   39714             :     PyObject *names_to_set, *key, *value, *set_name, *tmp;
   39715             :     Py_ssize_t i = 0;
   39716             : #if CYTHON_USE_TYPE_SLOTS
   39717             :     names_to_set = PyDict_Copy(type->tp_dict);
   39718             : #else
   39719             :     {
   39720             :         PyObject *d = PyObject_GetAttr(type_obj, __pyx_n_s_dict);
   39721             :         names_to_set = NULL;
   39722             :         if (likely(d)) {
   39723             :             PyObject *names_to_set = PyDict_New();
   39724             :             int ret = likely(names_to_set) ? PyDict_Update(names_to_set, d) : -1;
   39725             :             Py_DECREF(d);
   39726             :             if (unlikely(ret < 0))
   39727             :                 Py_CLEAR(names_to_set);
   39728             :         }
   39729             :     }
   39730             : #endif
   39731             :     if (unlikely(names_to_set == NULL))
   39732             :         goto bad;
   39733             :     while (PyDict_Next(names_to_set, &i, &key, &value)) {
   39734             :         set_name = __Pyx_PyObject_LookupSpecialNoError(value, __pyx_n_s_set_name);
   39735             :         if (unlikely(set_name != NULL)) {
   39736             :             tmp = __Pyx_PyObject_Call2Args(set_name, type_obj, key);
   39737             :             Py_DECREF(set_name);
   39738             :             if (unlikely(tmp == NULL)) {
   39739             :                 __Pyx_TypeName value_type_name =
   39740             :                     __Pyx_PyType_GetName(Py_TYPE(value));
   39741             :                 __Pyx_TypeName type_name = __Pyx_PyType_GetName(type);
   39742             :                 PyErr_Format(PyExc_RuntimeError,
   39743             : #if PY_MAJOR_VERSION >= 3
   39744             :                     "Error calling __set_name__ on '" __Pyx_FMT_TYPENAME "' instance %R " "in '" __Pyx_FMT_TYPENAME "'",
   39745             :                     value_type_name, key, type_name);
   39746             : #else
   39747             :                     "Error calling __set_name__ on '" __Pyx_FMT_TYPENAME "' instance %.100s in '" __Pyx_FMT_TYPENAME "'",
   39748             :                     value_type_name,
   39749             :                     PyString_Check(key) ? PyString_AS_STRING(key) : "?",
   39750             :                     type_name);
   39751             : #endif
   39752             :                 goto bad;
   39753             :             } else {
   39754             :                 Py_DECREF(tmp);
   39755             :             }
   39756             :         }
   39757             :         else if (unlikely(PyErr_Occurred())) {
   39758             :             goto bad;
   39759             :         }
   39760             :     }
   39761             :     Py_DECREF(names_to_set);
   39762             :     return 0;
   39763             : bad:
   39764             :     Py_XDECREF(names_to_set);
   39765             :     return -1;
   39766             : }
   39767             : static PyObject *__Pyx_InitSubclassPEP487(PyObject *type_obj, PyObject *mkw) {
   39768             : #if CYTHON_USE_TYPE_SLOTS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
   39769             :     PyTypeObject *type = (PyTypeObject*) type_obj;
   39770             :     PyObject *mro = type->tp_mro;
   39771             :     Py_ssize_t i, nbases;
   39772             :     if (unlikely(!mro)) goto done;
   39773             :     (void) &__Pyx_GetBuiltinName;
   39774             :     Py_INCREF(mro);
   39775             :     nbases = PyTuple_GET_SIZE(mro);
   39776             :     assert(PyTuple_GET_ITEM(mro, 0) == type_obj);
   39777             :     for (i = 1; i < nbases-1; i++) {
   39778             :         PyObject *base, *dict, *meth;
   39779             :         base = PyTuple_GET_ITEM(mro, i);
   39780             :         dict = ((PyTypeObject *)base)->tp_dict;
   39781             :         meth = __Pyx_PyDict_GetItemStrWithError(dict, __pyx_n_s_init_subclass);
   39782             :         if (unlikely(meth)) {
   39783             :             descrgetfunc f = Py_TYPE(meth)->tp_descr_get;
   39784             :             PyObject *res;
   39785             :             Py_INCREF(meth);
   39786             :             if (likely(f)) {
   39787             :                 res = f(meth, NULL, type_obj);
   39788             :                 Py_DECREF(meth);
   39789             :                 if (unlikely(!res)) goto bad;
   39790             :                 meth = res;
   39791             :             }
   39792             :             res = __Pyx_PyObject_FastCallDict(meth, NULL, 0, mkw);
   39793             :             Py_DECREF(meth);
   39794             :             if (unlikely(!res)) goto bad;
   39795             :             Py_DECREF(res);
   39796             :             goto done;
   39797             :         } else if (unlikely(PyErr_Occurred())) {
   39798             :             goto bad;
   39799             :         }
   39800             :     }
   39801             : done:
   39802             :     Py_XDECREF(mro);
   39803             :     return type_obj;
   39804             : bad:
   39805             :     Py_XDECREF(mro);
   39806             :     Py_DECREF(type_obj);
   39807             :     return NULL;
   39808             : #else
   39809             :     PyObject *super_type, *super, *func, *res;
   39810             : #if CYTHON_COMPILING_IN_PYPY && !defined(PySuper_Type)
   39811             :     super_type = __Pyx_GetBuiltinName(__pyx_n_s_super);
   39812             : #else
   39813             :     super_type = (PyObject*) &PySuper_Type;
   39814             :     (void) &__Pyx_GetBuiltinName;
   39815             : #endif
   39816             :     super = likely(super_type) ? __Pyx_PyObject_Call2Args(super_type, type_obj, type_obj) : NULL;
   39817             : #if CYTHON_COMPILING_IN_PYPY && !defined(PySuper_Type)
   39818             :     Py_XDECREF(super_type);
   39819             : #endif
   39820             :     if (unlikely(!super)) {
   39821             :         Py_CLEAR(type_obj);
   39822             :         goto done;
   39823             :     }
   39824             :     func = __Pyx_PyObject_GetAttrStrNoError(super, __pyx_n_s_init_subclass);
   39825             :     Py_DECREF(super);
   39826             :     if (likely(!func)) {
   39827             :         if (unlikely(PyErr_Occurred()))
   39828             :             Py_CLEAR(type_obj);
   39829             :         goto done;
   39830             :     }
   39831             :     res = __Pyx_PyObject_FastCallDict(func, NULL, 0, mkw);
   39832             :     Py_DECREF(func);
   39833             :     if (unlikely(!res))
   39834             :         Py_CLEAR(type_obj);
   39835             :     Py_XDECREF(res);
   39836             : done:
   39837             :     return type_obj;
   39838             : #endif
   39839             : }
   39840             : #endif
   39841          12 : static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases,
   39842             :                                       PyObject *dict, PyObject *mkw,
   39843             :                                       int calculate_metaclass, int allow_py2_metaclass) {
   39844          12 :     PyObject *result;
   39845          12 :     PyObject *owned_metaclass = NULL;
   39846          12 :     PyObject *margs[4] = {NULL, name, bases, dict};
   39847          12 :     if (allow_py2_metaclass) {
   39848           0 :         owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass);
   39849           0 :         if (owned_metaclass) {
   39850             :             metaclass = owned_metaclass;
   39851           0 :         } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) {
   39852           0 :             PyErr_Clear();
   39853             :         } else {
   39854             :             return NULL;
   39855             :         }
   39856             :     }
   39857          12 :     if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) {
   39858           0 :         metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases);
   39859           0 :         Py_XDECREF(owned_metaclass);
   39860           0 :         if (unlikely(!metaclass))
   39861             :             return NULL;
   39862             :         owned_metaclass = metaclass;
   39863             :     }
   39864          12 :     result = __Pyx_PyObject_FastCallDict(metaclass, margs+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET,
   39865             : #if PY_VERSION_HEX < 0x030600A4
   39866             :         (metaclass == (PyObject*)&PyType_Type) ? NULL : mkw
   39867             : #else
   39868             :         mkw
   39869             : #endif
   39870             :     );
   39871          12 :     Py_XDECREF(owned_metaclass);
   39872             : #if PY_VERSION_HEX < 0x030600A4 && CYTHON_PEP487_INIT_SUBCLASS
   39873             :     if (likely(result) && likely(PyType_Check(result))) {
   39874             :         if (unlikely(__Pyx_SetNamesPEP487(result) < 0)) {
   39875             :             Py_CLEAR(result);
   39876             :         } else {
   39877             :             result = __Pyx_InitSubclassPEP487(result, mkw);
   39878             :         }
   39879             :     }
   39880             : #else
   39881          12 :     (void) &__Pyx_GetBuiltinName;
   39882             : #endif
   39883          12 :     return result;
   39884             : }
   39885             : 
   39886             : /* Py3UpdateBases */
   39887             : static PyObject*
   39888           9 : __Pyx_PEP560_update_bases(PyObject *bases)
   39889             : {
   39890           9 :     Py_ssize_t i, j, size_bases;
   39891           9 :     PyObject *base, *meth, *new_base, *result, *new_bases = NULL;
   39892           9 :     size_bases = PyTuple_GET_SIZE(bases);
   39893          18 :     for (i = 0; i < size_bases; i++) {
   39894           9 :         base  = PyTuple_GET_ITEM(bases, i);
   39895           9 :         if (PyType_Check(base)) {
   39896           9 :             if (new_bases) {
   39897           0 :                 if (PyList_Append(new_bases, base) < 0) {
   39898           0 :                     goto error;
   39899             :                 }
   39900             :             }
   39901           9 :             continue;
   39902             :         }
   39903           0 :         meth = __Pyx_PyObject_GetAttrStrNoError(base, __pyx_n_s_mro_entries);
   39904           0 :         if (!meth && PyErr_Occurred()) {
   39905           0 :             goto error;
   39906             :         }
   39907           0 :         if (!meth) {
   39908           0 :             if (new_bases) {
   39909           0 :                 if (PyList_Append(new_bases, base) < 0) {
   39910           0 :                     goto error;
   39911             :                 }
   39912             :             }
   39913           0 :             continue;
   39914             :         }
   39915           0 :         new_base = __Pyx_PyObject_CallOneArg(meth, bases);
   39916           0 :         Py_DECREF(meth);
   39917           0 :         if (!new_base) {
   39918           0 :             goto error;
   39919             :         }
   39920           0 :         if (!PyTuple_Check(new_base)) {
   39921           0 :             PyErr_SetString(PyExc_TypeError,
   39922             :                             "__mro_entries__ must return a tuple");
   39923           0 :             Py_DECREF(new_base);
   39924           0 :             goto error;
   39925             :         }
   39926           0 :         if (!new_bases) {
   39927           0 :             if (!(new_bases = PyList_New(i))) {
   39928           0 :                 goto error;
   39929             :             }
   39930           0 :             for (j = 0; j < i; j++) {
   39931           0 :                 base = PyTuple_GET_ITEM(bases, j);
   39932           0 :                 PyList_SET_ITEM(new_bases, j, base);
   39933           0 :                 Py_INCREF(base);
   39934             :             }
   39935             :         }
   39936           0 :         j = PyList_GET_SIZE(new_bases);
   39937           0 :         if (PyList_SetSlice(new_bases, j, j, new_base) < 0) {
   39938           0 :             goto error;
   39939             :         }
   39940           9 :         Py_DECREF(new_base);
   39941             :     }
   39942           9 :     if (!new_bases) {
   39943           9 :         Py_INCREF(bases);
   39944           9 :         return bases;
   39945             :     }
   39946           0 :     result = PyList_AsTuple(new_bases);
   39947           0 :     Py_DECREF(new_bases);
   39948             :     return result;
   39949           0 : error:
   39950           0 :     Py_XDECREF(new_bases);
   39951           0 :     return NULL;
   39952             : }
   39953             : 
   39954             : /* FusedFunction */
   39955             : static PyObject *
   39956          18 : __pyx_FusedFunction_New(PyMethodDef *ml, int flags,
   39957             :                         PyObject *qualname, PyObject *closure,
   39958             :                         PyObject *module, PyObject *globals,
   39959             :                         PyObject *code)
   39960             : {
   39961          18 :     PyObject *op = __Pyx_CyFunction_Init(
   39962          18 :         PyObject_GC_New(__pyx_CyFunctionObject, __pyx_FusedFunctionType),
   39963             :         ml, flags, qualname, closure, module, globals, code
   39964             :     );
   39965          18 :     if (likely(op)) {
   39966          18 :         __pyx_FusedFunctionObject *fusedfunc = (__pyx_FusedFunctionObject *) op;
   39967          18 :         fusedfunc->__signatures__ = NULL;
   39968          18 :         fusedfunc->self = NULL;
   39969          18 :         PyObject_GC_Track(op);
   39970             :     }
   39971          18 :     return op;
   39972             : }
   39973             : static void
   39974           0 : __pyx_FusedFunction_dealloc(__pyx_FusedFunctionObject *self)
   39975             : {
   39976           0 :     PyObject_GC_UnTrack(self);
   39977           0 :     Py_CLEAR(self->self);
   39978           0 :     Py_CLEAR(self->__signatures__);
   39979           0 :     __Pyx__CyFunction_dealloc((__pyx_CyFunctionObject *) self);
   39980           0 : }
   39981             : static int
   39982           0 : __pyx_FusedFunction_traverse(__pyx_FusedFunctionObject *self,
   39983             :                              visitproc visit,
   39984             :                              void *arg)
   39985             : {
   39986           0 :     Py_VISIT(self->self);
   39987           0 :     Py_VISIT(self->__signatures__);
   39988           0 :     return __Pyx_CyFunction_traverse((__pyx_CyFunctionObject *) self, visit, arg);
   39989             : }
   39990             : static int
   39991           0 : __pyx_FusedFunction_clear(__pyx_FusedFunctionObject *self)
   39992             : {
   39993           0 :     Py_CLEAR(self->self);
   39994           0 :     Py_CLEAR(self->__signatures__);
   39995           0 :     return __Pyx_CyFunction_clear((__pyx_CyFunctionObject *) self);
   39996             : }
   39997             : static PyObject *
   39998           0 : __pyx_FusedFunction_descr_get(PyObject *self, PyObject *obj, PyObject *type)
   39999             : {
   40000           0 :     __pyx_FusedFunctionObject *func, *meth;
   40001           0 :     func = (__pyx_FusedFunctionObject *) self;
   40002           0 :     if (func->self || func->func.flags & __Pyx_CYFUNCTION_STATICMETHOD) {
   40003           0 :         Py_INCREF(self);
   40004           0 :         return self;
   40005             :     }
   40006           0 :     if (obj == Py_None)
   40007           0 :         obj = NULL;
   40008           0 :     if (func->func.flags & __Pyx_CYFUNCTION_CLASSMETHOD)
   40009           0 :         obj = type;
   40010           0 :     if (obj == NULL) {
   40011           0 :         Py_INCREF(self);
   40012           0 :         return self;
   40013             :     }
   40014           0 :     meth = (__pyx_FusedFunctionObject *) __pyx_FusedFunction_New(
   40015             :                     ((PyCFunctionObject *) func)->m_ml,
   40016             :                     ((__pyx_CyFunctionObject *) func)->flags,
   40017             :                     ((__pyx_CyFunctionObject *) func)->func_qualname,
   40018             :                     ((__pyx_CyFunctionObject *) func)->func_closure,
   40019             :                     ((PyCFunctionObject *) func)->m_module,
   40020             :                     ((__pyx_CyFunctionObject *) func)->func_globals,
   40021             :                     ((__pyx_CyFunctionObject *) func)->func_code);
   40022           0 :     if (unlikely(!meth))
   40023             :         return NULL;
   40024           0 :     if (func->func.defaults) {
   40025           0 :         PyObject **pydefaults;
   40026           0 :         int i;
   40027           0 :         if (unlikely(!__Pyx_CyFunction_InitDefaults(
   40028             :                 (PyObject*)meth,
   40029             :                 func->func.defaults_size,
   40030             :                 func->func.defaults_pyobjects))) {
   40031           0 :             Py_XDECREF((PyObject*)meth);
   40032           0 :             return NULL;
   40033             :         }
   40034           0 :         memcpy(meth->func.defaults, func->func.defaults, func->func.defaults_size);
   40035           0 :         pydefaults = __Pyx_CyFunction_Defaults(PyObject *, meth);
   40036           0 :         for (i = 0; i < meth->func.defaults_pyobjects; i++)
   40037           0 :             Py_XINCREF(pydefaults[i]);
   40038             :     }
   40039           0 :     __Pyx_CyFunction_SetClassObj(meth, __Pyx_CyFunction_GetClassObj(func));
   40040           0 :     Py_XINCREF(func->__signatures__);
   40041           0 :     meth->__signatures__ = func->__signatures__;
   40042           0 :     Py_XINCREF(func->func.defaults_tuple);
   40043           0 :     meth->func.defaults_tuple = func->func.defaults_tuple;
   40044           0 :     Py_XINCREF(obj);
   40045           0 :     meth->self = obj;
   40046           0 :     return (PyObject *) meth;
   40047             : }
   40048             : static PyObject *
   40049           0 : _obj_to_string(PyObject *obj)
   40050             : {
   40051           0 :     if (PyUnicode_CheckExact(obj))
   40052           0 :         return __Pyx_NewRef(obj);
   40053             : #if PY_MAJOR_VERSION == 2
   40054             :     else if (PyString_Check(obj))
   40055             :         return PyUnicode_FromEncodedObject(obj, NULL, "strict");
   40056             : #endif
   40057           0 :     else if (PyType_Check(obj))
   40058           0 :         return PyObject_GetAttr(obj, __pyx_n_s_name_2);
   40059             :     else
   40060           0 :         return PyObject_Unicode(obj);
   40061             : }
   40062             : static PyObject *
   40063           0 : __pyx_FusedFunction_getitem(__pyx_FusedFunctionObject *self, PyObject *idx)
   40064             : {
   40065           0 :     PyObject *signature = NULL;
   40066           0 :     PyObject *unbound_result_func;
   40067           0 :     PyObject *result_func = NULL;
   40068           0 :     if (unlikely(self->__signatures__ == NULL)) {
   40069           0 :         PyErr_SetString(PyExc_TypeError, "Function is not fused");
   40070           0 :         return NULL;
   40071             :     }
   40072           0 :     if (PyTuple_Check(idx)) {
   40073           0 :         Py_ssize_t n = PyTuple_GET_SIZE(idx);
   40074           0 :         PyObject *list = PyList_New(n);
   40075           0 :         int i;
   40076           0 :         if (unlikely(!list))
   40077             :             return NULL;
   40078           0 :         for (i = 0; i < n; i++) {
   40079           0 :             PyObject *string;
   40080             : #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
   40081           0 :             PyObject *item = PyTuple_GET_ITEM(idx, i);
   40082             : #else
   40083             :             PyObject *item = PySequence_ITEM(idx, i);  if (unlikely(!item)) goto __pyx_err;
   40084             : #endif
   40085           0 :             string = _obj_to_string(item);
   40086             : #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
   40087             :             Py_DECREF(item);
   40088             : #endif
   40089           0 :             if (unlikely(!string)) goto __pyx_err;
   40090           0 :             PyList_SET_ITEM(list, i, string);
   40091             :         }
   40092           0 :         signature = PyUnicode_Join(__pyx_kp_u__20, list);
   40093           0 : __pyx_err:;
   40094           0 :         Py_DECREF(list);
   40095             :     } else {
   40096           0 :         signature = _obj_to_string(idx);
   40097             :     }
   40098           0 :     if (unlikely(!signature))
   40099             :         return NULL;
   40100           0 :     unbound_result_func = PyObject_GetItem(self->__signatures__, signature);
   40101           0 :     if (likely(unbound_result_func)) {
   40102           0 :         if (self->self) {
   40103           0 :             __pyx_FusedFunctionObject *unbound = (__pyx_FusedFunctionObject *) unbound_result_func;
   40104           0 :             __Pyx_CyFunction_SetClassObj(unbound, __Pyx_CyFunction_GetClassObj(self));
   40105           0 :             result_func = __pyx_FusedFunction_descr_get(unbound_result_func,
   40106             :                                                         self->self, self->self);
   40107             :         } else {
   40108           0 :             result_func = unbound_result_func;
   40109           0 :             Py_INCREF(result_func);
   40110             :         }
   40111             :     }
   40112           0 :     Py_DECREF(signature);
   40113           0 :     Py_XDECREF(unbound_result_func);
   40114           0 :     return result_func;
   40115             : }
   40116             : static PyObject *
   40117           0 : __pyx_FusedFunction_callfunction(PyObject *func, PyObject *args, PyObject *kw)
   40118             : {
   40119           0 :      __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
   40120           0 :     int static_specialized = (cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD &&
   40121           0 :                               !((__pyx_FusedFunctionObject *) func)->__signatures__);
   40122           0 :     if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !static_specialized) {
   40123           0 :         return __Pyx_CyFunction_CallAsMethod(func, args, kw);
   40124             :     } else {
   40125           0 :         return __Pyx_CyFunction_Call(func, args, kw);
   40126             :     }
   40127             : }
   40128             : static PyObject *
   40129           0 : __pyx_FusedFunction_call(PyObject *func, PyObject *args, PyObject *kw)
   40130             : {
   40131           0 :     __pyx_FusedFunctionObject *binding_func = (__pyx_FusedFunctionObject *) func;
   40132           0 :     Py_ssize_t argc = PyTuple_GET_SIZE(args);
   40133           0 :     PyObject *new_args = NULL;
   40134           0 :     __pyx_FusedFunctionObject *new_func = NULL;
   40135           0 :     PyObject *result = NULL;
   40136           0 :     int is_staticmethod = binding_func->func.flags & __Pyx_CYFUNCTION_STATICMETHOD;
   40137           0 :     if (binding_func->self) {
   40138           0 :         PyObject *self;
   40139           0 :         Py_ssize_t i;
   40140           0 :         new_args = PyTuple_New(argc + 1);
   40141           0 :         if (unlikely(!new_args))
   40142             :             return NULL;
   40143           0 :         self = binding_func->self;
   40144           0 :         Py_INCREF(self);
   40145           0 :         PyTuple_SET_ITEM(new_args, 0, self);
   40146           0 :         self = NULL;
   40147           0 :         for (i = 0; i < argc; i++) {
   40148             : #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
   40149           0 :             PyObject *item = PyTuple_GET_ITEM(args, i);
   40150           0 :             Py_INCREF(item);
   40151             : #else
   40152             :             PyObject *item = PySequence_ITEM(args, i);  if (unlikely(!item)) goto bad;
   40153             : #endif
   40154           0 :             PyTuple_SET_ITEM(new_args, i + 1, item);
   40155             :         }
   40156             :         args = new_args;
   40157             :     }
   40158           0 :     if (binding_func->__signatures__) {
   40159           0 :         PyObject *tup;
   40160           0 :         if (is_staticmethod && binding_func->func.flags & __Pyx_CYFUNCTION_CCLASS) {
   40161           0 :             tup = PyTuple_Pack(3, args,
   40162             :                                kw == NULL ? Py_None : kw,
   40163             :                                binding_func->func.defaults_tuple);
   40164           0 :             if (unlikely(!tup)) goto bad;
   40165           0 :             new_func = (__pyx_FusedFunctionObject *) __Pyx_CyFunction_CallMethod(
   40166             :                 func, binding_func->__signatures__, tup, NULL);
   40167             :         } else {
   40168           0 :             tup = PyTuple_Pack(4, binding_func->__signatures__, args,
   40169             :                                kw == NULL ? Py_None : kw,
   40170             :                                binding_func->func.defaults_tuple);
   40171           0 :             if (unlikely(!tup)) goto bad;
   40172           0 :             new_func = (__pyx_FusedFunctionObject *) __pyx_FusedFunction_callfunction(func, tup, NULL);
   40173             :         }
   40174           0 :         Py_DECREF(tup);
   40175           0 :         if (unlikely(!new_func))
   40176           0 :             goto bad;
   40177           0 :         __Pyx_CyFunction_SetClassObj(new_func, __Pyx_CyFunction_GetClassObj(binding_func));
   40178           0 :         func = (PyObject *) new_func;
   40179             :     }
   40180           0 :     result = __pyx_FusedFunction_callfunction(func, args, kw);
   40181           0 : bad:
   40182           0 :     Py_XDECREF(new_args);
   40183           0 :     Py_XDECREF((PyObject *) new_func);
   40184           0 :     return result;
   40185             : }
   40186             : static PyMemberDef __pyx_FusedFunction_members[] = {
   40187             :     {(char *) "__signatures__",
   40188             :      T_OBJECT,
   40189             :      offsetof(__pyx_FusedFunctionObject, __signatures__),
   40190             :      READONLY,
   40191             :      0},
   40192             :     {(char *) "__self__", T_OBJECT_EX, offsetof(__pyx_FusedFunctionObject, self), READONLY, 0},
   40193             :     {0, 0, 0, 0, 0},
   40194             : };
   40195             : static PyGetSetDef __pyx_FusedFunction_getsets[] = {
   40196             :     {(char *) "__doc__",  (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
   40197             :     {0, 0, 0, 0, 0}
   40198             : };
   40199             : #if CYTHON_USE_TYPE_SPECS
   40200             : static PyType_Slot __pyx_FusedFunctionType_slots[] = {
   40201             :     {Py_tp_dealloc, (void *)__pyx_FusedFunction_dealloc},
   40202             :     {Py_tp_call, (void *)__pyx_FusedFunction_call},
   40203             :     {Py_tp_traverse, (void *)__pyx_FusedFunction_traverse},
   40204             :     {Py_tp_clear, (void *)__pyx_FusedFunction_clear},
   40205             :     {Py_tp_members, (void *)__pyx_FusedFunction_members},
   40206             :     {Py_tp_getset, (void *)__pyx_FusedFunction_getsets},
   40207             :     {Py_tp_descr_get, (void *)__pyx_FusedFunction_descr_get},
   40208             :     {Py_mp_subscript, (void *)__pyx_FusedFunction_getitem},
   40209             :     {0, 0},
   40210             : };
   40211             : static PyType_Spec __pyx_FusedFunctionType_spec = {
   40212             :     __PYX_TYPE_MODULE_PREFIX "fused_cython_function",
   40213             :     sizeof(__pyx_FusedFunctionObject),
   40214             :     0,
   40215             :     Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE,
   40216             :     __pyx_FusedFunctionType_slots
   40217             : };
   40218             : #else
   40219             : static PyMappingMethods __pyx_FusedFunction_mapping_methods = {
   40220             :     0,
   40221             :     (binaryfunc) __pyx_FusedFunction_getitem,
   40222             :     0,
   40223             : };
   40224             : static PyTypeObject __pyx_FusedFunctionType_type = {
   40225             :     PyVarObject_HEAD_INIT(0, 0)
   40226             :     __PYX_TYPE_MODULE_PREFIX "fused_cython_function",
   40227             :     sizeof(__pyx_FusedFunctionObject),
   40228             :     0,
   40229             :     (destructor) __pyx_FusedFunction_dealloc,
   40230             :     0,
   40231             :     0,
   40232             :     0,
   40233             : #if PY_MAJOR_VERSION < 3
   40234             :     0,
   40235             : #else
   40236             :     0,
   40237             : #endif
   40238             :     0,
   40239             :     0,
   40240             :     0,
   40241             :     &__pyx_FusedFunction_mapping_methods,
   40242             :     0,
   40243             :     (ternaryfunc) __pyx_FusedFunction_call,
   40244             :     0,
   40245             :     0,
   40246             :     0,
   40247             :     0,
   40248             :     Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE,
   40249             :     0,
   40250             :     (traverseproc) __pyx_FusedFunction_traverse,
   40251             :     (inquiry) __pyx_FusedFunction_clear,
   40252             :     0,
   40253             :     0,
   40254             :     0,
   40255             :     0,
   40256             :     0,
   40257             :     __pyx_FusedFunction_members,
   40258             :     __pyx_FusedFunction_getsets,
   40259             :     &__pyx_CyFunctionType_type,
   40260             :     0,
   40261             :     __pyx_FusedFunction_descr_get,
   40262             :     0,
   40263             :     0,
   40264             :     0,
   40265             :     0,
   40266             :     0,
   40267             :     0,
   40268             :     0,
   40269             :     0,
   40270             :     0,
   40271             :     0,
   40272             :     0,
   40273             :     0,
   40274             :     0,
   40275             :     0,
   40276             : #if PY_VERSION_HEX >= 0x030400a1
   40277             :     0,
   40278             : #endif
   40279             : #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
   40280             :     0,
   40281             : #endif
   40282             : #if __PYX_NEED_TP_PRINT_SLOT
   40283             :     0,
   40284             : #endif
   40285             : #if PY_VERSION_HEX >= 0x030C0000
   40286             :     0,
   40287             : #endif
   40288             : #if PY_VERSION_HEX >= 0x030d00A4
   40289             :     0,
   40290             : #endif
   40291             : #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
   40292             :     0,
   40293             : #endif
   40294             : };
   40295             : #endif
   40296           3 : static int __pyx_FusedFunction_init(PyObject *module) {
   40297             : #if CYTHON_USE_TYPE_SPECS
   40298             :     PyObject *bases = PyTuple_Pack(1, __pyx_CyFunctionType);
   40299             :     if (unlikely(!bases)) {
   40300             :         return -1;
   40301             :     }
   40302             :     __pyx_FusedFunctionType = __Pyx_FetchCommonTypeFromSpec(module, &__pyx_FusedFunctionType_spec, bases);
   40303             :     Py_DECREF(bases);
   40304             : #else
   40305           3 :     CYTHON_UNUSED_VAR(module);
   40306           3 :     __pyx_FusedFunctionType_type.tp_base = __pyx_CyFunctionType;
   40307           3 :     __pyx_FusedFunctionType = __Pyx_FetchCommonType(&__pyx_FusedFunctionType_type);
   40308             : #endif
   40309           3 :     if (unlikely(__pyx_FusedFunctionType == NULL)) {
   40310           0 :         return -1;
   40311             :     }
   40312             :     return 0;
   40313             : }
   40314             : 
   40315             : /* CLineInTraceback */
   40316             : #ifndef CYTHON_CLINE_IN_TRACEBACK
   40317          25 : static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) {
   40318          25 :     PyObject *use_cline;
   40319          25 :     PyObject *ptype, *pvalue, *ptraceback;
   40320             : #if CYTHON_COMPILING_IN_CPYTHON
   40321          25 :     PyObject **cython_runtime_dict;
   40322             : #endif
   40323          25 :     CYTHON_MAYBE_UNUSED_VAR(tstate);
   40324          25 :     if (unlikely(!__pyx_cython_runtime)) {
   40325             :         return c_line;
   40326             :     }
   40327          25 :     __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
   40328             : #if CYTHON_COMPILING_IN_CPYTHON
   40329          25 :     cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
   40330          25 :     if (likely(cython_runtime_dict)) {
   40331          25 :         __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
   40332             :             use_cline, *cython_runtime_dict,
   40333             :             __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
   40334             :     } else
   40335             : #endif
   40336             :     {
   40337           0 :       PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStrNoError(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
   40338           0 :       if (use_cline_obj) {
   40339           0 :         use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
   40340           0 :         Py_DECREF(use_cline_obj);
   40341             :       } else {
   40342           0 :         PyErr_Clear();
   40343           0 :         use_cline = NULL;
   40344             :       }
   40345             :     }
   40346          25 :     if (!use_cline) {
   40347           0 :         c_line = 0;
   40348           0 :         (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
   40349             :     }
   40350          25 :     else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
   40351             :         c_line = 0;
   40352             :     }
   40353          25 :     __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
   40354          25 :     return c_line;
   40355             : }
   40356             : #endif
   40357             : 
   40358             : /* CodeObjectCache */
   40359             : #if !CYTHON_COMPILING_IN_LIMITED_API
   40360          34 : static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
   40361          34 :     int start = 0, mid = 0, end = count - 1;
   40362          34 :     if (end >= 0 && code_line > entries[end].code_line) {
   40363             :         return count;
   40364             :     }
   40365          93 :     while (start < end) {
   40366          79 :         mid = start + (end - start) / 2;
   40367          79 :         if (code_line < entries[mid].code_line) {
   40368             :             end = mid;
   40369          45 :         } else if (code_line > entries[mid].code_line) {
   40370          31 :              start = mid + 1;
   40371             :         } else {
   40372          14 :             return mid;
   40373             :         }
   40374             :     }
   40375          14 :     if (code_line <= entries[mid].code_line) {
   40376             :         return mid;
   40377             :     } else {
   40378          12 :         return mid + 1;
   40379             :     }
   40380             : }
   40381          25 : static PyCodeObject *__pyx_find_code_object(int code_line) {
   40382          25 :     PyCodeObject* code_object;
   40383          25 :     int pos;
   40384          25 :     if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
   40385             :         return NULL;
   40386             :     }
   40387          24 :     pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
   40388          24 :     if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
   40389             :         return NULL;
   40390             :     }
   40391          14 :     code_object = __pyx_code_cache.entries[pos].code_object;
   40392          14 :     Py_INCREF(code_object);
   40393             :     return code_object;
   40394             : }
   40395          11 : static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
   40396          11 :     int pos, i;
   40397          11 :     __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
   40398          11 :     if (unlikely(!code_line)) {
   40399             :         return;
   40400             :     }
   40401          11 :     if (unlikely(!entries)) {
   40402           1 :         entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
   40403           1 :         if (likely(entries)) {
   40404           1 :             __pyx_code_cache.entries = entries;
   40405           1 :             __pyx_code_cache.max_count = 64;
   40406           1 :             __pyx_code_cache.count = 1;
   40407           1 :             entries[0].code_line = code_line;
   40408           1 :             entries[0].code_object = code_object;
   40409           1 :             Py_INCREF(code_object);
   40410             :         }
   40411           1 :         return;
   40412             :     }
   40413          10 :     pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
   40414          10 :     if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
   40415           0 :         PyCodeObject* tmp = entries[pos].code_object;
   40416           0 :         entries[pos].code_object = code_object;
   40417           0 :         Py_DECREF(tmp);
   40418           0 :         return;
   40419             :     }
   40420          10 :     if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
   40421           0 :         int new_max = __pyx_code_cache.max_count + 64;
   40422           0 :         entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
   40423           0 :             __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
   40424           0 :         if (unlikely(!entries)) {
   40425             :             return;
   40426             :         }
   40427           0 :         __pyx_code_cache.entries = entries;
   40428           0 :         __pyx_code_cache.max_count = new_max;
   40429             :     }
   40430          41 :     for (i=__pyx_code_cache.count; i>pos; i--) {
   40431          31 :         entries[i] = entries[i-1];
   40432             :     }
   40433          10 :     entries[pos].code_line = code_line;
   40434          10 :     entries[pos].code_object = code_object;
   40435          10 :     __pyx_code_cache.count++;
   40436          10 :     Py_INCREF(code_object);
   40437             : }
   40438             : #endif
   40439             : 
   40440             : /* AddTraceback */
   40441             : #include "compile.h"
   40442             : #include "frameobject.h"
   40443             : #include "traceback.h"
   40444             : #if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API
   40445             :   #ifndef Py_BUILD_CORE
   40446             :     #define Py_BUILD_CORE 1
   40447             :   #endif
   40448             :   #include "internal/pycore_frame.h"
   40449             : #endif
   40450             : #if CYTHON_COMPILING_IN_LIMITED_API
   40451             : static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict,
   40452             :                                                        PyObject *firstlineno, PyObject *name) {
   40453             :     PyObject *replace = NULL;
   40454             :     if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL;
   40455             :     if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL;
   40456             :     replace = PyObject_GetAttrString(code, "replace");
   40457             :     if (likely(replace)) {
   40458             :         PyObject *result;
   40459             :         result = PyObject_Call(replace, __pyx_empty_tuple, scratch_dict);
   40460             :         Py_DECREF(replace);
   40461             :         return result;
   40462             :     }
   40463             :     PyErr_Clear();
   40464             :     #if __PYX_LIMITED_VERSION_HEX < 0x030780000
   40465             :     {
   40466             :         PyObject *compiled = NULL, *result = NULL;
   40467             :         if (unlikely(PyDict_SetItemString(scratch_dict, "code", code))) return NULL;
   40468             :         if (unlikely(PyDict_SetItemString(scratch_dict, "type", (PyObject*)(&PyType_Type)))) return NULL;
   40469             :         compiled = Py_CompileString(
   40470             :             "out = type(code)(\n"
   40471             :             "  code.co_argcount, code.co_kwonlyargcount, code.co_nlocals, code.co_stacksize,\n"
   40472             :             "  code.co_flags, code.co_code, code.co_consts, code.co_names,\n"
   40473             :             "  code.co_varnames, code.co_filename, co_name, co_firstlineno,\n"
   40474             :             "  code.co_lnotab)\n", "<dummy>", Py_file_input);
   40475             :         if (!compiled) return NULL;
   40476             :         result = PyEval_EvalCode(compiled, scratch_dict, scratch_dict);
   40477             :         Py_DECREF(compiled);
   40478             :         if (!result) PyErr_Print();
   40479             :         Py_DECREF(result);
   40480             :         result = PyDict_GetItemString(scratch_dict, "out");
   40481             :         if (result) Py_INCREF(result);
   40482             :         return result;
   40483             :     }
   40484             :     #else
   40485             :     return NULL;
   40486             :     #endif
   40487             : }
   40488             : static void __Pyx_AddTraceback(const char *funcname, int c_line,
   40489             :                                int py_line, const char *filename) {
   40490             :     PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL;
   40491             :     PyObject *replace = NULL, *getframe = NULL, *frame = NULL;
   40492             :     PyObject *exc_type, *exc_value, *exc_traceback;
   40493             :     int success = 0;
   40494             :     if (c_line) {
   40495             :         (void) __pyx_cfilenm;
   40496             :         (void) __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line);
   40497             :     }
   40498             :     PyErr_Fetch(&exc_type, &exc_value, &exc_traceback);
   40499             :     code_object = Py_CompileString("_getframe()", filename, Py_eval_input);
   40500             :     if (unlikely(!code_object)) goto bad;
   40501             :     py_py_line = PyLong_FromLong(py_line);
   40502             :     if (unlikely(!py_py_line)) goto bad;
   40503             :     py_funcname = PyUnicode_FromString(funcname);
   40504             :     if (unlikely(!py_funcname)) goto bad;
   40505             :     dict = PyDict_New();
   40506             :     if (unlikely(!dict)) goto bad;
   40507             :     {
   40508             :         PyObject *old_code_object = code_object;
   40509             :         code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname);
   40510             :         Py_DECREF(old_code_object);
   40511             :     }
   40512             :     if (unlikely(!code_object)) goto bad;
   40513             :     getframe = PySys_GetObject("_getframe");
   40514             :     if (unlikely(!getframe)) goto bad;
   40515             :     if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad;
   40516             :     frame = PyEval_EvalCode(code_object, dict, dict);
   40517             :     if (unlikely(!frame) || frame == Py_None) goto bad;
   40518             :     success = 1;
   40519             :   bad:
   40520             :     PyErr_Restore(exc_type, exc_value, exc_traceback);
   40521             :     Py_XDECREF(code_object);
   40522             :     Py_XDECREF(py_py_line);
   40523             :     Py_XDECREF(py_funcname);
   40524             :     Py_XDECREF(dict);
   40525             :     Py_XDECREF(replace);
   40526             :     if (success) {
   40527             :         PyTraceBack_Here(
   40528             :             (struct _frame*)frame);
   40529             :     }
   40530             :     Py_XDECREF(frame);
   40531             : }
   40532             : #else
   40533          11 : static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
   40534             :             const char *funcname, int c_line,
   40535             :             int py_line, const char *filename) {
   40536          11 :     PyCodeObject *py_code = NULL;
   40537          11 :     PyObject *py_funcname = NULL;
   40538             :     #if PY_MAJOR_VERSION < 3
   40539             :     PyObject *py_srcfile = NULL;
   40540             :     py_srcfile = PyString_FromString(filename);
   40541             :     if (!py_srcfile) goto bad;
   40542             :     #endif
   40543          11 :     if (c_line) {
   40544             :         #if PY_MAJOR_VERSION < 3
   40545             :         py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
   40546             :         if (!py_funcname) goto bad;
   40547             :         #else
   40548           0 :         py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
   40549           0 :         if (!py_funcname) goto bad;
   40550           0 :         funcname = PyUnicode_AsUTF8(py_funcname);
   40551           0 :         if (!funcname) goto bad;
   40552             :         #endif
   40553             :     }
   40554             :     else {
   40555             :         #if PY_MAJOR_VERSION < 3
   40556             :         py_funcname = PyString_FromString(funcname);
   40557             :         if (!py_funcname) goto bad;
   40558             :         #endif
   40559          11 :     }
   40560             :     #if PY_MAJOR_VERSION < 3
   40561             :     py_code = __Pyx_PyCode_New(
   40562             :         0,
   40563             :         0,
   40564             :         0,
   40565             :         0,
   40566             :         0,
   40567             :         0,
   40568             :         __pyx_empty_bytes, /*PyObject *code,*/
   40569             :         __pyx_empty_tuple, /*PyObject *consts,*/
   40570             :         __pyx_empty_tuple, /*PyObject *names,*/
   40571             :         __pyx_empty_tuple, /*PyObject *varnames,*/
   40572             :         __pyx_empty_tuple, /*PyObject *freevars,*/
   40573             :         __pyx_empty_tuple, /*PyObject *cellvars,*/
   40574             :         py_srcfile,   /*PyObject *filename,*/
   40575             :         py_funcname,  /*PyObject *name,*/
   40576             :         py_line,
   40577             :         __pyx_empty_bytes  /*PyObject *lnotab*/
   40578             :     );
   40579             :     Py_DECREF(py_srcfile);
   40580             :     #else
   40581          11 :     py_code = PyCode_NewEmpty(filename, funcname, py_line);
   40582             :     #endif
   40583          11 :     Py_XDECREF(py_funcname);
   40584          11 :     return py_code;
   40585           0 : bad:
   40586           0 :     Py_XDECREF(py_funcname);
   40587             :     #if PY_MAJOR_VERSION < 3
   40588             :     Py_XDECREF(py_srcfile);
   40589             :     #endif
   40590           0 :     return NULL;
   40591             : }
   40592          25 : static void __Pyx_AddTraceback(const char *funcname, int c_line,
   40593             :                                int py_line, const char *filename) {
   40594          25 :     PyCodeObject *py_code = 0;
   40595          25 :     PyFrameObject *py_frame = 0;
   40596          25 :     PyThreadState *tstate = __Pyx_PyThreadState_Current;
   40597          25 :     PyObject *ptype, *pvalue, *ptraceback;
   40598          25 :     if (c_line) {
   40599          25 :         c_line = __Pyx_CLineForTraceback(tstate, c_line);
   40600             :     }
   40601          50 :     py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
   40602          25 :     if (!py_code) {
   40603          11 :         __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
   40604          11 :         py_code = __Pyx_CreateCodeObjectForTraceback(
   40605             :             funcname, c_line, py_line, filename);
   40606          11 :         if (!py_code) {
   40607             :             /* If the code object creation fails, then we should clear the
   40608             :                fetched exception references and propagate the new exception */
   40609           0 :             Py_XDECREF(ptype);
   40610           0 :             Py_XDECREF(pvalue);
   40611           0 :             Py_XDECREF(ptraceback);
   40612           0 :             goto bad;
   40613             :         }
   40614          11 :         __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
   40615          11 :         __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
   40616             :     }
   40617          50 :     py_frame = PyFrame_New(
   40618             :         tstate,            /*PyThreadState *tstate,*/
   40619             :         py_code,           /*PyCodeObject *code,*/
   40620          25 :         __pyx_d,    /*PyObject *globals,*/
   40621             :         0                  /*PyObject *locals*/
   40622             :     );
   40623          25 :     if (!py_frame) goto bad;
   40624          25 :     __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
   40625          25 :     PyTraceBack_Here(py_frame);
   40626          25 : bad:
   40627          25 :     Py_XDECREF(py_code);
   40628          25 :     Py_XDECREF(py_frame);
   40629          25 : }
   40630             : #endif
   40631             : 
   40632             : /* Declarations */
   40633             : #if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
   40634             :   #ifdef __cplusplus
   40635             :     static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
   40636             :       return ::std::complex< double >(x, y);
   40637             :     }
   40638             :   #else
   40639             :     static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
   40640             :       return x + y*(__pyx_t_double_complex)_Complex_I;
   40641             :     }
   40642             :   #endif
   40643             : #else
   40644         920 :     static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
   40645         920 :       __pyx_t_double_complex z;
   40646        1185 :       z.real = x;
   40647          54 :       z.imag = y;
   40648         920 :       return z;
   40649             :     }
   40650             : #endif
   40651             : 
   40652             : /* Arithmetic */
   40653             : #if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
   40654             : #else
   40655             :     static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
   40656             :        return (a.real == b.real) && (a.imag == b.imag);
   40657             :     }
   40658         309 :     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
   40659         309 :         __pyx_t_double_complex z;
   40660         309 :         z.real = a.real + b.real;
   40661         309 :         z.imag = a.imag + b.imag;
   40662         309 :         return z;
   40663             :     }
   40664          49 :     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
   40665          49 :         __pyx_t_double_complex z;
   40666          49 :         z.real = a.real - b.real;
   40667          49 :         z.imag = a.imag - b.imag;
   40668          49 :         return z;
   40669             :     }
   40670         309 :     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
   40671         309 :         __pyx_t_double_complex z;
   40672         309 :         z.real = a.real * b.real - a.imag * b.imag;
   40673         309 :         z.imag = a.real * b.imag + a.imag * b.real;
   40674         162 :         return z;
   40675             :     }
   40676             :     #if 1
   40677         784 :     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
   40678         784 :         if (b.imag == 0) {
   40679         784 :             return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
   40680           0 :         } else if (fabs(b.real) >= fabs(b.imag)) {
   40681           0 :             if (b.real == 0 && b.imag == 0) {
   40682             :                 return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.imag);
   40683             :             } else {
   40684           0 :                 double r = b.imag / b.real;
   40685           0 :                 double s = (double)(1.0) / (b.real + b.imag * r);
   40686           0 :                 return __pyx_t_double_complex_from_parts(
   40687           0 :                     (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
   40688             :             }
   40689             :         } else {
   40690           0 :             double r = b.real / b.imag;
   40691           0 :             double s = (double)(1.0) / (b.imag + b.real * r);
   40692           0 :             return __pyx_t_double_complex_from_parts(
   40693           0 :                 (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
   40694             :         }
   40695             :     }
   40696             :     #else
   40697             :     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
   40698             :         if (b.imag == 0) {
   40699             :             return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
   40700             :         } else {
   40701             :             double denom = b.real * b.real + b.imag * b.imag;
   40702             :             return __pyx_t_double_complex_from_parts(
   40703             :                 (a.real * b.real + a.imag * b.imag) / denom,
   40704             :                 (a.imag * b.real - a.real * b.imag) / denom);
   40705             :         }
   40706             :     }
   40707             :     #endif
   40708             :     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex a) {
   40709             :         __pyx_t_double_complex z;
   40710          98 :         z.real = -a.real;
   40711          98 :         z.imag = -a.imag;
   40712             :         return z;
   40713             :     }
   40714             :     static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex a) {
   40715             :        return (a.real == 0) && (a.imag == 0);
   40716             :     }
   40717             :     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex a) {
   40718             :         __pyx_t_double_complex z;
   40719             :         z.real =  a.real;
   40720             :         z.imag = -a.imag;
   40721             :         return z;
   40722             :     }
   40723             :     #if 1
   40724             :         static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex z) {
   40725             :           #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
   40726             :             return sqrt(z.real*z.real + z.imag*z.imag);
   40727             :           #else
   40728             :             return hypot(z.real, z.imag);
   40729             :           #endif
   40730             :         }
   40731             :         static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
   40732             :             __pyx_t_double_complex z;
   40733             :             double r, lnr, theta, z_r, z_theta;
   40734             :             if (b.imag == 0 && b.real == (int)b.real) {
   40735             :                 if (b.real < 0) {
   40736             :                     double denom = a.real * a.real + a.imag * a.imag;
   40737             :                     a.real = a.real / denom;
   40738             :                     a.imag = -a.imag / denom;
   40739             :                     b.real = -b.real;
   40740             :                 }
   40741             :                 switch ((int)b.real) {
   40742             :                     case 0:
   40743             :                         z.real = 1;
   40744             :                         z.imag = 0;
   40745             :                         return z;
   40746             :                     case 1:
   40747             :                         return a;
   40748             :                     case 2:
   40749             :                         return __Pyx_c_prod_double(a, a);
   40750             :                     case 3:
   40751             :                         z = __Pyx_c_prod_double(a, a);
   40752             :                         return __Pyx_c_prod_double(z, a);
   40753             :                     case 4:
   40754             :                         z = __Pyx_c_prod_double(a, a);
   40755             :                         return __Pyx_c_prod_double(z, z);
   40756             :                 }
   40757             :             }
   40758             :             if (a.imag == 0) {
   40759             :                 if (a.real == 0) {
   40760             :                     return a;
   40761             :                 } else if ((b.imag == 0) && (a.real >= 0)) {
   40762             :                     z.real = pow(a.real, b.real);
   40763             :                     z.imag = 0;
   40764             :                     return z;
   40765             :                 } else if (a.real > 0) {
   40766             :                     r = a.real;
   40767             :                     theta = 0;
   40768             :                 } else {
   40769             :                     r = -a.real;
   40770             :                     theta = atan2(0.0, -1.0);
   40771             :                 }
   40772             :             } else {
   40773             :                 r = __Pyx_c_abs_double(a);
   40774             :                 theta = atan2(a.imag, a.real);
   40775             :             }
   40776             :             lnr = log(r);
   40777             :             z_r = exp(lnr * b.real - theta * b.imag);
   40778             :             z_theta = theta * b.real + lnr * b.imag;
   40779             :             z.real = z_r * cos(z_theta);
   40780             :             z.imag = z_r * sin(z_theta);
   40781             :             return z;
   40782             :         }
   40783             :     #endif
   40784             : #endif
   40785             : 
   40786             : #if PY_MAJOR_VERSION < 3
   40787             : static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) {
   40788             :     __Pyx_TypeName obj_type_name;
   40789             :     if (PyObject_CheckBuffer(obj)) return PyObject_GetBuffer(obj, view, flags);
   40790             :         if (__Pyx_TypeCheck(obj, __pyx_array_type)) return __pyx_array_getbuffer(obj, view, flags);
   40791             :         if (__Pyx_TypeCheck(obj, __pyx_memoryview_type)) return __pyx_memoryview_getbuffer(obj, view, flags);
   40792             :     obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
   40793             :     PyErr_Format(PyExc_TypeError,
   40794             :                  "'" __Pyx_FMT_TYPENAME "' does not have the buffer interface",
   40795             :                  obj_type_name);
   40796             :     __Pyx_DECREF_TypeName(obj_type_name);
   40797             :     return -1;
   40798             : }
   40799             : static void __Pyx_ReleaseBuffer(Py_buffer *view) {
   40800             :     PyObject *obj = view->obj;
   40801             :     if (!obj) return;
   40802             :     if (PyObject_CheckBuffer(obj)) {
   40803             :         PyBuffer_Release(view);
   40804             :         return;
   40805             :     }
   40806             :     if ((0)) {}
   40807             :     view->obj = NULL;
   40808             :     Py_DECREF(obj);
   40809             : }
   40810             : #endif
   40811             : 
   40812             : 
   40813             : /* MemviewSliceIsContig */
   40814             : static int
   40815           0 : __pyx_memviewslice_is_contig(const __Pyx_memviewslice mvs, char order, int ndim)
   40816             : {
   40817           0 :     int i, index, step, start;
   40818           0 :     Py_ssize_t itemsize = mvs.memview->view.itemsize;
   40819           0 :     if (order == 'F') {
   40820             :         step = 1;
   40821             :         start = 0;
   40822             :     } else {
   40823           0 :         step = -1;
   40824           0 :         start = ndim - 1;
   40825             :     }
   40826           0 :     for (i = 0; i < ndim; i++) {
   40827           0 :         index = start + step * i;
   40828           0 :         if (mvs.suboffsets[index] >= 0 || mvs.strides[index] != itemsize)
   40829             :             return 0;
   40830           0 :         itemsize *= mvs.shape[index];
   40831             :     }
   40832             :     return 1;
   40833             : }
   40834             : 
   40835             : /* OverlappingSlices */
   40836             : static void
   40837           0 : __pyx_get_array_memory_extents(__Pyx_memviewslice *slice,
   40838             :                                void **out_start, void **out_end,
   40839             :                                int ndim, size_t itemsize)
   40840             : {
   40841           0 :     char *start, *end;
   40842           0 :     int i;
   40843           0 :     start = end = slice->data;
   40844           0 :     for (i = 0; i < ndim; i++) {
   40845           0 :         Py_ssize_t stride = slice->strides[i];
   40846           0 :         Py_ssize_t extent = slice->shape[i];
   40847           0 :         if (extent == 0) {
   40848           0 :             *out_start = *out_end = start;
   40849           0 :             return;
   40850             :         } else {
   40851           0 :             if (stride > 0)
   40852           0 :                 end += stride * (extent - 1);
   40853             :             else
   40854           0 :                 start += stride * (extent - 1);
   40855             :         }
   40856             :     }
   40857           0 :     *out_start = start;
   40858           0 :     *out_end = end + itemsize;
   40859             : }
   40860             : static int
   40861           0 : __pyx_slices_overlap(__Pyx_memviewslice *slice1,
   40862             :                      __Pyx_memviewslice *slice2,
   40863             :                      int ndim, size_t itemsize)
   40864             : {
   40865           0 :     void *start1, *end1, *start2, *end2;
   40866           0 :     __pyx_get_array_memory_extents(slice1, &start1, &end1, ndim, itemsize);
   40867           0 :     __pyx_get_array_memory_extents(slice2, &start2, &end2, ndim, itemsize);
   40868           0 :     return (start1 < end2) && (start2 < end1);
   40869             : }
   40870             : 
   40871             : /* IsLittleEndian */
   40872           0 : static CYTHON_INLINE int __Pyx_Is_Little_Endian(void)
   40873             : {
   40874           0 :   union {
   40875             :     uint32_t u32;
   40876             :     uint8_t u8[4];
   40877             :   } S;
   40878           0 :   S.u32 = 0x01020304;
   40879           0 :   return S.u8[0] == 4;
   40880             : }
   40881             : 
   40882             : /* BufferFormatCheck */
   40883         579 : static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx,
   40884             :                               __Pyx_BufFmt_StackElem* stack,
   40885             :                               __Pyx_TypeInfo* type) {
   40886         579 :   stack[0].field = &ctx->root;
   40887         579 :   stack[0].parent_offset = 0;
   40888         579 :   ctx->root.type = type;
   40889         579 :   ctx->root.name = "buffer dtype";
   40890         579 :   ctx->root.offset = 0;
   40891         579 :   ctx->head = stack;
   40892         579 :   ctx->head->field = &ctx->root;
   40893         579 :   ctx->fmt_offset = 0;
   40894         579 :   ctx->head->parent_offset = 0;
   40895         579 :   ctx->new_packmode = '@';
   40896         579 :   ctx->enc_packmode = '@';
   40897         579 :   ctx->new_count = 1;
   40898         579 :   ctx->enc_count = 0;
   40899         579 :   ctx->enc_type = 0;
   40900         579 :   ctx->is_complex = 0;
   40901         579 :   ctx->is_valid_array = 0;
   40902         579 :   ctx->struct_alignment = 0;
   40903         579 :   while (type->typegroup == 'S') {
   40904           0 :     ++ctx->head;
   40905           0 :     ctx->head->field = type->fields;
   40906           0 :     ctx->head->parent_offset = 0;
   40907           0 :     type = type->fields->type;
   40908             :   }
   40909         579 : }
   40910           0 : static int __Pyx_BufFmt_ParseNumber(const char** ts) {
   40911           0 :     int count;
   40912           0 :     const char* t = *ts;
   40913           0 :     if (*t < '0' || *t > '9') {
   40914             :       return -1;
   40915             :     } else {
   40916           0 :         count = *t++ - '0';
   40917           0 :         while (*t >= '0' && *t <= '9') {
   40918           0 :             count *= 10;
   40919           0 :             count += *t++ - '0';
   40920             :         }
   40921             :     }
   40922           0 :     *ts = t;
   40923           0 :     return count;
   40924             : }
   40925           0 : static int __Pyx_BufFmt_ExpectNumber(const char **ts) {
   40926           0 :     int number = __Pyx_BufFmt_ParseNumber(ts);
   40927           0 :     if (number == -1)
   40928           0 :         PyErr_Format(PyExc_ValueError,\
   40929           0 :                      "Does not understand character buffer dtype format string ('%c')", **ts);
   40930           0 :     return number;
   40931             : }
   40932           0 : static void __Pyx_BufFmt_RaiseUnexpectedChar(char ch) {
   40933           0 :   PyErr_Format(PyExc_ValueError,
   40934             :                "Unexpected format string character: '%c'", ch);
   40935             : }
   40936           0 : static const char* __Pyx_BufFmt_DescribeTypeChar(char ch, int is_complex) {
   40937           0 :   switch (ch) {
   40938             :     case '?': return "'bool'";
   40939           0 :     case 'c': return "'char'";
   40940           0 :     case 'b': return "'signed char'";
   40941           0 :     case 'B': return "'unsigned char'";
   40942           0 :     case 'h': return "'short'";
   40943           0 :     case 'H': return "'unsigned short'";
   40944           0 :     case 'i': return "'int'";
   40945           0 :     case 'I': return "'unsigned int'";
   40946           0 :     case 'l': return "'long'";
   40947           0 :     case 'L': return "'unsigned long'";
   40948           0 :     case 'q': return "'long long'";
   40949           0 :     case 'Q': return "'unsigned long long'";
   40950           0 :     case 'f': return (is_complex ? "'complex float'" : "'float'");
   40951           0 :     case 'd': return (is_complex ? "'complex double'" : "'double'");
   40952           0 :     case 'g': return (is_complex ? "'complex long double'" : "'long double'");
   40953           0 :     case 'T': return "a struct";
   40954           0 :     case 'O': return "Python object";
   40955           0 :     case 'P': return "a pointer";
   40956           0 :     case 's': case 'p': return "a string";
   40957           0 :     case 0: return "end";
   40958           0 :     default: return "unparsable format string";
   40959             :   }
   40960             : }
   40961           0 : static size_t __Pyx_BufFmt_TypeCharToStandardSize(char ch, int is_complex) {
   40962           0 :   switch (ch) {
   40963             :     case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
   40964           0 :     case 'h': case 'H': return 2;
   40965             :     case 'i': case 'I': case 'l': case 'L': return 4;
   40966             :     case 'q': case 'Q': return 8;
   40967           0 :     case 'f': return (is_complex ? 8 : 4);
   40968           0 :     case 'd': return (is_complex ? 16 : 8);
   40969           0 :     case 'g': {
   40970           0 :       PyErr_SetString(PyExc_ValueError, "Python does not define a standard format string size for long double ('g')..");
   40971           0 :       return 0;
   40972             :     }
   40973             :     case 'O': case 'P': return sizeof(void*);
   40974           0 :     default:
   40975           0 :       __Pyx_BufFmt_RaiseUnexpectedChar(ch);
   40976           0 :       return 0;
   40977             :     }
   40978             : }
   40979         579 : static size_t __Pyx_BufFmt_TypeCharToNativeSize(char ch, int is_complex) {
   40980         579 :   switch (ch) {
   40981             :     case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
   40982           0 :     case 'h': case 'H': return sizeof(short);
   40983             :     case 'i': case 'I': return sizeof(int);
   40984             :     case 'l': case 'L': return sizeof(long);
   40985             :     #ifdef HAVE_LONG_LONG
   40986             :     case 'q': case 'Q': return sizeof(PY_LONG_LONG);
   40987             :     #endif
   40988           0 :     case 'f': return sizeof(float) * (is_complex ? 2 : 1);
   40989         485 :     case 'd': return sizeof(double) * (is_complex ? 2 : 1);
   40990           0 :     case 'g': return sizeof(long double) * (is_complex ? 2 : 1);
   40991             :     case 'O': case 'P': return sizeof(void*);
   40992           0 :     default: {
   40993           0 :       __Pyx_BufFmt_RaiseUnexpectedChar(ch);
   40994           0 :       return 0;
   40995             :     }
   40996             :   }
   40997             : }
   40998             : typedef struct { char c; short x; } __Pyx_st_short;
   40999             : typedef struct { char c; int x; } __Pyx_st_int;
   41000             : typedef struct { char c; long x; } __Pyx_st_long;
   41001             : typedef struct { char c; float x; } __Pyx_st_float;
   41002             : typedef struct { char c; double x; } __Pyx_st_double;
   41003             : typedef struct { char c; long double x; } __Pyx_st_longdouble;
   41004             : typedef struct { char c; void *x; } __Pyx_st_void_p;
   41005             : #ifdef HAVE_LONG_LONG
   41006             : typedef struct { char c; PY_LONG_LONG x; } __Pyx_st_longlong;
   41007             : #endif
   41008         579 : static size_t __Pyx_BufFmt_TypeCharToAlignment(char ch, int is_complex) {
   41009         579 :   CYTHON_UNUSED_VAR(is_complex);
   41010         579 :   switch (ch) {
   41011             :     case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
   41012           0 :     case 'h': case 'H': return sizeof(__Pyx_st_short) - sizeof(short);
   41013             :     case 'i': case 'I': return sizeof(__Pyx_st_int) - sizeof(int);
   41014             :     case 'l': case 'L': return sizeof(__Pyx_st_long) - sizeof(long);
   41015             : #ifdef HAVE_LONG_LONG
   41016             :     case 'q': case 'Q': return sizeof(__Pyx_st_longlong) - sizeof(PY_LONG_LONG);
   41017             : #endif
   41018             :     case 'f': return sizeof(__Pyx_st_float) - sizeof(float);
   41019             :     case 'd': return sizeof(__Pyx_st_double) - sizeof(double);
   41020           0 :     case 'g': return sizeof(__Pyx_st_longdouble) - sizeof(long double);
   41021             :     case 'P': case 'O': return sizeof(__Pyx_st_void_p) - sizeof(void*);
   41022           0 :     default:
   41023           0 :       __Pyx_BufFmt_RaiseUnexpectedChar(ch);
   41024           0 :       return 0;
   41025             :     }
   41026             : }
   41027             : /* These are for computing the padding at the end of the struct to align
   41028             :    on the first member of the struct. This will probably the same as above,
   41029             :    but we don't have any guarantees.
   41030             :  */
   41031             : typedef struct { short x; char c; } __Pyx_pad_short;
   41032             : typedef struct { int x; char c; } __Pyx_pad_int;
   41033             : typedef struct { long x; char c; } __Pyx_pad_long;
   41034             : typedef struct { float x; char c; } __Pyx_pad_float;
   41035             : typedef struct { double x; char c; } __Pyx_pad_double;
   41036             : typedef struct { long double x; char c; } __Pyx_pad_longdouble;
   41037             : typedef struct { void *x; char c; } __Pyx_pad_void_p;
   41038             : #ifdef HAVE_LONG_LONG
   41039             : typedef struct { PY_LONG_LONG x; char c; } __Pyx_pad_longlong;
   41040             : #endif
   41041         579 : static size_t __Pyx_BufFmt_TypeCharToPadding(char ch, int is_complex) {
   41042         579 :   CYTHON_UNUSED_VAR(is_complex);
   41043         579 :   switch (ch) {
   41044             :     case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
   41045           0 :     case 'h': case 'H': return sizeof(__Pyx_pad_short) - sizeof(short);
   41046             :     case 'i': case 'I': return sizeof(__Pyx_pad_int) - sizeof(int);
   41047             :     case 'l': case 'L': return sizeof(__Pyx_pad_long) - sizeof(long);
   41048             : #ifdef HAVE_LONG_LONG
   41049             :     case 'q': case 'Q': return sizeof(__Pyx_pad_longlong) - sizeof(PY_LONG_LONG);
   41050             : #endif
   41051             :     case 'f': return sizeof(__Pyx_pad_float) - sizeof(float);
   41052             :     case 'd': return sizeof(__Pyx_pad_double) - sizeof(double);
   41053           0 :     case 'g': return sizeof(__Pyx_pad_longdouble) - sizeof(long double);
   41054             :     case 'P': case 'O': return sizeof(__Pyx_pad_void_p) - sizeof(void*);
   41055           0 :     default:
   41056           0 :       __Pyx_BufFmt_RaiseUnexpectedChar(ch);
   41057           0 :       return 0;
   41058             :     }
   41059             : }
   41060         579 : static char __Pyx_BufFmt_TypeCharToGroup(char ch, int is_complex) {
   41061         579 :   switch (ch) {
   41062             :     case 'c':
   41063             :         return 'H';
   41064          94 :     case 'b': case 'h': case 'i':
   41065             :     case 'l': case 'q': case 's': case 'p':
   41066          94 :         return 'I';
   41067           0 :     case '?': case 'B': case 'H': case 'I': case 'L': case 'Q':
   41068           0 :         return 'U';
   41069         485 :     case 'f': case 'd': case 'g':
   41070         485 :         return (is_complex ? 'C' : 'R');
   41071           0 :     case 'O':
   41072           0 :         return 'O';
   41073           0 :     case 'P':
   41074           0 :         return 'P';
   41075           0 :     default: {
   41076           0 :       __Pyx_BufFmt_RaiseUnexpectedChar(ch);
   41077           0 :       return 0;
   41078             :     }
   41079             :   }
   41080             : }
   41081           0 : static void __Pyx_BufFmt_RaiseExpected(__Pyx_BufFmt_Context* ctx) {
   41082           0 :   if (ctx->head == NULL || ctx->head->field == &ctx->root) {
   41083           0 :     const char* expected;
   41084           0 :     const char* quote;
   41085           0 :     if (ctx->head == NULL) {
   41086             :       expected = "end";
   41087             :       quote = "";
   41088             :     } else {
   41089           0 :       expected = ctx->head->field->type->name;
   41090           0 :       quote = "'";
   41091             :     }
   41092           0 :     PyErr_Format(PyExc_ValueError,
   41093             :                  "Buffer dtype mismatch, expected %s%s%s but got %s",
   41094             :                  quote, expected, quote,
   41095           0 :                  __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex));
   41096             :   } else {
   41097           0 :     __Pyx_StructField* field = ctx->head->field;
   41098           0 :     __Pyx_StructField* parent = (ctx->head - 1)->field;
   41099           0 :     PyErr_Format(PyExc_ValueError,
   41100             :                  "Buffer dtype mismatch, expected '%s' but got %s in '%s.%s'",
   41101           0 :                  field->type->name, __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex),
   41102           0 :                  parent->type->name, field->name);
   41103             :   }
   41104           0 : }
   41105        1158 : static int __Pyx_BufFmt_ProcessTypeChunk(__Pyx_BufFmt_Context* ctx) {
   41106        1158 :   char group;
   41107        1158 :   size_t size, offset, arraysize = 1;
   41108        1158 :   if (ctx->enc_type == 0) return 0;
   41109         579 :   if (ctx->head->field->type->arraysize[0]) {
   41110           0 :     int i, ndim = 0;
   41111           0 :     if (ctx->enc_type == 's' || ctx->enc_type == 'p') {
   41112           0 :         ctx->is_valid_array = ctx->head->field->type->ndim == 1;
   41113           0 :         ndim = 1;
   41114           0 :         if (ctx->enc_count != ctx->head->field->type->arraysize[0]) {
   41115           0 :             PyErr_Format(PyExc_ValueError,
   41116             :                          "Expected a dimension of size %zu, got %zu",
   41117             :                          ctx->head->field->type->arraysize[0], ctx->enc_count);
   41118           0 :             return -1;
   41119             :         }
   41120             :     }
   41121           0 :     if (!ctx->is_valid_array) {
   41122           0 :       PyErr_Format(PyExc_ValueError, "Expected %d dimensions, got %d",
   41123             :                    ctx->head->field->type->ndim, ndim);
   41124           0 :       return -1;
   41125             :     }
   41126           0 :     for (i = 0; i < ctx->head->field->type->ndim; i++) {
   41127           0 :       arraysize *= ctx->head->field->type->arraysize[i];
   41128             :     }
   41129           0 :     ctx->is_valid_array = 0;
   41130           0 :     ctx->enc_count = 1;
   41131             :   }
   41132         579 :   group = __Pyx_BufFmt_TypeCharToGroup(ctx->enc_type, ctx->is_complex);
   41133         579 :   do {
   41134         579 :     __Pyx_StructField* field = ctx->head->field;
   41135         579 :     __Pyx_TypeInfo* type = field->type;
   41136         579 :     if (ctx->enc_packmode == '@' || ctx->enc_packmode == '^') {
   41137         579 :       size = __Pyx_BufFmt_TypeCharToNativeSize(ctx->enc_type, ctx->is_complex);
   41138             :     } else {
   41139           0 :       size = __Pyx_BufFmt_TypeCharToStandardSize(ctx->enc_type, ctx->is_complex);
   41140             :     }
   41141         579 :     if (ctx->enc_packmode == '@') {
   41142         579 :       size_t align_at = __Pyx_BufFmt_TypeCharToAlignment(ctx->enc_type, ctx->is_complex);
   41143         579 :       size_t align_mod_offset;
   41144         579 :       if (align_at == 0) return -1;
   41145         579 :       align_mod_offset = ctx->fmt_offset % align_at;
   41146         579 :       if (align_mod_offset > 0) ctx->fmt_offset += align_at - align_mod_offset;
   41147         579 :       if (ctx->struct_alignment == 0)
   41148         579 :           ctx->struct_alignment = __Pyx_BufFmt_TypeCharToPadding(ctx->enc_type,
   41149             :                                                                  ctx->is_complex);
   41150             :     }
   41151         579 :     if (type->size != size || type->typegroup != group) {
   41152           0 :       if (type->typegroup == 'C' && type->fields != NULL) {
   41153           0 :         size_t parent_offset = ctx->head->parent_offset + field->offset;
   41154           0 :         ++ctx->head;
   41155           0 :         ctx->head->field = type->fields;
   41156           0 :         ctx->head->parent_offset = parent_offset;
   41157           0 :         continue;
   41158             :       }
   41159           0 :       if ((type->typegroup == 'H' || group == 'H') && type->size == size) {
   41160             :       } else {
   41161           0 :           __Pyx_BufFmt_RaiseExpected(ctx);
   41162           0 :           return -1;
   41163             :       }
   41164             :     }
   41165         579 :     offset = ctx->head->parent_offset + field->offset;
   41166         579 :     if (ctx->fmt_offset != offset) {
   41167           0 :       PyErr_Format(PyExc_ValueError,
   41168             :                    "Buffer dtype mismatch; next field is at offset %" CYTHON_FORMAT_SSIZE_T "d but %" CYTHON_FORMAT_SSIZE_T "d expected",
   41169             :                    (Py_ssize_t)ctx->fmt_offset, (Py_ssize_t)offset);
   41170           0 :       return -1;
   41171             :     }
   41172         579 :     ctx->fmt_offset += size;
   41173         579 :     if (arraysize)
   41174         579 :       ctx->fmt_offset += (arraysize - 1) * size;
   41175         579 :     --ctx->enc_count;
   41176         579 :     while (1) {
   41177         579 :       if (field == &ctx->root) {
   41178         579 :         ctx->head = NULL;
   41179         579 :         if (ctx->enc_count != 0) {
   41180           0 :           __Pyx_BufFmt_RaiseExpected(ctx);
   41181           0 :           return -1;
   41182             :         }
   41183             :         break;
   41184             :       }
   41185           0 :       ctx->head->field = ++field;
   41186           0 :       if (field->type == NULL) {
   41187           0 :         --ctx->head;
   41188           0 :         field = ctx->head->field;
   41189           0 :         continue;
   41190           0 :       } else if (field->type->typegroup == 'S') {
   41191           0 :         size_t parent_offset = ctx->head->parent_offset + field->offset;
   41192           0 :         if (field->type->fields->type == NULL) continue;
   41193           0 :         field = field->type->fields;
   41194           0 :         ++ctx->head;
   41195           0 :         ctx->head->field = field;
   41196           0 :         ctx->head->parent_offset = parent_offset;
   41197           0 :         break;
   41198             :       } else {
   41199             :         break;
   41200             :       }
   41201             :     }
   41202         579 :   } while (ctx->enc_count);
   41203         579 :   ctx->enc_type = 0;
   41204         579 :   ctx->is_complex = 0;
   41205         579 :   return 0;
   41206             : }
   41207             : static int
   41208           0 : __pyx_buffmt_parse_array(__Pyx_BufFmt_Context* ctx, const char** tsp)
   41209             : {
   41210           0 :     const char *ts = *tsp;
   41211           0 :     int i = 0, number, ndim;
   41212           0 :     ++ts;
   41213           0 :     if (ctx->new_count != 1) {
   41214           0 :         PyErr_SetString(PyExc_ValueError,
   41215             :                         "Cannot handle repeated arrays in format string");
   41216           0 :         return -1;
   41217             :     }
   41218           0 :     if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return -1;
   41219           0 :     ndim = ctx->head->field->type->ndim;
   41220           0 :     while (*ts && *ts != ')') {
   41221           0 :         switch (*ts) {
   41222           0 :             case ' ': case '\f': case '\r': case '\n': case '\t': case '\v':  continue;
   41223           0 :             default:  break;
   41224             :         }
   41225           0 :         number = __Pyx_BufFmt_ExpectNumber(&ts);
   41226           0 :         if (number == -1) return -1;
   41227           0 :         if (i < ndim && (size_t) number != ctx->head->field->type->arraysize[i]) {
   41228           0 :             PyErr_Format(PyExc_ValueError,
   41229             :                         "Expected a dimension of size %zu, got %d",
   41230             :                         ctx->head->field->type->arraysize[i], number);
   41231           0 :             return -1;
   41232             :         }
   41233           0 :         if (*ts != ',' && *ts != ')') {
   41234           0 :             PyErr_Format(PyExc_ValueError,
   41235             :                                 "Expected a comma in format string, got '%c'", *ts);
   41236           0 :             return -1;
   41237             :         }
   41238           0 :         if (*ts == ',') ts++;
   41239           0 :         i++;
   41240             :     }
   41241           0 :     if (i != ndim) {
   41242           0 :         PyErr_Format(PyExc_ValueError, "Expected %d dimension(s), got %d",
   41243           0 :                             ctx->head->field->type->ndim, i);
   41244           0 :         return -1;
   41245             :     }
   41246           0 :     if (!*ts) {
   41247           0 :         PyErr_SetString(PyExc_ValueError,
   41248             :                         "Unexpected end of format string, expected ')'");
   41249           0 :         return -1;
   41250             :     }
   41251           0 :     ctx->is_valid_array = 1;
   41252           0 :     ctx->new_count = 1;
   41253           0 :     *tsp = ++ts;
   41254           0 :     return 0;
   41255             : }
   41256         579 : static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts) {
   41257         579 :   int got_Z = 0;
   41258        1158 :   while (1) {
   41259        1158 :     switch(*ts) {
   41260         579 :       case 0:
   41261         579 :         if (ctx->enc_type != 0 && ctx->head == NULL) {
   41262           0 :           __Pyx_BufFmt_RaiseExpected(ctx);
   41263           0 :           return NULL;
   41264             :         }
   41265         579 :         if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
   41266         579 :         if (ctx->head != NULL) {
   41267           0 :           __Pyx_BufFmt_RaiseExpected(ctx);
   41268           0 :           return NULL;
   41269             :         }
   41270             :         return ts;
   41271           0 :       case ' ':
   41272             :       case '\r':
   41273             :       case '\n':
   41274           0 :         ++ts;
   41275           0 :         break;
   41276             :       case '<':
   41277           0 :         if (!__Pyx_Is_Little_Endian()) {
   41278             :           PyErr_SetString(PyExc_ValueError, "Little-endian buffer not supported on big-endian compiler");
   41279             :           return NULL;
   41280             :         }
   41281           0 :         ctx->new_packmode = '=';
   41282           0 :         ++ts;
   41283           0 :         break;
   41284             :       case '>':
   41285             :       case '!':
   41286           0 :         if (__Pyx_Is_Little_Endian()) {
   41287           0 :           PyErr_SetString(PyExc_ValueError, "Big-endian buffer not supported on little-endian compiler");
   41288           0 :           return NULL;
   41289             :         }
   41290             :         ctx->new_packmode = '=';
   41291             :         ++ts;
   41292             :         break;
   41293           0 :       case '=':
   41294             :       case '@':
   41295             :       case '^':
   41296           0 :         ctx->new_packmode = *ts++;
   41297           0 :         break;
   41298           0 :       case 'T':
   41299             :         {
   41300           0 :           const char* ts_after_sub;
   41301           0 :           size_t i, struct_count = ctx->new_count;
   41302           0 :           size_t struct_alignment = ctx->struct_alignment;
   41303           0 :           ctx->new_count = 1;
   41304           0 :           ++ts;
   41305           0 :           if (*ts != '{') {
   41306           0 :             PyErr_SetString(PyExc_ValueError, "Buffer acquisition: Expected '{' after 'T'");
   41307           0 :             return NULL;
   41308             :           }
   41309           0 :           if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
   41310           0 :           ctx->enc_type = 0;
   41311           0 :           ctx->enc_count = 0;
   41312           0 :           ctx->struct_alignment = 0;
   41313           0 :           ++ts;
   41314           0 :           ts_after_sub = ts;
   41315           0 :           for (i = 0; i != struct_count; ++i) {
   41316           0 :             ts_after_sub = __Pyx_BufFmt_CheckString(ctx, ts);
   41317           0 :             if (!ts_after_sub) return NULL;
   41318             :           }
   41319           0 :           ts = ts_after_sub;
   41320           0 :           if (struct_alignment) ctx->struct_alignment = struct_alignment;
   41321             :         }
   41322             :         break;
   41323           0 :       case '}':
   41324             :         {
   41325           0 :           size_t alignment = ctx->struct_alignment;
   41326           0 :           ++ts;
   41327           0 :           if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
   41328           0 :           ctx->enc_type = 0;
   41329           0 :           if (alignment && ctx->fmt_offset % alignment) {
   41330           0 :             ctx->fmt_offset += alignment - (ctx->fmt_offset % alignment);
   41331             :           }
   41332             :         }
   41333             :         return ts;
   41334           0 :       case 'x':
   41335           0 :         if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
   41336           0 :         ctx->fmt_offset += ctx->new_count;
   41337           0 :         ctx->new_count = 1;
   41338           0 :         ctx->enc_count = 0;
   41339           0 :         ctx->enc_type = 0;
   41340           0 :         ctx->enc_packmode = ctx->new_packmode;
   41341           0 :         ++ts;
   41342           0 :         break;
   41343          47 :       case 'Z':
   41344          47 :         got_Z = 1;
   41345          47 :         ++ts;
   41346          47 :         if (*ts != 'f' && *ts != 'd' && *ts != 'g') {
   41347           0 :           __Pyx_BufFmt_RaiseUnexpectedChar('Z');
   41348           0 :           return NULL;
   41349             :         }
   41350         579 :         CYTHON_FALLTHROUGH;
   41351             :       case '?': case 'c': case 'b': case 'B': case 'h': case 'H': case 'i': case 'I':
   41352             :       case 'l': case 'L': case 'q': case 'Q':
   41353             :       case 'f': case 'd': case 'g':
   41354             :       case 'O': case 'p':
   41355         579 :         if ((ctx->enc_type == *ts) && (got_Z == ctx->is_complex) &&
   41356           0 :             (ctx->enc_packmode == ctx->new_packmode) && (!ctx->is_valid_array)) {
   41357           0 :           ctx->enc_count += ctx->new_count;
   41358           0 :           ctx->new_count = 1;
   41359           0 :           got_Z = 0;
   41360           0 :           ++ts;
   41361           0 :           break;
   41362             :         }
   41363         579 :         CYTHON_FALLTHROUGH;
   41364             :       case 's':
   41365         579 :         if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
   41366         579 :         ctx->enc_count = ctx->new_count;
   41367         579 :         ctx->enc_packmode = ctx->new_packmode;
   41368         579 :         ctx->enc_type = *ts;
   41369         579 :         ctx->is_complex = got_Z;
   41370         579 :         ++ts;
   41371         579 :         ctx->new_count = 1;
   41372         579 :         got_Z = 0;
   41373         579 :         break;
   41374           0 :       case ':':
   41375           0 :         ++ts;
   41376           0 :         while(*ts != ':') ++ts;
   41377           0 :         ++ts;
   41378           0 :         break;
   41379           0 :       case '(':
   41380           0 :         if (__pyx_buffmt_parse_array(ctx, &ts) < 0) return NULL;
   41381             :         break;
   41382           0 :       default:
   41383             :         {
   41384           0 :           int number = __Pyx_BufFmt_ExpectNumber(&ts);
   41385           0 :           if (number == -1) return NULL;
   41386           0 :           ctx->new_count = (size_t)number;
   41387             :         }
   41388             :     }
   41389             :   }
   41390             : }
   41391             : 
   41392             : /* TypeInfoCompare */
   41393             :   static int
   41394           0 : __pyx_typeinfo_cmp(__Pyx_TypeInfo *a, __Pyx_TypeInfo *b)
   41395             : {
   41396           0 :     int i;
   41397           0 :     if (!a || !b)
   41398             :         return 0;
   41399           0 :     if (a == b)
   41400             :         return 1;
   41401           0 :     if (a->size != b->size || a->typegroup != b->typegroup ||
   41402           0 :             a->is_unsigned != b->is_unsigned || a->ndim != b->ndim) {
   41403           0 :         if (a->typegroup == 'H' || b->typegroup == 'H') {
   41404           0 :             return a->size == b->size;
   41405             :         } else {
   41406             :             return 0;
   41407             :         }
   41408             :     }
   41409           0 :     if (a->ndim) {
   41410           0 :         for (i = 0; i < a->ndim; i++)
   41411           0 :             if (a->arraysize[i] != b->arraysize[i])
   41412             :                 return 0;
   41413             :     }
   41414           0 :     if (a->typegroup == 'S') {
   41415           0 :         if (a->flags != b->flags)
   41416             :             return 0;
   41417           0 :         if (a->fields || b->fields) {
   41418           0 :             if (!(a->fields && b->fields))
   41419             :                 return 0;
   41420           0 :             for (i = 0; a->fields[i].type && b->fields[i].type; i++) {
   41421           0 :                 __Pyx_StructField *field_a = a->fields + i;
   41422           0 :                 __Pyx_StructField *field_b = b->fields + i;
   41423           0 :                 if (field_a->offset != field_b->offset ||
   41424           0 :                     !__pyx_typeinfo_cmp(field_a->type, field_b->type))
   41425           0 :                     return 0;
   41426             :             }
   41427           0 :             return !a->fields[i].type && !b->fields[i].type;
   41428             :         }
   41429             :     }
   41430             :     return 1;
   41431             : }
   41432             : 
   41433             : /* MemviewSliceValidateAndInit */
   41434             :   static int
   41435        1290 : __pyx_check_strides(Py_buffer *buf, int dim, int ndim, int spec)
   41436             : {
   41437        1290 :     if (buf->shape[dim] <= 1)
   41438             :         return 1;
   41439         897 :     if (buf->strides) {
   41440         897 :         if (spec & __Pyx_MEMVIEW_CONTIG) {
   41441         346 :             if (spec & (__Pyx_MEMVIEW_PTR|__Pyx_MEMVIEW_FULL)) {
   41442           0 :                 if (unlikely(buf->strides[dim] != sizeof(void *))) {
   41443           0 :                     PyErr_Format(PyExc_ValueError,
   41444             :                                  "Buffer is not indirectly contiguous "
   41445             :                                  "in dimension %d.", dim);
   41446           0 :                     goto fail;
   41447             :                 }
   41448         346 :             } else if (unlikely(buf->strides[dim] != buf->itemsize)) {
   41449           0 :                 PyErr_SetString(PyExc_ValueError,
   41450             :                                 "Buffer and memoryview are not contiguous "
   41451             :                                 "in the same dimension.");
   41452           0 :                 goto fail;
   41453             :             }
   41454             :         }
   41455         897 :         if (spec & __Pyx_MEMVIEW_FOLLOW) {
   41456         425 :             Py_ssize_t stride = buf->strides[dim];
   41457         425 :             if (stride < 0)
   41458             :                 stride = -stride;
   41459         425 :             if (unlikely(stride < buf->itemsize)) {
   41460           0 :                 PyErr_SetString(PyExc_ValueError,
   41461             :                                 "Buffer and memoryview are not contiguous "
   41462             :                                 "in the same dimension.");
   41463           0 :                 goto fail;
   41464             :             }
   41465             :         }
   41466             :     } else {
   41467           0 :         if (unlikely(spec & __Pyx_MEMVIEW_CONTIG && dim != ndim - 1)) {
   41468           0 :             PyErr_Format(PyExc_ValueError,
   41469             :                          "C-contiguous buffer is not contiguous in "
   41470             :                          "dimension %d", dim);
   41471           0 :             goto fail;
   41472           0 :         } else if (unlikely(spec & (__Pyx_MEMVIEW_PTR))) {
   41473           0 :             PyErr_Format(PyExc_ValueError,
   41474             :                          "C-contiguous buffer is not indirect in "
   41475             :                          "dimension %d", dim);
   41476           0 :             goto fail;
   41477           0 :         } else if (unlikely(buf->suboffsets)) {
   41478           0 :             PyErr_SetString(PyExc_ValueError,
   41479             :                             "Buffer exposes suboffsets but no strides");
   41480           0 :             goto fail;
   41481             :         }
   41482             :     }
   41483             :     return 1;
   41484             : fail:
   41485             :     return 0;
   41486             : }
   41487             : static int
   41488        1290 : __pyx_check_suboffsets(Py_buffer *buf, int dim, int ndim, int spec)
   41489             : {
   41490        1290 :     CYTHON_UNUSED_VAR(ndim);
   41491        1290 :     if (spec & __Pyx_MEMVIEW_DIRECT) {
   41492        1290 :         if (unlikely(buf->suboffsets && buf->suboffsets[dim] >= 0)) {
   41493           0 :             PyErr_Format(PyExc_ValueError,
   41494             :                          "Buffer not compatible with direct access "
   41495             :                          "in dimension %d.", dim);
   41496           0 :             goto fail;
   41497             :         }
   41498             :     }
   41499        1290 :     if (spec & __Pyx_MEMVIEW_PTR) {
   41500           0 :         if (unlikely(!buf->suboffsets || (buf->suboffsets[dim] < 0))) {
   41501           0 :             PyErr_Format(PyExc_ValueError,
   41502             :                          "Buffer is not indirectly accessible "
   41503             :                          "in dimension %d.", dim);
   41504           0 :             goto fail;
   41505             :         }
   41506             :     }
   41507             :     return 1;
   41508             : fail:
   41509             :     return 0;
   41510             : }
   41511             : static int
   41512         579 : __pyx_verify_contig(Py_buffer *buf, int ndim, int c_or_f_flag)
   41513             : {
   41514         579 :     int i;
   41515         579 :     if (c_or_f_flag & __Pyx_IS_F_CONTIG) {
   41516             :         Py_ssize_t stride = 1;
   41517           0 :         for (i = 0; i < ndim; i++) {
   41518           0 :             if (unlikely(stride * buf->itemsize != buf->strides[i]  &&  buf->shape[i] > 1)) {
   41519           0 :                 PyErr_SetString(PyExc_ValueError,
   41520             :                     "Buffer not fortran contiguous.");
   41521           0 :                 goto fail;
   41522             :             }
   41523           0 :             stride = stride * buf->shape[i];
   41524             :         }
   41525         579 :     } else if (c_or_f_flag & __Pyx_IS_C_CONTIG) {
   41526         518 :         Py_ssize_t stride = 1;
   41527        1625 :         for (i = ndim - 1; i >- 1; i--) {
   41528        1107 :             if (unlikely(stride * buf->itemsize != buf->strides[i]  &&  buf->shape[i] > 1)) {
   41529           0 :                 PyErr_SetString(PyExc_ValueError,
   41530             :                     "Buffer not C contiguous.");
   41531           0 :                 goto fail;
   41532             :             }
   41533        1107 :             stride = stride * buf->shape[i];
   41534             :         }
   41535             :     }
   41536             :     return 1;
   41537             : fail:
   41538             :     return 0;
   41539             : }
   41540         579 : static int __Pyx_ValidateAndInit_memviewslice(
   41541             :                 int *axes_specs,
   41542             :                 int c_or_f_flag,
   41543             :                 int buf_flags,
   41544             :                 int ndim,
   41545             :                 __Pyx_TypeInfo *dtype,
   41546             :                 __Pyx_BufFmt_StackElem stack[],
   41547             :                 __Pyx_memviewslice *memviewslice,
   41548             :                 PyObject *original_obj)
   41549             : {
   41550         579 :     struct __pyx_memoryview_obj *memview, *new_memview;
   41551             :     __Pyx_RefNannyDeclarations
   41552         579 :     Py_buffer *buf;
   41553         579 :     int i, spec = 0, retval = -1;
   41554         579 :     __Pyx_BufFmt_Context ctx;
   41555         579 :     int from_memoryview = __pyx_memoryview_check(original_obj);
   41556         579 :     __Pyx_RefNannySetupContext("ValidateAndInit_memviewslice", 0);
   41557         579 :     if (from_memoryview && __pyx_typeinfo_cmp(dtype, ((struct __pyx_memoryview_obj *)
   41558             :                                                             original_obj)->typeinfo)) {
   41559             :         memview = (struct __pyx_memoryview_obj *) original_obj;
   41560             :         new_memview = NULL;
   41561             :     } else {
   41562         579 :         memview = (struct __pyx_memoryview_obj *) __pyx_memoryview_new(
   41563             :                                             original_obj, buf_flags, 0, dtype);
   41564         579 :         new_memview = memview;
   41565         579 :         if (unlikely(!memview))
   41566           0 :             goto fail;
   41567             :     }
   41568         579 :     buf = &memview->view;
   41569         579 :     if (unlikely(buf->ndim != ndim)) {
   41570           0 :         PyErr_Format(PyExc_ValueError,
   41571             :                 "Buffer has wrong number of dimensions (expected %d, got %d)",
   41572             :                 ndim, buf->ndim);
   41573           0 :         goto fail;
   41574             :     }
   41575         579 :     if (new_memview) {
   41576         579 :         __Pyx_BufFmt_Init(&ctx, stack, dtype);
   41577         579 :         if (unlikely(!__Pyx_BufFmt_CheckString(&ctx, buf->format))) goto fail;
   41578             :     }
   41579         579 :     if (unlikely((unsigned) buf->itemsize != dtype->size)) {
   41580           0 :         PyErr_Format(PyExc_ValueError,
   41581             :                      "Item size of buffer (%" CYTHON_FORMAT_SSIZE_T "u byte%s) "
   41582             :                      "does not match size of '%s' (%" CYTHON_FORMAT_SSIZE_T "u byte%s)",
   41583             :                      buf->itemsize,
   41584             :                      (buf->itemsize > 1) ? "s" : "",
   41585             :                      dtype->name,
   41586             :                      dtype->size,
   41587             :                      (dtype->size > 1) ? "s" : "");
   41588           0 :         goto fail;
   41589             :     }
   41590         579 :     if (buf->len > 0) {
   41591        1869 :         for (i = 0; i < ndim; i++) {
   41592        1290 :             spec = axes_specs[i];
   41593        1290 :             if (unlikely(!__pyx_check_strides(buf, i, ndim, spec)))
   41594           0 :                 goto fail;
   41595        1290 :             if (unlikely(!__pyx_check_suboffsets(buf, i, ndim, spec)))
   41596           0 :                 goto fail;
   41597             :         }
   41598         579 :         if (unlikely(buf->strides && !__pyx_verify_contig(buf, ndim, c_or_f_flag)))
   41599           0 :             goto fail;
   41600             :     }
   41601         579 :     if (unlikely(__Pyx_init_memviewslice(memview, ndim, memviewslice,
   41602             :                                          new_memview != NULL) == -1)) {
   41603           0 :         goto fail;
   41604             :     }
   41605         579 :     retval = 0;
   41606         579 :     goto no_fail;
   41607           0 : fail:
   41608           0 :     Py_XDECREF(new_memview);
   41609           0 :     retval = -1;
   41610         579 : no_fail:
   41611         579 :     __Pyx_RefNannyFinishContext();
   41612         579 :     return retval;
   41613             : }
   41614             : 
   41615             : /* ObjectToMemviewSlice */
   41616         240 :   static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_d_dc_double__const__(PyObject *obj, int writable_flag) {
   41617         240 :     __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
   41618         240 :     __Pyx_BufFmt_StackElem stack[1];
   41619         240 :     int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_FOLLOW), (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_CONTIG) };
   41620         240 :     int retcode;
   41621         240 :     if (obj == Py_None) {
   41622           0 :         result.memview = (struct __pyx_memoryview_obj *) Py_None;
   41623           0 :         return result;
   41624             :     }
   41625         240 :     retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, __Pyx_IS_C_CONTIG,
   41626             :                                                  (PyBUF_C_CONTIGUOUS | PyBUF_FORMAT) | writable_flag, 2,
   41627             :                                                  &__Pyx_TypeInfo_double__const__, stack,
   41628             :                                                  &result, obj);
   41629         240 :     if (unlikely(retcode == -1))
   41630           0 :         goto __pyx_fail;
   41631         240 :     return result;
   41632           0 : __pyx_fail:
   41633           0 :     result.memview = NULL;
   41634           0 :     result.data = NULL;
   41635           0 :     return result;
   41636             : }
   41637             : 
   41638             : /* FromPy */
   41639          38 :   static __pyx_t_double_complex __Pyx_PyComplex_As___pyx_t_double_complex(PyObject* o) {
   41640          38 :     Py_complex cval;
   41641             : #if !CYTHON_COMPILING_IN_PYPY
   41642          38 :     if (PyComplex_CheckExact(o))
   41643          38 :         cval = ((PyComplexObject *)o)->cval;
   41644             :     else
   41645             : #endif
   41646           0 :         cval = PyComplex_AsCComplex(o);
   41647          38 :     return __pyx_t_double_complex_from_parts(
   41648             :                (double)cval.real,
   41649             :                (double)cval.imag);
   41650             : }
   41651             : 
   41652             : /* CIntFromPyVerify */
   41653             :   #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
   41654             :     __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
   41655             : #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
   41656             :     __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
   41657             : #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
   41658             :     {\
   41659             :         func_type value = func_value;\
   41660             :         if (sizeof(target_type) < sizeof(func_type)) {\
   41661             :             if (unlikely(value != (func_type) (target_type) value)) {\
   41662             :                 func_type zero = 0;\
   41663             :                 if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
   41664             :                     return (target_type) -1;\
   41665             :                 if (is_unsigned && unlikely(value < zero))\
   41666             :                     goto raise_neg_overflow;\
   41667             :                 else\
   41668             :                     goto raise_overflow;\
   41669             :             }\
   41670             :         }\
   41671             :         return (target_type) value;\
   41672             :     }
   41673             : 
   41674             : /* ObjectToMemviewSlice */
   41675          94 :   static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_d_dc_int__const__(PyObject *obj, int writable_flag) {
   41676          94 :     __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
   41677          94 :     __Pyx_BufFmt_StackElem stack[1];
   41678          94 :     int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_FOLLOW), (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_CONTIG) };
   41679          94 :     int retcode;
   41680          94 :     if (obj == Py_None) {
   41681           0 :         result.memview = (struct __pyx_memoryview_obj *) Py_None;
   41682           0 :         return result;
   41683             :     }
   41684          94 :     retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, __Pyx_IS_C_CONTIG,
   41685             :                                                  (PyBUF_C_CONTIGUOUS | PyBUF_FORMAT) | writable_flag, 2,
   41686             :                                                  &__Pyx_TypeInfo_int__const__, stack,
   41687             :                                                  &result, obj);
   41688          94 :     if (unlikely(retcode == -1))
   41689           0 :         goto __pyx_fail;
   41690          94 :     return result;
   41691           0 : __pyx_fail:
   41692           0 :     result.memview = NULL;
   41693           0 :     result.data = NULL;
   41694           0 :     return result;
   41695             : }
   41696             : 
   41697             : /* ObjectToMemviewSlice */
   41698          75 :   static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_d_dc_double(PyObject *obj, int writable_flag) {
   41699          75 :     __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
   41700          75 :     __Pyx_BufFmt_StackElem stack[1];
   41701          75 :     int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_FOLLOW), (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_CONTIG) };
   41702          75 :     int retcode;
   41703          75 :     if (obj == Py_None) {
   41704           0 :         result.memview = (struct __pyx_memoryview_obj *) Py_None;
   41705           0 :         return result;
   41706             :     }
   41707          75 :     retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, __Pyx_IS_C_CONTIG,
   41708             :                                                  (PyBUF_C_CONTIGUOUS | PyBUF_FORMAT) | writable_flag, 2,
   41709             :                                                  &__Pyx_TypeInfo_double, stack,
   41710             :                                                  &result, obj);
   41711          75 :     if (unlikely(retcode == -1))
   41712           0 :         goto __pyx_fail;
   41713          75 :     return result;
   41714           0 : __pyx_fail:
   41715           0 :     result.memview = NULL;
   41716           0 :     result.data = NULL;
   41717           0 :     return result;
   41718             : }
   41719             : 
   41720             : /* MemviewDtypeToObject */
   41721           0 :   static CYTHON_INLINE PyObject *__pyx_memview_get_double(const char *itemp) {
   41722           0 :     return (PyObject *) PyFloat_FromDouble(*(double *) itemp);
   41723             : }
   41724           0 : static CYTHON_INLINE int __pyx_memview_set_double(const char *itemp, PyObject *obj) {
   41725           0 :     double value = __pyx_PyFloat_AsDouble(obj);
   41726           0 :     if (unlikely((value == (double)-1) && PyErr_Occurred()))
   41727             :         return 0;
   41728           0 :     *(double *) itemp = value;
   41729           0 :     return 1;
   41730             : }
   41731             : 
   41732             : /* ObjectToMemviewSlice */
   41733          19 :   static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_d_dc___pyx_t_double_complex__const__(PyObject *obj, int writable_flag) {
   41734          19 :     __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
   41735          19 :     __Pyx_BufFmt_StackElem stack[1];
   41736          19 :     int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_FOLLOW), (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_CONTIG) };
   41737          19 :     int retcode;
   41738          19 :     if (obj == Py_None) {
   41739           0 :         result.memview = (struct __pyx_memoryview_obj *) Py_None;
   41740           0 :         return result;
   41741             :     }
   41742          19 :     retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, __Pyx_IS_C_CONTIG,
   41743             :                                                  (PyBUF_C_CONTIGUOUS | PyBUF_FORMAT) | writable_flag, 2,
   41744             :                                                  &__Pyx_TypeInfo___pyx_t_double_complex__const__, stack,
   41745             :                                                  &result, obj);
   41746          19 :     if (unlikely(retcode == -1))
   41747           0 :         goto __pyx_fail;
   41748          19 :     return result;
   41749           0 : __pyx_fail:
   41750           0 :     result.memview = NULL;
   41751           0 :     result.data = NULL;
   41752           0 :     return result;
   41753             : }
   41754             : 
   41755             : /* ObjectToMemviewSlice */
   41756          19 :   static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_d_dc___pyx_t_double_complex(PyObject *obj, int writable_flag) {
   41757          19 :     __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
   41758          19 :     __Pyx_BufFmt_StackElem stack[1];
   41759          19 :     int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_FOLLOW), (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_CONTIG) };
   41760          19 :     int retcode;
   41761          19 :     if (obj == Py_None) {
   41762           0 :         result.memview = (struct __pyx_memoryview_obj *) Py_None;
   41763           0 :         return result;
   41764             :     }
   41765          19 :     retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, __Pyx_IS_C_CONTIG,
   41766             :                                                  (PyBUF_C_CONTIGUOUS | PyBUF_FORMAT) | writable_flag, 2,
   41767             :                                                  &__Pyx_TypeInfo___pyx_t_double_complex, stack,
   41768             :                                                  &result, obj);
   41769          19 :     if (unlikely(retcode == -1))
   41770           0 :         goto __pyx_fail;
   41771          19 :     return result;
   41772           0 : __pyx_fail:
   41773           0 :     result.memview = NULL;
   41774           0 :     result.data = NULL;
   41775           0 :     return result;
   41776             : }
   41777             : 
   41778             : /* MemviewDtypeToObject */
   41779           0 :   static CYTHON_INLINE PyObject *__pyx_memview_get___pyx_t_double_complex(const char *itemp) {
   41780           0 :     return (PyObject *) __pyx_PyComplex_FromComplex(*(__pyx_t_double_complex *) itemp);
   41781             : }
   41782           0 : static CYTHON_INLINE int __pyx_memview_set___pyx_t_double_complex(const char *itemp, PyObject *obj) {
   41783           0 :     __pyx_t_double_complex value = __Pyx_PyComplex_As___pyx_t_double_complex(obj);
   41784           0 :     if (unlikely(PyErr_Occurred()))
   41785             :         return 0;
   41786           0 :     *(__pyx_t_double_complex *) itemp = value;
   41787           0 :     return 1;
   41788             : }
   41789             : 
   41790             : /* ObjectToMemviewSlice */
   41791          71 :   static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_d_d_dc_double(PyObject *obj, int writable_flag) {
   41792          71 :     __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
   41793          71 :     __Pyx_BufFmt_StackElem stack[1];
   41794          71 :     int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_FOLLOW), (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_FOLLOW), (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_CONTIG) };
   41795          71 :     int retcode;
   41796          71 :     if (obj == Py_None) {
   41797           0 :         result.memview = (struct __pyx_memoryview_obj *) Py_None;
   41798           0 :         return result;
   41799             :     }
   41800          71 :     retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, __Pyx_IS_C_CONTIG,
   41801             :                                                  (PyBUF_C_CONTIGUOUS | PyBUF_FORMAT) | writable_flag, 3,
   41802             :                                                  &__Pyx_TypeInfo_double, stack,
   41803             :                                                  &result, obj);
   41804          71 :     if (unlikely(retcode == -1))
   41805           0 :         goto __pyx_fail;
   41806          71 :     return result;
   41807           0 : __pyx_fail:
   41808           0 :     result.memview = NULL;
   41809           0 :     result.data = NULL;
   41810           0 :     return result;
   41811             : }
   41812             : 
   41813             : /* ObjectToMemviewSlice */
   41814          52 :   static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dsdsds_double__const__(PyObject *obj, int writable_flag) {
   41815          52 :     __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
   41816          52 :     __Pyx_BufFmt_StackElem stack[1];
   41817          52 :     int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED), (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED), (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED) };
   41818          52 :     int retcode;
   41819          52 :     if (obj == Py_None) {
   41820           0 :         result.memview = (struct __pyx_memoryview_obj *) Py_None;
   41821           0 :         return result;
   41822             :     }
   41823          52 :     retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, 0,
   41824             :                                                  PyBUF_RECORDS_RO | writable_flag, 3,
   41825             :                                                  &__Pyx_TypeInfo_double__const__, stack,
   41826             :                                                  &result, obj);
   41827          52 :     if (unlikely(retcode == -1))
   41828           0 :         goto __pyx_fail;
   41829          52 :     return result;
   41830           0 : __pyx_fail:
   41831           0 :     result.memview = NULL;
   41832           0 :     result.data = NULL;
   41833           0 :     return result;
   41834             : }
   41835             : 
   41836             : /* ObjectToMemviewSlice */
   41837           9 :   static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dsdsds___pyx_t_double_complex__const__(PyObject *obj, int writable_flag) {
   41838           9 :     __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
   41839           9 :     __Pyx_BufFmt_StackElem stack[1];
   41840           9 :     int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED), (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED), (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED) };
   41841           9 :     int retcode;
   41842           9 :     if (obj == Py_None) {
   41843           0 :         result.memview = (struct __pyx_memoryview_obj *) Py_None;
   41844           0 :         return result;
   41845             :     }
   41846           9 :     retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, 0,
   41847             :                                                  PyBUF_RECORDS_RO | writable_flag, 3,
   41848             :                                                  &__Pyx_TypeInfo___pyx_t_double_complex__const__, stack,
   41849             :                                                  &result, obj);
   41850           9 :     if (unlikely(retcode == -1))
   41851           0 :         goto __pyx_fail;
   41852           9 :     return result;
   41853           0 : __pyx_fail:
   41854           0 :     result.memview = NULL;
   41855           0 :     result.data = NULL;
   41856           0 :     return result;
   41857             : }
   41858             : 
   41859             : /* MemviewSliceCopyTemplate */
   41860             :   static __Pyx_memviewslice
   41861           0 : __pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs,
   41862             :                                  const char *mode, int ndim,
   41863             :                                  size_t sizeof_dtype, int contig_flag,
   41864             :                                  int dtype_is_object)
   41865             : {
   41866             :     __Pyx_RefNannyDeclarations
   41867           0 :     int i;
   41868           0 :     __Pyx_memviewslice new_mvs = { 0, 0, { 0 }, { 0 }, { 0 } };
   41869           0 :     struct __pyx_memoryview_obj *from_memview = from_mvs->memview;
   41870           0 :     Py_buffer *buf = &from_memview->view;
   41871           0 :     PyObject *shape_tuple = NULL;
   41872           0 :     PyObject *temp_int = NULL;
   41873           0 :     struct __pyx_array_obj *array_obj = NULL;
   41874           0 :     struct __pyx_memoryview_obj *memview_obj = NULL;
   41875           0 :     __Pyx_RefNannySetupContext("__pyx_memoryview_copy_new_contig", 0);
   41876           0 :     for (i = 0; i < ndim; i++) {
   41877           0 :         if (unlikely(from_mvs->suboffsets[i] >= 0)) {
   41878           0 :             PyErr_Format(PyExc_ValueError, "Cannot copy memoryview slice with "
   41879             :                                            "indirect dimensions (axis %d)", i);
   41880           0 :             goto fail;
   41881             :         }
   41882             :     }
   41883           0 :     shape_tuple = PyTuple_New(ndim);
   41884           0 :     if (unlikely(!shape_tuple)) {
   41885           0 :         goto fail;
   41886             :     }
   41887             :     __Pyx_GOTREF(shape_tuple);
   41888           0 :     for(i = 0; i < ndim; i++) {
   41889           0 :         temp_int = PyInt_FromSsize_t(from_mvs->shape[i]);
   41890           0 :         if(unlikely(!temp_int)) {
   41891           0 :             goto fail;
   41892             :         } else {
   41893           0 :             PyTuple_SET_ITEM(shape_tuple, i, temp_int);
   41894           0 :             temp_int = NULL;
   41895             :         }
   41896             :     }
   41897           0 :     array_obj = __pyx_array_new(shape_tuple, sizeof_dtype, buf->format, (char *) mode, NULL);
   41898           0 :     if (unlikely(!array_obj)) {
   41899           0 :         goto fail;
   41900             :     }
   41901           0 :     __Pyx_GOTREF(array_obj);
   41902           0 :     memview_obj = (struct __pyx_memoryview_obj *) __pyx_memoryview_new(
   41903             :                                     (PyObject *) array_obj, contig_flag,
   41904             :                                     dtype_is_object,
   41905           0 :                                     from_mvs->memview->typeinfo);
   41906           0 :     if (unlikely(!memview_obj))
   41907           0 :         goto fail;
   41908           0 :     if (unlikely(__Pyx_init_memviewslice(memview_obj, ndim, &new_mvs, 1) < 0))
   41909           0 :         goto fail;
   41910           0 :     if (unlikely(__pyx_memoryview_copy_contents(*from_mvs, new_mvs, ndim, ndim,
   41911             :                                                 dtype_is_object) < 0))
   41912           0 :         goto fail;
   41913           0 :     goto no_fail;
   41914           0 : fail:
   41915           0 :     __Pyx_XDECREF(new_mvs.memview);
   41916           0 :     new_mvs.memview = NULL;
   41917           0 :     new_mvs.data = NULL;
   41918           0 : no_fail:
   41919           0 :     __Pyx_XDECREF(shape_tuple);
   41920           0 :     __Pyx_XDECREF(temp_int);
   41921           0 :     __Pyx_XDECREF(array_obj);
   41922           0 :     __Pyx_RefNannyFinishContext();
   41923           0 :     return new_mvs;
   41924             : }
   41925             : 
   41926             : /* MemviewSliceInit */
   41927             :   static int
   41928         579 : __Pyx_init_memviewslice(struct __pyx_memoryview_obj *memview,
   41929             :                         int ndim,
   41930             :                         __Pyx_memviewslice *memviewslice,
   41931             :                         int memview_is_new_reference)
   41932             : {
   41933             :     __Pyx_RefNannyDeclarations
   41934         579 :     int i, retval=-1;
   41935         579 :     Py_buffer *buf = &memview->view;
   41936         579 :     __Pyx_RefNannySetupContext("init_memviewslice", 0);
   41937         579 :     if (unlikely(memviewslice->memview || memviewslice->data)) {
   41938           0 :         PyErr_SetString(PyExc_ValueError,
   41939             :             "memviewslice is already initialized!");
   41940           0 :         goto fail;
   41941             :     }
   41942         579 :     if (buf->strides) {
   41943        1869 :         for (i = 0; i < ndim; i++) {
   41944        1290 :             memviewslice->strides[i] = buf->strides[i];
   41945             :         }
   41946             :     } else {
   41947           0 :         Py_ssize_t stride = buf->itemsize;
   41948           0 :         for (i = ndim - 1; i >= 0; i--) {
   41949           0 :             memviewslice->strides[i] = stride;
   41950           0 :             stride *= buf->shape[i];
   41951             :         }
   41952             :     }
   41953        1869 :     for (i = 0; i < ndim; i++) {
   41954        1290 :         memviewslice->shape[i]   = buf->shape[i];
   41955        1290 :         if (buf->suboffsets) {
   41956           0 :             memviewslice->suboffsets[i] = buf->suboffsets[i];
   41957             :         } else {
   41958        1290 :             memviewslice->suboffsets[i] = -1;
   41959             :         }
   41960             :     }
   41961         579 :     memviewslice->memview = memview;
   41962         579 :     memviewslice->data = (char *)buf->buf;
   41963         579 :     if (__pyx_add_acquisition_count(memview) == 0 && !memview_is_new_reference) {
   41964           0 :         Py_INCREF(memview);
   41965             :     }
   41966         579 :     retval = 0;
   41967         579 :     goto no_fail;
   41968           0 : fail:
   41969           0 :     memviewslice->memview = 0;
   41970           0 :     memviewslice->data = 0;
   41971           0 :     retval = -1;
   41972         579 : no_fail:
   41973         579 :     __Pyx_RefNannyFinishContext();
   41974         579 :     return retval;
   41975             : }
   41976             : #ifndef Py_NO_RETURN
   41977             : #define Py_NO_RETURN
   41978             : #endif
   41979           0 : static void __pyx_fatalerror(const char *fmt, ...) Py_NO_RETURN {
   41980           0 :     va_list vargs;
   41981           0 :     char msg[200];
   41982             : #if PY_VERSION_HEX >= 0x030A0000 || defined(HAVE_STDARG_PROTOTYPES)
   41983           0 :     va_start(vargs, fmt);
   41984             : #else
   41985             :     va_start(vargs);
   41986             : #endif
   41987           0 :     vsnprintf(msg, 200, fmt, vargs);
   41988           0 :     va_end(vargs);
   41989           0 :     Py_FatalError(msg);
   41990             : }
   41991             : static CYTHON_INLINE int
   41992             : __pyx_add_acquisition_count_locked(__pyx_atomic_int_type *acquisition_count,
   41993             :                                    PyThread_type_lock lock)
   41994             : {
   41995             :     int result;
   41996             :     PyThread_acquire_lock(lock, 1);
   41997             :     result = (*acquisition_count)++;
   41998             :     PyThread_release_lock(lock);
   41999             :     return result;
   42000             : }
   42001             : static CYTHON_INLINE int
   42002             : __pyx_sub_acquisition_count_locked(__pyx_atomic_int_type *acquisition_count,
   42003             :                                    PyThread_type_lock lock)
   42004             : {
   42005             :     int result;
   42006             :     PyThread_acquire_lock(lock, 1);
   42007             :     result = (*acquisition_count)--;
   42008             :     PyThread_release_lock(lock);
   42009             :     return result;
   42010             : }
   42011             : static CYTHON_INLINE void
   42012          94 : __Pyx_INC_MEMVIEW(__Pyx_memviewslice *memslice, int have_gil, int lineno)
   42013             : {
   42014          94 :     __pyx_nonatomic_int_type old_acquisition_count;
   42015          94 :     struct __pyx_memoryview_obj *memview = memslice->memview;
   42016          94 :     if (unlikely(!memview || (PyObject *) memview == Py_None)) {
   42017             :         return;
   42018             :     }
   42019          94 :     old_acquisition_count = __pyx_add_acquisition_count(memview);
   42020          94 :     if (unlikely(old_acquisition_count <= 0)) {
   42021           0 :         if (likely(old_acquisition_count == 0)) {
   42022           0 :             if (have_gil) {
   42023           0 :                 Py_INCREF((PyObject *) memview);
   42024             :             } else {
   42025           0 :                 PyGILState_STATE _gilstate = PyGILState_Ensure();
   42026           0 :                 Py_INCREF((PyObject *) memview);
   42027           0 :                 PyGILState_Release(_gilstate);
   42028             :             }
   42029             :         } else {
   42030           0 :             __pyx_fatalerror("Acquisition count is %d (line %d)",
   42031             :                              old_acquisition_count+1, lineno);
   42032             :         }
   42033             :     }
   42034             : }
   42035         693 : static CYTHON_INLINE void __Pyx_XCLEAR_MEMVIEW(__Pyx_memviewslice *memslice,
   42036             :                                              int have_gil, int lineno) {
   42037         693 :     __pyx_nonatomic_int_type old_acquisition_count;
   42038         693 :     struct __pyx_memoryview_obj *memview = memslice->memview;
   42039         693 :     if (unlikely(!memview || (PyObject *) memview == Py_None)) {
   42040          20 :         memslice->memview = NULL;
   42041          20 :         return;
   42042             :     }
   42043         673 :     old_acquisition_count = __pyx_sub_acquisition_count(memview);
   42044         673 :     memslice->data = NULL;
   42045         673 :     if (likely(old_acquisition_count > 1)) {
   42046          94 :         memslice->memview = NULL;
   42047         579 :     } else if (likely(old_acquisition_count == 1)) {
   42048         579 :         if (have_gil) {
   42049         579 :             Py_CLEAR(memslice->memview);
   42050             :         } else {
   42051           0 :             PyGILState_STATE _gilstate = PyGILState_Ensure();
   42052           0 :             Py_CLEAR(memslice->memview);
   42053           0 :             PyGILState_Release(_gilstate);
   42054             :         }
   42055             :     } else {
   42056           0 :         __pyx_fatalerror("Acquisition count is %d (line %d)",
   42057             :                          old_acquisition_count-1, lineno);
   42058             :     }
   42059             : }
   42060             : 
   42061             : /* CIntFromPy */
   42062         730 :   static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
   42063             : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
   42064             : #pragma GCC diagnostic push
   42065             : #pragma GCC diagnostic ignored "-Wconversion"
   42066             : #endif
   42067         730 :     const int neg_one = (int) -1, const_zero = (int) 0;
   42068             : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
   42069             : #pragma GCC diagnostic pop
   42070             : #endif
   42071         730 :     const int is_unsigned = neg_one > const_zero;
   42072             : #if PY_MAJOR_VERSION < 3
   42073             :     if (likely(PyInt_Check(x))) {
   42074             :         if ((sizeof(int) < sizeof(long))) {
   42075             :             __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
   42076             :         } else {
   42077             :             long val = PyInt_AS_LONG(x);
   42078             :             if (is_unsigned && unlikely(val < 0)) {
   42079             :                 goto raise_neg_overflow;
   42080             :             }
   42081             :             return (int) val;
   42082             :         }
   42083             :     }
   42084             : #endif
   42085         730 :     if (unlikely(!PyLong_Check(x))) {
   42086           0 :         int val;
   42087           0 :         PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
   42088           0 :         if (!tmp) return (int) -1;
   42089           0 :         val = __Pyx_PyInt_As_int(tmp);
   42090           0 :         Py_DECREF(tmp);
   42091           0 :         return val;
   42092             :     }
   42093         730 :     if (is_unsigned) {
   42094             : #if CYTHON_USE_PYLONG_INTERNALS
   42095             :         if (unlikely(__Pyx_PyLong_IsNeg(x))) {
   42096             :             goto raise_neg_overflow;
   42097             :         } else if (__Pyx_PyLong_IsCompact(x)) {
   42098             :             __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
   42099             :         } else {
   42100             :             const digit* digits = __Pyx_PyLong_Digits(x);
   42101             :             assert(__Pyx_PyLong_DigitCount(x) > 1);
   42102             :             switch (__Pyx_PyLong_DigitCount(x)) {
   42103             :                 case 2:
   42104             :                     if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) {
   42105             :                         if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
   42106             :                             __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   42107             :                         } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) {
   42108             :                             return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
   42109             :                         }
   42110             :                     }
   42111             :                     break;
   42112             :                 case 3:
   42113             :                     if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) {
   42114             :                         if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
   42115             :                             __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   42116             :                         } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) {
   42117             :                             return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
   42118             :                         }
   42119             :                     }
   42120             :                     break;
   42121             :                 case 4:
   42122             :                     if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) {
   42123             :                         if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
   42124             :                             __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   42125             :                         } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) {
   42126             :                             return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
   42127             :                         }
   42128             :                     }
   42129             :                     break;
   42130             :             }
   42131             :         }
   42132             : #endif
   42133             : #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
   42134             :         if (unlikely(Py_SIZE(x) < 0)) {
   42135             :             goto raise_neg_overflow;
   42136             :         }
   42137             : #else
   42138             :         {
   42139             :             int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
   42140             :             if (unlikely(result < 0))
   42141             :                 return (int) -1;
   42142             :             if (unlikely(result == 1))
   42143             :                 goto raise_neg_overflow;
   42144             :         }
   42145             : #endif
   42146             :         if ((sizeof(int) <= sizeof(unsigned long))) {
   42147             :             __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
   42148             : #ifdef HAVE_LONG_LONG
   42149             :         } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) {
   42150             :             __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
   42151             : #endif
   42152             :         }
   42153             :     } else {
   42154             : #if CYTHON_USE_PYLONG_INTERNALS
   42155         730 :         if (__Pyx_PyLong_IsCompact(x)) {
   42156         730 :             __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
   42157             :         } else {
   42158           0 :             const digit* digits = __Pyx_PyLong_Digits(x);
   42159           0 :             assert(__Pyx_PyLong_DigitCount(x) > 1);
   42160           0 :             switch (__Pyx_PyLong_SignedDigitCount(x)) {
   42161             :                 case -2:
   42162           0 :                     if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) {
   42163           0 :                         if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
   42164           0 :                             __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   42165             :                         } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
   42166             :                             return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
   42167             :                         }
   42168             :                     }
   42169             :                     break;
   42170             :                 case 2:
   42171           0 :                     if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) {
   42172           0 :                         if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
   42173           0 :                             __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   42174             :                         } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
   42175             :                             return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
   42176             :                         }
   42177             :                     }
   42178             :                     break;
   42179             :                 case -3:
   42180             :                     if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
   42181             :                         if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
   42182             :                             __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   42183             :                         } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
   42184             :                             return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
   42185             :                         }
   42186             :                     }
   42187             :                     break;
   42188             :                 case 3:
   42189             :                     if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) {
   42190             :                         if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
   42191             :                             __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   42192             :                         } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
   42193             :                             return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
   42194             :                         }
   42195             :                     }
   42196             :                     break;
   42197             :                 case -4:
   42198             :                     if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
   42199             :                         if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
   42200             :                             __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   42201             :                         } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) {
   42202             :                             return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
   42203             :                         }
   42204             :                     }
   42205             :                     break;
   42206             :                 case 4:
   42207             :                     if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) {
   42208             :                         if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
   42209             :                             __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   42210             :                         } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) {
   42211             :                             return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
   42212             :                         }
   42213             :                     }
   42214             :                     break;
   42215             :             }
   42216             :         }
   42217             : #endif
   42218           0 :         if ((sizeof(int) <= sizeof(long))) {
   42219           0 :             __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
   42220             : #ifdef HAVE_LONG_LONG
   42221             :         } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) {
   42222             :             __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
   42223             : #endif
   42224             :         }
   42225             :     }
   42226             :     {
   42227             :         int val;
   42228             :         int ret = -1;
   42229             : #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
   42230             :         Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
   42231             :             x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
   42232             :         if (unlikely(bytes_copied == -1)) {
   42233             :         } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
   42234             :             goto raise_overflow;
   42235             :         } else {
   42236             :             ret = 0;
   42237             :         }
   42238             : #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
   42239             :         int one = 1; int is_little = (int)*(unsigned char *)&one;
   42240             :         unsigned char *bytes = (unsigned char *)&val;
   42241             :         ret = _PyLong_AsByteArray((PyLongObject *)x,
   42242             :                                     bytes, sizeof(val),
   42243             :                                     is_little, !is_unsigned);
   42244             : #else
   42245             :         PyObject *v;
   42246             :         PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
   42247             :         int bits, remaining_bits, is_negative = 0;
   42248             :         int chunk_size = (sizeof(long) < 8) ? 30 : 62;
   42249             :         if (likely(PyLong_CheckExact(x))) {
   42250             :             v = __Pyx_NewRef(x);
   42251             :         } else {
   42252             :             v = PyNumber_Long(x);
   42253             :             if (unlikely(!v)) return (int) -1;
   42254             :             assert(PyLong_CheckExact(v));
   42255             :         }
   42256             :         {
   42257             :             int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
   42258             :             if (unlikely(result < 0)) {
   42259             :                 Py_DECREF(v);
   42260             :                 return (int) -1;
   42261             :             }
   42262             :             is_negative = result == 1;
   42263             :         }
   42264             :         if (is_unsigned && unlikely(is_negative)) {
   42265             :             Py_DECREF(v);
   42266             :             goto raise_neg_overflow;
   42267             :         } else if (is_negative) {
   42268             :             stepval = PyNumber_Invert(v);
   42269             :             Py_DECREF(v);
   42270             :             if (unlikely(!stepval))
   42271             :                 return (int) -1;
   42272             :         } else {
   42273             :             stepval = v;
   42274             :         }
   42275             :         v = NULL;
   42276             :         val = (int) 0;
   42277             :         mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
   42278             :         shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
   42279             :         for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) {
   42280             :             PyObject *tmp, *digit;
   42281             :             long idigit;
   42282             :             digit = PyNumber_And(stepval, mask);
   42283             :             if (unlikely(!digit)) goto done;
   42284             :             idigit = PyLong_AsLong(digit);
   42285             :             Py_DECREF(digit);
   42286             :             if (unlikely(idigit < 0)) goto done;
   42287             :             val |= ((int) idigit) << bits;
   42288             :             tmp = PyNumber_Rshift(stepval, shift);
   42289             :             if (unlikely(!tmp)) goto done;
   42290             :             Py_DECREF(stepval); stepval = tmp;
   42291             :         }
   42292             :         Py_DECREF(shift); shift = NULL;
   42293             :         Py_DECREF(mask); mask = NULL;
   42294             :         {
   42295             :             long idigit = PyLong_AsLong(stepval);
   42296             :             if (unlikely(idigit < 0)) goto done;
   42297             :             remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1);
   42298             :             if (unlikely(idigit >= (1L << remaining_bits)))
   42299             :                 goto raise_overflow;
   42300             :             val |= ((int) idigit) << bits;
   42301             :         }
   42302             :         if (!is_unsigned) {
   42303             :             if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1))))
   42304             :                 goto raise_overflow;
   42305             :             if (is_negative)
   42306             :                 val = ~val;
   42307             :         }
   42308             :         ret = 0;
   42309             :     done:
   42310             :         Py_XDECREF(shift);
   42311             :         Py_XDECREF(mask);
   42312             :         Py_XDECREF(stepval);
   42313             : #endif
   42314             :         if (unlikely(ret))
   42315             :             return (int) -1;
   42316             :         return val;
   42317             :     }
   42318           0 : raise_overflow:
   42319           0 :     PyErr_SetString(PyExc_OverflowError,
   42320             :         "value too large to convert to int");
   42321           0 :     return (int) -1;
   42322             : raise_neg_overflow:
   42323             :     PyErr_SetString(PyExc_OverflowError,
   42324             :         "can't convert negative value to int");
   42325             :     return (int) -1;
   42326             : }
   42327             : 
   42328             : /* CIntToPy */
   42329           0 :   static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
   42330             : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
   42331             : #pragma GCC diagnostic push
   42332             : #pragma GCC diagnostic ignored "-Wconversion"
   42333             : #endif
   42334           0 :     const long neg_one = (long) -1, const_zero = (long) 0;
   42335             : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
   42336             : #pragma GCC diagnostic pop
   42337             : #endif
   42338           0 :     const int is_unsigned = neg_one > const_zero;
   42339           0 :     if (is_unsigned) {
   42340             :         if (sizeof(long) < sizeof(long)) {
   42341             :             return PyInt_FromLong((long) value);
   42342             :         } else if (sizeof(long) <= sizeof(unsigned long)) {
   42343             :             return PyLong_FromUnsignedLong((unsigned long) value);
   42344             : #ifdef HAVE_LONG_LONG
   42345             :         } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
   42346             :             return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
   42347             : #endif
   42348             :         }
   42349             :     } else {
   42350           0 :         if (sizeof(long) <= sizeof(long)) {
   42351           0 :             return PyInt_FromLong((long) value);
   42352             : #ifdef HAVE_LONG_LONG
   42353             :         } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
   42354             :             return PyLong_FromLongLong((PY_LONG_LONG) value);
   42355             : #endif
   42356             :         }
   42357             :     }
   42358             :     {
   42359             :         unsigned char *bytes = (unsigned char *)&value;
   42360             : #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
   42361             :         if (is_unsigned) {
   42362             :             return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
   42363             :         } else {
   42364             :             return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
   42365             :         }
   42366             : #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
   42367             :         int one = 1; int little = (int)*(unsigned char *)&one;
   42368             :         return _PyLong_FromByteArray(bytes, sizeof(long),
   42369             :                                      little, !is_unsigned);
   42370             : #else
   42371             :         int one = 1; int little = (int)*(unsigned char *)&one;
   42372             :         PyObject *from_bytes, *result = NULL;
   42373             :         PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL;
   42374             :         from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
   42375             :         if (!from_bytes) return NULL;
   42376             :         py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long));
   42377             :         if (!py_bytes) goto limited_bad;
   42378             :         order_str = PyUnicode_FromString(little ? "little" : "big");
   42379             :         if (!order_str) goto limited_bad;
   42380             :         arg_tuple = PyTuple_Pack(2, py_bytes, order_str);
   42381             :         if (!arg_tuple) goto limited_bad;
   42382             :         if (!is_unsigned) {
   42383             :             kwds = PyDict_New();
   42384             :             if (!kwds) goto limited_bad;
   42385             :             if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad;
   42386             :         }
   42387             :         result = PyObject_Call(from_bytes, arg_tuple, kwds);
   42388             :         limited_bad:
   42389             :         Py_XDECREF(kwds);
   42390             :         Py_XDECREF(arg_tuple);
   42391             :         Py_XDECREF(order_str);
   42392             :         Py_XDECREF(py_bytes);
   42393             :         Py_XDECREF(from_bytes);
   42394             :         return result;
   42395             : #endif
   42396             :     }
   42397             : }
   42398             : 
   42399             : /* CIntToPy */
   42400         579 :   static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
   42401             : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
   42402             : #pragma GCC diagnostic push
   42403             : #pragma GCC diagnostic ignored "-Wconversion"
   42404             : #endif
   42405         579 :     const int neg_one = (int) -1, const_zero = (int) 0;
   42406             : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
   42407             : #pragma GCC diagnostic pop
   42408             : #endif
   42409         579 :     const int is_unsigned = neg_one > const_zero;
   42410         579 :     if (is_unsigned) {
   42411             :         if (sizeof(int) < sizeof(long)) {
   42412             :             return PyInt_FromLong((long) value);
   42413             :         } else if (sizeof(int) <= sizeof(unsigned long)) {
   42414             :             return PyLong_FromUnsignedLong((unsigned long) value);
   42415             : #ifdef HAVE_LONG_LONG
   42416             :         } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
   42417             :             return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
   42418             : #endif
   42419             :         }
   42420             :     } else {
   42421         579 :         if (sizeof(int) <= sizeof(long)) {
   42422         579 :             return PyInt_FromLong((long) value);
   42423             : #ifdef HAVE_LONG_LONG
   42424             :         } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
   42425             :             return PyLong_FromLongLong((PY_LONG_LONG) value);
   42426             : #endif
   42427             :         }
   42428             :     }
   42429             :     {
   42430             :         unsigned char *bytes = (unsigned char *)&value;
   42431             : #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
   42432             :         if (is_unsigned) {
   42433             :             return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
   42434             :         } else {
   42435             :             return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
   42436             :         }
   42437             : #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
   42438             :         int one = 1; int little = (int)*(unsigned char *)&one;
   42439             :         return _PyLong_FromByteArray(bytes, sizeof(int),
   42440             :                                      little, !is_unsigned);
   42441             : #else
   42442             :         int one = 1; int little = (int)*(unsigned char *)&one;
   42443             :         PyObject *from_bytes, *result = NULL;
   42444             :         PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL;
   42445             :         from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
   42446             :         if (!from_bytes) return NULL;
   42447             :         py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int));
   42448             :         if (!py_bytes) goto limited_bad;
   42449             :         order_str = PyUnicode_FromString(little ? "little" : "big");
   42450             :         if (!order_str) goto limited_bad;
   42451             :         arg_tuple = PyTuple_Pack(2, py_bytes, order_str);
   42452             :         if (!arg_tuple) goto limited_bad;
   42453             :         if (!is_unsigned) {
   42454             :             kwds = PyDict_New();
   42455             :             if (!kwds) goto limited_bad;
   42456             :             if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad;
   42457             :         }
   42458             :         result = PyObject_Call(from_bytes, arg_tuple, kwds);
   42459             :         limited_bad:
   42460             :         Py_XDECREF(kwds);
   42461             :         Py_XDECREF(arg_tuple);
   42462             :         Py_XDECREF(order_str);
   42463             :         Py_XDECREF(py_bytes);
   42464             :         Py_XDECREF(from_bytes);
   42465             :         return result;
   42466             : #endif
   42467             :     }
   42468             : }
   42469             : 
   42470             : /* CIntFromPy */
   42471           0 :   static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
   42472             : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
   42473             : #pragma GCC diagnostic push
   42474             : #pragma GCC diagnostic ignored "-Wconversion"
   42475             : #endif
   42476           0 :     const long neg_one = (long) -1, const_zero = (long) 0;
   42477             : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
   42478             : #pragma GCC diagnostic pop
   42479             : #endif
   42480           0 :     const int is_unsigned = neg_one > const_zero;
   42481             : #if PY_MAJOR_VERSION < 3
   42482             :     if (likely(PyInt_Check(x))) {
   42483             :         if ((sizeof(long) < sizeof(long))) {
   42484             :             __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
   42485             :         } else {
   42486             :             long val = PyInt_AS_LONG(x);
   42487             :             if (is_unsigned && unlikely(val < 0)) {
   42488             :                 goto raise_neg_overflow;
   42489             :             }
   42490             :             return (long) val;
   42491             :         }
   42492             :     }
   42493             : #endif
   42494           0 :     if (unlikely(!PyLong_Check(x))) {
   42495           0 :         long val;
   42496           0 :         PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
   42497           0 :         if (!tmp) return (long) -1;
   42498           0 :         val = __Pyx_PyInt_As_long(tmp);
   42499           0 :         Py_DECREF(tmp);
   42500           0 :         return val;
   42501             :     }
   42502           0 :     if (is_unsigned) {
   42503             : #if CYTHON_USE_PYLONG_INTERNALS
   42504             :         if (unlikely(__Pyx_PyLong_IsNeg(x))) {
   42505             :             goto raise_neg_overflow;
   42506             :         } else if (__Pyx_PyLong_IsCompact(x)) {
   42507             :             __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
   42508             :         } else {
   42509             :             const digit* digits = __Pyx_PyLong_Digits(x);
   42510             :             assert(__Pyx_PyLong_DigitCount(x) > 1);
   42511             :             switch (__Pyx_PyLong_DigitCount(x)) {
   42512             :                 case 2:
   42513             :                     if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) {
   42514             :                         if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
   42515             :                             __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   42516             :                         } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) {
   42517             :                             return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
   42518             :                         }
   42519             :                     }
   42520             :                     break;
   42521             :                 case 3:
   42522             :                     if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) {
   42523             :                         if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
   42524             :                             __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   42525             :                         } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) {
   42526             :                             return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
   42527             :                         }
   42528             :                     }
   42529             :                     break;
   42530             :                 case 4:
   42531             :                     if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) {
   42532             :                         if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
   42533             :                             __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   42534             :                         } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) {
   42535             :                             return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
   42536             :                         }
   42537             :                     }
   42538             :                     break;
   42539             :             }
   42540             :         }
   42541             : #endif
   42542             : #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
   42543             :         if (unlikely(Py_SIZE(x) < 0)) {
   42544             :             goto raise_neg_overflow;
   42545             :         }
   42546             : #else
   42547             :         {
   42548             :             int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
   42549             :             if (unlikely(result < 0))
   42550             :                 return (long) -1;
   42551             :             if (unlikely(result == 1))
   42552             :                 goto raise_neg_overflow;
   42553             :         }
   42554             : #endif
   42555             :         if ((sizeof(long) <= sizeof(unsigned long))) {
   42556             :             __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
   42557             : #ifdef HAVE_LONG_LONG
   42558             :         } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) {
   42559             :             __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
   42560             : #endif
   42561             :         }
   42562             :     } else {
   42563             : #if CYTHON_USE_PYLONG_INTERNALS
   42564           0 :         if (__Pyx_PyLong_IsCompact(x)) {
   42565           0 :             __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
   42566             :         } else {
   42567           0 :             const digit* digits = __Pyx_PyLong_Digits(x);
   42568           0 :             assert(__Pyx_PyLong_DigitCount(x) > 1);
   42569           0 :             switch (__Pyx_PyLong_SignedDigitCount(x)) {
   42570             :                 case -2:
   42571           0 :                     if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) {
   42572           0 :                         if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
   42573           0 :                             __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   42574             :                         } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
   42575             :                             return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
   42576             :                         }
   42577             :                     }
   42578             :                     break;
   42579             :                 case 2:
   42580           0 :                     if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) {
   42581           0 :                         if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
   42582           0 :                             __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   42583             :                         } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
   42584             :                             return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
   42585             :                         }
   42586             :                     }
   42587             :                     break;
   42588             :                 case -3:
   42589             :                     if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
   42590             :                         if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
   42591             :                             __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   42592             :                         } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
   42593             :                             return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
   42594             :                         }
   42595             :                     }
   42596             :                     break;
   42597             :                 case 3:
   42598             :                     if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) {
   42599             :                         if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
   42600             :                             __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   42601             :                         } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
   42602             :                             return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
   42603             :                         }
   42604             :                     }
   42605             :                     break;
   42606             :                 case -4:
   42607             :                     if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
   42608             :                         if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
   42609             :                             __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   42610             :                         } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) {
   42611             :                             return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
   42612             :                         }
   42613             :                     }
   42614             :                     break;
   42615             :                 case 4:
   42616             :                     if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) {
   42617             :                         if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
   42618             :                             __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   42619             :                         } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) {
   42620             :                             return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
   42621             :                         }
   42622             :                     }
   42623             :                     break;
   42624             :             }
   42625             :         }
   42626             : #endif
   42627           0 :         if ((sizeof(long) <= sizeof(long))) {
   42628           0 :             __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
   42629             : #ifdef HAVE_LONG_LONG
   42630             :         } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) {
   42631             :             __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
   42632             : #endif
   42633             :         }
   42634             :     }
   42635             :     {
   42636             :         long val;
   42637             :         int ret = -1;
   42638             : #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
   42639             :         Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
   42640             :             x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
   42641             :         if (unlikely(bytes_copied == -1)) {
   42642             :         } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
   42643             :             goto raise_overflow;
   42644             :         } else {
   42645             :             ret = 0;
   42646             :         }
   42647             : #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
   42648             :         int one = 1; int is_little = (int)*(unsigned char *)&one;
   42649             :         unsigned char *bytes = (unsigned char *)&val;
   42650             :         ret = _PyLong_AsByteArray((PyLongObject *)x,
   42651             :                                     bytes, sizeof(val),
   42652             :                                     is_little, !is_unsigned);
   42653             : #else
   42654             :         PyObject *v;
   42655             :         PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
   42656             :         int bits, remaining_bits, is_negative = 0;
   42657             :         int chunk_size = (sizeof(long) < 8) ? 30 : 62;
   42658             :         if (likely(PyLong_CheckExact(x))) {
   42659             :             v = __Pyx_NewRef(x);
   42660             :         } else {
   42661             :             v = PyNumber_Long(x);
   42662             :             if (unlikely(!v)) return (long) -1;
   42663             :             assert(PyLong_CheckExact(v));
   42664             :         }
   42665             :         {
   42666             :             int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
   42667             :             if (unlikely(result < 0)) {
   42668             :                 Py_DECREF(v);
   42669             :                 return (long) -1;
   42670             :             }
   42671             :             is_negative = result == 1;
   42672             :         }
   42673             :         if (is_unsigned && unlikely(is_negative)) {
   42674             :             Py_DECREF(v);
   42675             :             goto raise_neg_overflow;
   42676             :         } else if (is_negative) {
   42677             :             stepval = PyNumber_Invert(v);
   42678             :             Py_DECREF(v);
   42679             :             if (unlikely(!stepval))
   42680             :                 return (long) -1;
   42681             :         } else {
   42682             :             stepval = v;
   42683             :         }
   42684             :         v = NULL;
   42685             :         val = (long) 0;
   42686             :         mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
   42687             :         shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
   42688             :         for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) {
   42689             :             PyObject *tmp, *digit;
   42690             :             long idigit;
   42691             :             digit = PyNumber_And(stepval, mask);
   42692             :             if (unlikely(!digit)) goto done;
   42693             :             idigit = PyLong_AsLong(digit);
   42694             :             Py_DECREF(digit);
   42695             :             if (unlikely(idigit < 0)) goto done;
   42696             :             val |= ((long) idigit) << bits;
   42697             :             tmp = PyNumber_Rshift(stepval, shift);
   42698             :             if (unlikely(!tmp)) goto done;
   42699             :             Py_DECREF(stepval); stepval = tmp;
   42700             :         }
   42701             :         Py_DECREF(shift); shift = NULL;
   42702             :         Py_DECREF(mask); mask = NULL;
   42703             :         {
   42704             :             long idigit = PyLong_AsLong(stepval);
   42705             :             if (unlikely(idigit < 0)) goto done;
   42706             :             remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1);
   42707             :             if (unlikely(idigit >= (1L << remaining_bits)))
   42708             :                 goto raise_overflow;
   42709             :             val |= ((long) idigit) << bits;
   42710             :         }
   42711             :         if (!is_unsigned) {
   42712             :             if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1))))
   42713             :                 goto raise_overflow;
   42714             :             if (is_negative)
   42715             :                 val = ~val;
   42716             :         }
   42717             :         ret = 0;
   42718             :     done:
   42719             :         Py_XDECREF(shift);
   42720             :         Py_XDECREF(mask);
   42721             :         Py_XDECREF(stepval);
   42722             : #endif
   42723             :         if (unlikely(ret))
   42724             :             return (long) -1;
   42725             :         return val;
   42726             :     }
   42727             : raise_overflow:
   42728             :     PyErr_SetString(PyExc_OverflowError,
   42729             :         "value too large to convert to long");
   42730             :     return (long) -1;
   42731             : raise_neg_overflow:
   42732             :     PyErr_SetString(PyExc_OverflowError,
   42733             :         "can't convert negative value to long");
   42734             :     return (long) -1;
   42735             : }
   42736             : 
   42737             : /* CIntFromPy */
   42738             :   static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *x) {
   42739             : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
   42740             : #pragma GCC diagnostic push
   42741             : #pragma GCC diagnostic ignored "-Wconversion"
   42742             : #endif
   42743             :     const char neg_one = (char) -1, const_zero = (char) 0;
   42744             : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
   42745             : #pragma GCC diagnostic pop
   42746             : #endif
   42747             :     const int is_unsigned = neg_one > const_zero;
   42748             : #if PY_MAJOR_VERSION < 3
   42749             :     if (likely(PyInt_Check(x))) {
   42750             :         if ((sizeof(char) < sizeof(long))) {
   42751             :             __PYX_VERIFY_RETURN_INT(char, long, PyInt_AS_LONG(x))
   42752             :         } else {
   42753             :             long val = PyInt_AS_LONG(x);
   42754             :             if (is_unsigned && unlikely(val < 0)) {
   42755             :                 goto raise_neg_overflow;
   42756             :             }
   42757             :             return (char) val;
   42758             :         }
   42759             :     }
   42760             : #endif
   42761             :     if (unlikely(!PyLong_Check(x))) {
   42762             :         char val;
   42763             :         PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
   42764             :         if (!tmp) return (char) -1;
   42765             :         val = __Pyx_PyInt_As_char(tmp);
   42766             :         Py_DECREF(tmp);
   42767             :         return val;
   42768             :     }
   42769             :     if (is_unsigned) {
   42770             : #if CYTHON_USE_PYLONG_INTERNALS
   42771             :         if (unlikely(__Pyx_PyLong_IsNeg(x))) {
   42772             :             goto raise_neg_overflow;
   42773             :         } else if (__Pyx_PyLong_IsCompact(x)) {
   42774             :             __PYX_VERIFY_RETURN_INT(char, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
   42775             :         } else {
   42776             :             const digit* digits = __Pyx_PyLong_Digits(x);
   42777             :             assert(__Pyx_PyLong_DigitCount(x) > 1);
   42778             :             switch (__Pyx_PyLong_DigitCount(x)) {
   42779             :                 case 2:
   42780             :                     if ((8 * sizeof(char) > 1 * PyLong_SHIFT)) {
   42781             :                         if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
   42782             :                             __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   42783             :                         } else if ((8 * sizeof(char) >= 2 * PyLong_SHIFT)) {
   42784             :                             return (char) (((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
   42785             :                         }
   42786             :                     }
   42787             :                     break;
   42788             :                 case 3:
   42789             :                     if ((8 * sizeof(char) > 2 * PyLong_SHIFT)) {
   42790             :                         if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
   42791             :                             __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   42792             :                         } else if ((8 * sizeof(char) >= 3 * PyLong_SHIFT)) {
   42793             :                             return (char) (((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
   42794             :                         }
   42795             :                     }
   42796             :                     break;
   42797             :                 case 4:
   42798             :                     if ((8 * sizeof(char) > 3 * PyLong_SHIFT)) {
   42799             :                         if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
   42800             :                             __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   42801             :                         } else if ((8 * sizeof(char) >= 4 * PyLong_SHIFT)) {
   42802             :                             return (char) (((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
   42803             :                         }
   42804             :                     }
   42805             :                     break;
   42806             :             }
   42807             :         }
   42808             : #endif
   42809             : #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
   42810             :         if (unlikely(Py_SIZE(x) < 0)) {
   42811             :             goto raise_neg_overflow;
   42812             :         }
   42813             : #else
   42814             :         {
   42815             :             int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
   42816             :             if (unlikely(result < 0))
   42817             :                 return (char) -1;
   42818             :             if (unlikely(result == 1))
   42819             :                 goto raise_neg_overflow;
   42820             :         }
   42821             : #endif
   42822             :         if ((sizeof(char) <= sizeof(unsigned long))) {
   42823             :             __PYX_VERIFY_RETURN_INT_EXC(char, unsigned long, PyLong_AsUnsignedLong(x))
   42824             : #ifdef HAVE_LONG_LONG
   42825             :         } else if ((sizeof(char) <= sizeof(unsigned PY_LONG_LONG))) {
   42826             :             __PYX_VERIFY_RETURN_INT_EXC(char, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
   42827             : #endif
   42828             :         }
   42829             :     } else {
   42830             : #if CYTHON_USE_PYLONG_INTERNALS
   42831             :         if (__Pyx_PyLong_IsCompact(x)) {
   42832             :             __PYX_VERIFY_RETURN_INT(char, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
   42833             :         } else {
   42834             :             const digit* digits = __Pyx_PyLong_Digits(x);
   42835             :             assert(__Pyx_PyLong_DigitCount(x) > 1);
   42836             :             switch (__Pyx_PyLong_SignedDigitCount(x)) {
   42837             :                 case -2:
   42838             :                     if ((8 * sizeof(char) - 1 > 1 * PyLong_SHIFT)) {
   42839             :                         if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
   42840             :                             __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   42841             :                         } else if ((8 * sizeof(char) - 1 > 2 * PyLong_SHIFT)) {
   42842             :                             return (char) (((char)-1)*(((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
   42843             :                         }
   42844             :                     }
   42845             :                     break;
   42846             :                 case 2:
   42847             :                     if ((8 * sizeof(char) > 1 * PyLong_SHIFT)) {
   42848             :                         if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
   42849             :                             __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   42850             :                         } else if ((8 * sizeof(char) - 1 > 2 * PyLong_SHIFT)) {
   42851             :                             return (char) ((((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
   42852             :                         }
   42853             :                     }
   42854             :                     break;
   42855             :                 case -3:
   42856             :                     if ((8 * sizeof(char) - 1 > 2 * PyLong_SHIFT)) {
   42857             :                         if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
   42858             :                             __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   42859             :                         } else if ((8 * sizeof(char) - 1 > 3 * PyLong_SHIFT)) {
   42860             :                             return (char) (((char)-1)*(((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
   42861             :                         }
   42862             :                     }
   42863             :                     break;
   42864             :                 case 3:
   42865             :                     if ((8 * sizeof(char) > 2 * PyLong_SHIFT)) {
   42866             :                         if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
   42867             :                             __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   42868             :                         } else if ((8 * sizeof(char) - 1 > 3 * PyLong_SHIFT)) {
   42869             :                             return (char) ((((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
   42870             :                         }
   42871             :                     }
   42872             :                     break;
   42873             :                 case -4:
   42874             :                     if ((8 * sizeof(char) - 1 > 3 * PyLong_SHIFT)) {
   42875             :                         if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
   42876             :                             __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   42877             :                         } else if ((8 * sizeof(char) - 1 > 4 * PyLong_SHIFT)) {
   42878             :                             return (char) (((char)-1)*(((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
   42879             :                         }
   42880             :                     }
   42881             :                     break;
   42882             :                 case 4:
   42883             :                     if ((8 * sizeof(char) > 3 * PyLong_SHIFT)) {
   42884             :                         if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
   42885             :                             __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   42886             :                         } else if ((8 * sizeof(char) - 1 > 4 * PyLong_SHIFT)) {
   42887             :                             return (char) ((((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
   42888             :                         }
   42889             :                     }
   42890             :                     break;
   42891             :             }
   42892             :         }
   42893             : #endif
   42894             :         if ((sizeof(char) <= sizeof(long))) {
   42895             :             __PYX_VERIFY_RETURN_INT_EXC(char, long, PyLong_AsLong(x))
   42896             : #ifdef HAVE_LONG_LONG
   42897             :         } else if ((sizeof(char) <= sizeof(PY_LONG_LONG))) {
   42898             :             __PYX_VERIFY_RETURN_INT_EXC(char, PY_LONG_LONG, PyLong_AsLongLong(x))
   42899             : #endif
   42900             :         }
   42901             :     }
   42902             :     {
   42903             :         char val;
   42904             :         int ret = -1;
   42905             : #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
   42906             :         Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
   42907             :             x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
   42908             :         if (unlikely(bytes_copied == -1)) {
   42909             :         } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
   42910             :             goto raise_overflow;
   42911             :         } else {
   42912             :             ret = 0;
   42913             :         }
   42914             : #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
   42915             :         int one = 1; int is_little = (int)*(unsigned char *)&one;
   42916             :         unsigned char *bytes = (unsigned char *)&val;
   42917             :         ret = _PyLong_AsByteArray((PyLongObject *)x,
   42918             :                                     bytes, sizeof(val),
   42919             :                                     is_little, !is_unsigned);
   42920             : #else
   42921             :         PyObject *v;
   42922             :         PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
   42923             :         int bits, remaining_bits, is_negative = 0;
   42924             :         int chunk_size = (sizeof(long) < 8) ? 30 : 62;
   42925             :         if (likely(PyLong_CheckExact(x))) {
   42926             :             v = __Pyx_NewRef(x);
   42927             :         } else {
   42928             :             v = PyNumber_Long(x);
   42929             :             if (unlikely(!v)) return (char) -1;
   42930             :             assert(PyLong_CheckExact(v));
   42931             :         }
   42932             :         {
   42933             :             int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
   42934             :             if (unlikely(result < 0)) {
   42935             :                 Py_DECREF(v);
   42936             :                 return (char) -1;
   42937             :             }
   42938             :             is_negative = result == 1;
   42939             :         }
   42940             :         if (is_unsigned && unlikely(is_negative)) {
   42941             :             Py_DECREF(v);
   42942             :             goto raise_neg_overflow;
   42943             :         } else if (is_negative) {
   42944             :             stepval = PyNumber_Invert(v);
   42945             :             Py_DECREF(v);
   42946             :             if (unlikely(!stepval))
   42947             :                 return (char) -1;
   42948             :         } else {
   42949             :             stepval = v;
   42950             :         }
   42951             :         v = NULL;
   42952             :         val = (char) 0;
   42953             :         mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
   42954             :         shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
   42955             :         for (bits = 0; bits < (int) sizeof(char) * 8 - chunk_size; bits += chunk_size) {
   42956             :             PyObject *tmp, *digit;
   42957             :             long idigit;
   42958             :             digit = PyNumber_And(stepval, mask);
   42959             :             if (unlikely(!digit)) goto done;
   42960             :             idigit = PyLong_AsLong(digit);
   42961             :             Py_DECREF(digit);
   42962             :             if (unlikely(idigit < 0)) goto done;
   42963             :             val |= ((char) idigit) << bits;
   42964             :             tmp = PyNumber_Rshift(stepval, shift);
   42965             :             if (unlikely(!tmp)) goto done;
   42966             :             Py_DECREF(stepval); stepval = tmp;
   42967             :         }
   42968             :         Py_DECREF(shift); shift = NULL;
   42969             :         Py_DECREF(mask); mask = NULL;
   42970             :         {
   42971             :             long idigit = PyLong_AsLong(stepval);
   42972             :             if (unlikely(idigit < 0)) goto done;
   42973             :             remaining_bits = ((int) sizeof(char) * 8) - bits - (is_unsigned ? 0 : 1);
   42974             :             if (unlikely(idigit >= (1L << remaining_bits)))
   42975             :                 goto raise_overflow;
   42976             :             val |= ((char) idigit) << bits;
   42977             :         }
   42978             :         if (!is_unsigned) {
   42979             :             if (unlikely(val & (((char) 1) << (sizeof(char) * 8 - 1))))
   42980             :                 goto raise_overflow;
   42981             :             if (is_negative)
   42982             :                 val = ~val;
   42983             :         }
   42984             :         ret = 0;
   42985             :     done:
   42986             :         Py_XDECREF(shift);
   42987             :         Py_XDECREF(mask);
   42988             :         Py_XDECREF(stepval);
   42989             : #endif
   42990             :         if (unlikely(ret))
   42991             :             return (char) -1;
   42992             :         return val;
   42993             :     }
   42994             : raise_overflow:
   42995             :     PyErr_SetString(PyExc_OverflowError,
   42996             :         "value too large to convert to char");
   42997             :     return (char) -1;
   42998             : raise_neg_overflow:
   42999             :     PyErr_SetString(PyExc_OverflowError,
   43000             :         "can't convert negative value to char");
   43001             :     return (char) -1;
   43002             : }
   43003             : 
   43004             : /* FormatTypeName */
   43005             :   #if CYTHON_COMPILING_IN_LIMITED_API
   43006             : static __Pyx_TypeName
   43007             : __Pyx_PyType_GetName(PyTypeObject* tp)
   43008             : {
   43009             :     PyObject *name = __Pyx_PyObject_GetAttrStr((PyObject *)tp,
   43010             :                                                __pyx_n_s_name_2);
   43011             :     if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) {
   43012             :         PyErr_Clear();
   43013             :         Py_XDECREF(name);
   43014             :         name = __Pyx_NewRef(__pyx_n_s__74);
   43015             :     }
   43016             :     return name;
   43017             : }
   43018             : #endif
   43019             : 
   43020             : /* CheckBinaryVersion */
   43021           3 :   static unsigned long __Pyx_get_runtime_version(void) {
   43022             : #if __PYX_LIMITED_VERSION_HEX >= 0x030B00A4
   43023           3 :     return Py_Version & ~0xFFUL;
   43024             : #else
   43025             :     const char* rt_version = Py_GetVersion();
   43026             :     unsigned long version = 0;
   43027             :     unsigned long factor = 0x01000000UL;
   43028             :     unsigned int digit = 0;
   43029             :     int i = 0;
   43030             :     while (factor) {
   43031             :         while ('0' <= rt_version[i] && rt_version[i] <= '9') {
   43032             :             digit = digit * 10 + (unsigned int) (rt_version[i] - '0');
   43033             :             ++i;
   43034             :         }
   43035             :         version += factor * digit;
   43036             :         if (rt_version[i] != '.')
   43037             :             break;
   43038             :         digit = 0;
   43039             :         factor >>= 8;
   43040             :         ++i;
   43041             :     }
   43042             :     return version;
   43043             : #endif
   43044             : }
   43045           3 : static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) {
   43046           3 :     const unsigned long MAJOR_MINOR = 0xFFFF0000UL;
   43047           3 :     if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR))
   43048             :         return 0;
   43049           0 :     if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR)))
   43050             :         return 1;
   43051             :     {
   43052           0 :         char message[200];
   43053           0 :         PyOS_snprintf(message, sizeof(message),
   43054             :                       "compile time Python version %d.%d "
   43055             :                       "of module '%.100s' "
   43056             :                       "%s "
   43057             :                       "runtime version %d.%d",
   43058           0 :                        (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF),
   43059             :                        __Pyx_MODULE_NAME,
   43060             :                        (allow_newer) ? "was newer than" : "does not match",
   43061           0 :                        (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF)
   43062             :        );
   43063           0 :         return PyErr_WarnEx(NULL, message, 1);
   43064             :     }
   43065             : }
   43066             : 
   43067             : /* FunctionImport */
   43068             :   #ifndef __PYX_HAVE_RT_ImportFunction_3_0_11
   43069             : #define __PYX_HAVE_RT_ImportFunction_3_0_11
   43070           9 : static int __Pyx_ImportFunction_3_0_11(PyObject *module, const char *funcname, void (**f)(void), const char *sig) {
   43071           9 :     PyObject *d = 0;
   43072           9 :     PyObject *cobj = 0;
   43073           9 :     union {
   43074             :         void (*fp)(void);
   43075             :         void *p;
   43076             :     } tmp;
   43077           9 :     d = PyObject_GetAttrString(module, (char *)"__pyx_capi__");
   43078           9 :     if (!d)
   43079           0 :         goto bad;
   43080           9 :     cobj = PyDict_GetItemString(d, funcname);
   43081           9 :     if (!cobj) {
   43082           0 :         PyErr_Format(PyExc_ImportError,
   43083             :             "%.200s does not export expected C function %.200s",
   43084             :                 PyModule_GetName(module), funcname);
   43085           0 :         goto bad;
   43086             :     }
   43087           9 :     if (!PyCapsule_IsValid(cobj, sig)) {
   43088           0 :         PyErr_Format(PyExc_TypeError,
   43089             :             "C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)",
   43090             :              PyModule_GetName(module), funcname, sig, PyCapsule_GetName(cobj));
   43091           0 :         goto bad;
   43092             :     }
   43093           9 :     tmp.p = PyCapsule_GetPointer(cobj, sig);
   43094           9 :     *f = tmp.fp;
   43095           9 :     if (!(*f))
   43096           0 :         goto bad;
   43097           9 :     Py_DECREF(d);
   43098             :     return 0;
   43099           0 : bad:
   43100           0 :     Py_XDECREF(d);
   43101           0 :     return -1;
   43102             : }
   43103             : #endif
   43104             : 
   43105             : /* InitStrings */
   43106             :   #if PY_MAJOR_VERSION >= 3
   43107         780 : static int __Pyx_InitString(__Pyx_StringTabEntry t, PyObject **str) {
   43108         780 :     if (t.is_unicode | t.is_str) {
   43109         777 :         if (t.intern) {
   43110         594 :             *str = PyUnicode_InternFromString(t.s);
   43111         183 :         } else if (t.encoding) {
   43112           0 :             *str = PyUnicode_Decode(t.s, t.n - 1, t.encoding, NULL);
   43113             :         } else {
   43114         183 :             *str = PyUnicode_FromStringAndSize(t.s, t.n - 1);
   43115             :         }
   43116             :     } else {
   43117           3 :         *str = PyBytes_FromStringAndSize(t.s, t.n - 1);
   43118             :     }
   43119         780 :     if (!*str)
   43120             :         return -1;
   43121         780 :     if (PyObject_Hash(*str) == -1)
   43122             :         return -1;
   43123             :     return 0;
   43124             : }
   43125             : #endif
   43126           3 : static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
   43127         783 :     while (t->p) {
   43128             :         #if PY_MAJOR_VERSION >= 3
   43129         780 :         __Pyx_InitString(*t, t->p);
   43130             :         #else
   43131             :         if (t->is_unicode) {
   43132             :             *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
   43133             :         } else if (t->intern) {
   43134             :             *t->p = PyString_InternFromString(t->s);
   43135             :         } else {
   43136             :             *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
   43137             :         }
   43138             :         if (!*t->p)
   43139             :             return -1;
   43140             :         if (PyObject_Hash(*t->p) == -1)
   43141             :             return -1;
   43142             :         #endif
   43143         780 :         ++t;
   43144             :     }
   43145           3 :     return 0;
   43146             : }
   43147             : 
   43148             : #include <string.h>
   43149           0 : static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) {
   43150           0 :     size_t len = strlen(s);
   43151           0 :     if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) {
   43152             :         PyErr_SetString(PyExc_OverflowError, "byte string is too long");
   43153             :         return -1;
   43154             :     }
   43155             :     return (Py_ssize_t) len;
   43156             : }
   43157             : static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
   43158             :     Py_ssize_t len = __Pyx_ssize_strlen(c_str);
   43159             :     if (unlikely(len < 0)) return NULL;
   43160             :     return __Pyx_PyUnicode_FromStringAndSize(c_str, len);
   43161             : }
   43162             : static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) {
   43163             :     Py_ssize_t len = __Pyx_ssize_strlen(c_str);
   43164             :     if (unlikely(len < 0)) return NULL;
   43165             :     return PyByteArray_FromStringAndSize(c_str, len);
   43166             : }
   43167             : static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
   43168             :     Py_ssize_t ignore;
   43169             :     return __Pyx_PyObject_AsStringAndSize(o, &ignore);
   43170             : }
   43171             : #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
   43172             : #if !CYTHON_PEP393_ENABLED
   43173             : static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
   43174             :     char* defenc_c;
   43175             :     PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
   43176             :     if (!defenc) return NULL;
   43177             :     defenc_c = PyBytes_AS_STRING(defenc);
   43178             : #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
   43179             :     {
   43180             :         char* end = defenc_c + PyBytes_GET_SIZE(defenc);
   43181             :         char* c;
   43182             :         for (c = defenc_c; c < end; c++) {
   43183             :             if ((unsigned char) (*c) >= 128) {
   43184             :                 PyUnicode_AsASCIIString(o);
   43185             :                 return NULL;
   43186             :             }
   43187             :         }
   43188             :     }
   43189             : #endif
   43190             :     *length = PyBytes_GET_SIZE(defenc);
   43191             :     return defenc_c;
   43192             : }
   43193             : #else
   43194             : static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
   43195             :     if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
   43196             : #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
   43197             :     if (likely(PyUnicode_IS_ASCII(o))) {
   43198             :         *length = PyUnicode_GET_LENGTH(o);
   43199             :         return PyUnicode_AsUTF8(o);
   43200             :     } else {
   43201             :         PyUnicode_AsASCIIString(o);
   43202             :         return NULL;
   43203             :     }
   43204             : #else
   43205             :     return PyUnicode_AsUTF8AndSize(o, length);
   43206             : #endif
   43207             : }
   43208             : #endif
   43209             : #endif
   43210             : static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
   43211             : #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
   43212             :     if (
   43213             : #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
   43214             :             __Pyx_sys_getdefaultencoding_not_ascii &&
   43215             : #endif
   43216             :             PyUnicode_Check(o)) {
   43217             :         return __Pyx_PyUnicode_AsStringAndSize(o, length);
   43218             :     } else
   43219             : #endif
   43220             : #if (!CYTHON_COMPILING_IN_PYPY && !CYTHON_COMPILING_IN_LIMITED_API) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
   43221             :     if (PyByteArray_Check(o)) {
   43222             :         *length = PyByteArray_GET_SIZE(o);
   43223             :         return PyByteArray_AS_STRING(o);
   43224             :     } else
   43225             : #endif
   43226             :     {
   43227             :         char* result;
   43228             :         int r = PyBytes_AsStringAndSize(o, &result, length);
   43229             :         if (unlikely(r < 0)) {
   43230             :             return NULL;
   43231             :         } else {
   43232             :             return result;
   43233             :         }
   43234             :     }
   43235             : }
   43236        7083 : static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
   43237        7083 :    int is_true = x == Py_True;
   43238        7083 :    if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
   43239          97 :    else return PyObject_IsTrue(x);
   43240             : }
   43241           0 : static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
   43242           0 :     int retval;
   43243           0 :     if (unlikely(!x)) return -1;
   43244           0 :     retval = __Pyx_PyObject_IsTrue(x);
   43245           0 :     Py_DECREF(x);
   43246             :     return retval;
   43247             : }
   43248           0 : static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
   43249           0 :     __Pyx_TypeName result_type_name = __Pyx_PyType_GetName(Py_TYPE(result));
   43250             : #if PY_MAJOR_VERSION >= 3
   43251           0 :     if (PyLong_Check(result)) {
   43252           0 :         if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
   43253             :                 "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ").  "
   43254             :                 "The ability to return an instance of a strict subclass of int is deprecated, "
   43255             :                 "and may be removed in a future version of Python.",
   43256             :                 result_type_name)) {
   43257           0 :             __Pyx_DECREF_TypeName(result_type_name);
   43258           0 :             Py_DECREF(result);
   43259           0 :             return NULL;
   43260             :         }
   43261             :         __Pyx_DECREF_TypeName(result_type_name);
   43262             :         return result;
   43263             :     }
   43264             : #endif
   43265           0 :     PyErr_Format(PyExc_TypeError,
   43266             :                  "__%.4s__ returned non-%.4s (type " __Pyx_FMT_TYPENAME ")",
   43267             :                  type_name, type_name, result_type_name);
   43268           0 :     __Pyx_DECREF_TypeName(result_type_name);
   43269           0 :     Py_DECREF(result);
   43270             :     return NULL;
   43271             : }
   43272           0 : static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
   43273             : #if CYTHON_USE_TYPE_SLOTS
   43274           0 :   PyNumberMethods *m;
   43275             : #endif
   43276           0 :   const char *name = NULL;
   43277           0 :   PyObject *res = NULL;
   43278             : #if PY_MAJOR_VERSION < 3
   43279             :   if (likely(PyInt_Check(x) || PyLong_Check(x)))
   43280             : #else
   43281           0 :   if (likely(PyLong_Check(x)))
   43282             : #endif
   43283           0 :     return __Pyx_NewRef(x);
   43284             : #if CYTHON_USE_TYPE_SLOTS
   43285           0 :   m = Py_TYPE(x)->tp_as_number;
   43286             :   #if PY_MAJOR_VERSION < 3
   43287             :   if (m && m->nb_int) {
   43288             :     name = "int";
   43289             :     res = m->nb_int(x);
   43290             :   }
   43291             :   else if (m && m->nb_long) {
   43292             :     name = "long";
   43293             :     res = m->nb_long(x);
   43294             :   }
   43295             :   #else
   43296           0 :   if (likely(m && m->nb_int)) {
   43297           0 :     name = "int";
   43298           0 :     res = m->nb_int(x);
   43299             :   }
   43300             :   #endif
   43301             : #else
   43302             :   if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
   43303             :     res = PyNumber_Int(x);
   43304             :   }
   43305             : #endif
   43306           0 :   if (likely(res)) {
   43307             : #if PY_MAJOR_VERSION < 3
   43308             :     if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
   43309             : #else
   43310           0 :     if (unlikely(!PyLong_CheckExact(res))) {
   43311             : #endif
   43312           0 :         return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
   43313             :     }
   43314             :   }
   43315           0 :   else if (!PyErr_Occurred()) {
   43316           0 :     PyErr_SetString(PyExc_TypeError,
   43317             :                     "an integer is required");
   43318             :   }
   43319             :   return res;
   43320             : }
   43321         188 : static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
   43322         188 :   Py_ssize_t ival;
   43323         188 :   PyObject *x;
   43324             : #if PY_MAJOR_VERSION < 3
   43325             :   if (likely(PyInt_CheckExact(b))) {
   43326             :     if (sizeof(Py_ssize_t) >= sizeof(long))
   43327             :         return PyInt_AS_LONG(b);
   43328             :     else
   43329             :         return PyInt_AsSsize_t(b);
   43330             :   }
   43331             : #endif
   43332         188 :   if (likely(PyLong_CheckExact(b))) {
   43333             :     #if CYTHON_USE_PYLONG_INTERNALS
   43334         188 :     if (likely(__Pyx_PyLong_IsCompact(b))) {
   43335         188 :         return __Pyx_PyLong_CompactValue(b);
   43336             :     } else {
   43337           0 :       const digit* digits = __Pyx_PyLong_Digits(b);
   43338           0 :       const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b);
   43339           0 :       switch (size) {
   43340             :          case 2:
   43341           0 :            if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
   43342           0 :              return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
   43343             :            }
   43344             :            break;
   43345             :          case -2:
   43346           0 :            if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
   43347           0 :              return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
   43348             :            }
   43349             :            break;
   43350             :          case 3:
   43351             :            if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
   43352             :              return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
   43353             :            }
   43354             :            break;
   43355             :          case -3:
   43356             :            if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
   43357             :              return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
   43358             :            }
   43359             :            break;
   43360             :          case 4:
   43361             :            if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
   43362             :              return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
   43363             :            }
   43364             :            break;
   43365             :          case -4:
   43366             :            if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
   43367             :              return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
   43368             :            }
   43369             :            break;
   43370             :       }
   43371             :     }
   43372             :     #endif
   43373           0 :     return PyLong_AsSsize_t(b);
   43374             :   }
   43375           0 :   x = PyNumber_Index(b);
   43376           0 :   if (!x) return -1;
   43377           0 :   ival = PyInt_AsSsize_t(x);
   43378           0 :   Py_DECREF(x);
   43379             :   return ival;
   43380             : }
   43381             : static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) {
   43382             :   if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) {
   43383             :     return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o);
   43384             : #if PY_MAJOR_VERSION < 3
   43385             :   } else if (likely(PyInt_CheckExact(o))) {
   43386             :     return PyInt_AS_LONG(o);
   43387             : #endif
   43388             :   } else {
   43389             :     Py_ssize_t ival;
   43390             :     PyObject *x;
   43391             :     x = PyNumber_Index(o);
   43392             :     if (!x) return -1;
   43393             :     ival = PyInt_AsLong(x);
   43394             :     Py_DECREF(x);
   43395             :     return ival;
   43396             :   }
   43397             : }
   43398         673 : static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
   43399         673 :   return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
   43400             : }
   43401             : static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
   43402             :     return PyInt_FromSize_t(ival);
   43403             : }
   43404             : 
   43405             : 
   43406             : /* #### Code section: utility_code_pragmas_end ### */
   43407             : #ifdef _MSC_VER
   43408             : #pragma warning( pop )
   43409             : #endif
   43410             : 
   43411             : 
   43412             : 
   43413             : /* #### Code section: end ### */
   43414             : #endif /* Py_PYTHON_H */

Generated by: LCOV version 1.16